Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ccache for openSUSE:Factory checked 
in at 2021-09-25 00:35:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ccache (Old)
 and      /work/SRC/openSUSE:Factory/.ccache.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ccache"

Sat Sep 25 00:35:11 2021 rev:61 rq:920650 version:4.4.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ccache/ccache.changes    2021-08-27 
21:43:42.497956898 +0200
+++ /work/SRC/openSUSE:Factory/.ccache.new.1899/ccache.changes  2021-09-25 
00:35:47.483154244 +0200
@@ -1,0 +2,7 @@
+Tue Sep 21 11:52:48 UTC 2021 - Martin Pluskal <mplus...@suse.com>
+
+- Update to version 4.4.1:
+  * See https://ccache.dev/releasenotes.html#_ccache_4_4_1 for detailed
+    list of changes
+
+-------------------------------------------------------------------

Old:
----
  ccache-4.4.tar.xz
  ccache-4.4.tar.xz.asc

New:
----
  ccache-4.4.1.tar.xz
  ccache-4.4.1.tar.xz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ccache.spec ++++++
--- /var/tmp/diff_new_pack.3F53P6/_old  2021-09-25 00:35:47.975154758 +0200
+++ /var/tmp/diff_new_pack.3F53P6/_new  2021-09-25 00:35:47.979154762 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           ccache
-Version:        4.4
+Version:        4.4.1
 Release:        0
 Summary:        A Fast C/C++ Compiler Cache
 License:        GPL-3.0-or-later

++++++ ccache-4.4.tar.xz -> ccache-4.4.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/.github/workflows/build.yaml 
new/ccache-4.4.1/.github/workflows/build.yaml
--- old/ccache-4.4/.github/workflows/build.yaml 2021-08-19 20:43:30.000000000 
+0200
+++ new/ccache-4.4.1/.github/workflows/build.yaml       2021-09-11 
09:22:10.000000000 +0200
@@ -104,7 +104,7 @@
               echo "CC=clang-${{ matrix.config.version }}" >> $GITHUB_ENV
               echo "CXX=clang++-${{ matrix.config.version }}" >> $GITHUB_ENV
 
-              sudo apt install -y clang-${{ matrix.config.version }} 
g++-multilib
+              sudo apt install -y clang-${{ matrix.config.version }} 
g++-multilib lld-${{ matrix.config.version }}
             fi
           elif [ "${{ runner.os }}" = "macOS" ]; then
             HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/CMakeLists.txt 
new/ccache-4.4.1/CMakeLists.txt
--- old/ccache-4.4/CMakeLists.txt       2021-08-19 20:43:30.000000000 +0200
+++ new/ccache-4.4.1/CMakeLists.txt     2021-09-11 09:22:10.000000000 +0200
@@ -65,6 +65,11 @@
 endif()
 message(STATUS "Ccache dev mode: ${CCACHE_DEV_MODE}")
 
+option(ENABLE_IPO "Enable interprocedural (link time, LTO) optimization" OFF)
+if(ENABLE_IPO AND NOT MINGW)
+  set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
+endif()
+
 include(UseCcache)
 include(UseFastestLinker)
 include(StandardSettings)
@@ -72,11 +77,6 @@
 include(CIBuildType)
 include(DefaultBuildType)
 
-option(ENABLE_IPO "Enable interprocedural (link time, LTO) optimization" OFF)
-if(ENABLE_IPO)
-  set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
-endif()
-
 #
 # Configuration
 #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/LICENSE.adoc new/ccache-4.4.1/LICENSE.adoc
--- old/ccache-4.4/LICENSE.adoc 2021-08-19 20:43:30.000000000 +0200
+++ new/ccache-4.4.1/LICENSE.adoc       2021-09-11 09:22:10.000000000 +0200
@@ -515,9 +515,9 @@
 
 === src/third_party/httplib.*
 
-cpp-httplib - A C++11 cross-platform HTTP/HTTPS library. Copied from
-https://github.com/yhirose/cpp-httplib[cpp-httplib] commit
-469c6bc2b611ec5d212275e559e58e4da256019d. The library has the following 
license:
+cpp-httplib - A C++11 cross-platform HTTP/HTTPS library. Copied from 
cpp-httplib
+v0.9.4 downloaded from https://github.com/yhirose/cpp-httplib[cpp-httplib]. The
+library has the following license:
 
 ----
 The MIT License (MIT)
@@ -679,6 +679,36 @@
 ----
 
 
+=== src/third_party/url.*
+
+CxxUrl - A simple C++ URL class. Copied from CxxUrl v0.2 downloaded from
+<https://github.com/chmike/CxxUrl>. It has the following license text:
+
+----
+The MIT License (MIT)
+
+Copyright (c) 2015 Christophe Meessen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+----
+
+
 === src/third_party/win32/getopt.*
 
 This implementation of `getopt_long()` for Win32 was taken from
@@ -713,36 +743,6 @@
 ----
 
 
-=== src/third_party/url.*
-
-CxxUrl - A simple C++ URL class. Copied from CxxUrl v0.2 downloaded from
-<https://github.com/chmike/CxxUrl>. It has the following license text:
-
-----
-The MIT License (MIT)
-
-Copyright (c) 2015 Christophe Meessen
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-----
-
-
 === src/third_party/win32/winerror_to_errno.h
 
 The implementation of `winerror_to_errno()` was adapted from
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/cmake/CcacheVersion.cmake 
new/ccache-4.4.1/cmake/CcacheVersion.cmake
--- old/ccache-4.4/cmake/CcacheVersion.cmake    2021-08-19 20:43:30.000000000 
+0200
+++ new/ccache-4.4.1/cmake/CcacheVersion.cmake  2021-09-11 09:22:10.000000000 
+0200
@@ -22,7 +22,7 @@
 # CCACHE_VERSION_ORIGIN is set to "archive" in scenario 1 and "git" in scenario
 # 3.
 
-set(version_info "6ac58b50ec7ad402395acba9b1a5fdcbeabf347d HEAD, tag: v4.4, 
origin/master, origin/HEAD, master")
+set(version_info "8ba96ed8b76d07dd7035ec27ddc2fb99f2ec5eed HEAD, tag: v4.4.1, 
origin/master, origin/HEAD, master")
 
 if(version_info MATCHES 
"^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f])[0-9a-f]* 
(.*)")
   # Scenario 1.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/cmake/UseFastestLinker.cmake 
new/ccache-4.4.1/cmake/UseFastestLinker.cmake
--- old/ccache-4.4/cmake/UseFastestLinker.cmake 2021-08-19 20:43:30.000000000 
+0200
+++ new/ccache-4.4.1/cmake/UseFastestLinker.cmake       2021-09-11 
09:22:10.000000000 +0200
@@ -10,6 +10,11 @@
   return()
 endif()
 
+if(ENABLE_IPO)
+  message(STATUS "Using standard linker for IPO")
+  return()
+endif()
+
 if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64)
   # Be conservative and only probe for a faster linker on platforms that likely
   # don't have toolchain bugs. See for example
@@ -35,23 +40,31 @@
     return()
   endif()
 
-  set(use_default_linker 1)
+  # prefer an lld that matches the clang version
+  if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_VERSION MATCHES 
"^([0-9]*)\\.")
+    check_linker(lld-${CMAKE_MATCH_1})
+    if(HAVE_LD_LLD-${CMAKE_MATCH_1})
+      link_libraries("-fuse-ld=lld-${CMAKE_MATCH_1}")
+      message(STATUS "Using lld-${CMAKE_MATCH_1} linker")
+      return()
+    endif()
+  endif()
+
   check_linker(lld)
   if(HAVE_LD_LLD)
     link_libraries("-fuse-ld=lld")
-    set(use_default_linker 0)
     message(STATUS "Using lld linker")
-  else()
-    check_linker(gold)
-    if(HAVE_LD_GOLD)
-      link_libraries("-fuse-ld=gold")
-      set(use_default_linker 0)
-      message(STATUS "Using gold linker")
-    endif()
+    return()
   endif()
-  if(use_default_linker)
-    message(STATUS "Using default linker")
+
+  check_linker(gold)
+  if(HAVE_LD_GOLD)
+    link_libraries("-fuse-ld=gold")
+    message(STATUS "Using gold linker")
+    return()
   endif()
+
+  message(STATUS "Using default linker")
 endfunction()
 
 option(USE_FASTER_LINKER "Use the lld or gold linker instead of the default 
for faster linking" TRUE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/doc/NEWS.adoc 
new/ccache-4.4.1/doc/NEWS.adoc
--- old/ccache-4.4/doc/NEWS.adoc        2021-08-19 20:43:30.000000000 +0200
+++ new/ccache-4.4.1/doc/NEWS.adoc      2021-09-11 09:22:10.000000000 +0200
@@ -1,5 +1,59 @@
 = Ccache news
 
+== Ccache 4.4.1
+
+Release date: 2021-09-11
+
+
+=== New features
+
+- The secondary storage statistics section of `-s/--show-stats` is now shown
+  only if it's non-empty or with two verbose options. +
+  [small]#_[contributed by Joel Rosdahl]_#
+
+- Added display of statistics counters for misses. Previously they were only
+  implicit in the "`hits + misses`" sums. +
+  [small]#_[contributed by Joel Rosdahl]_#
+
+
+=== Bug fixes
+
+- Fixed spurious crashes when using the HTTP or Redis backend and the remote
+  connection hung up. +
+  [small]#_[contributed by Joel Rosdahl]_#
+
+- Made sure to always store configuration origin value. +
+  [small]#_[contributed by Gregor Jasny]_#
+
+
+=== Build improvements
+
+- The matching version of lld is now used for Clang. +
+  [small]#_[contributed by Gregor Jasny]_#
+
+- The standard linker is now used if IPO (LTO) is enabled. +
+  [small]#_[contributed by Gregor Jasny]_#
+
+- Disabled IPO (LTO) for MinGW toolchains since they seem to be generally
+  broken. +
+  [small]#_[contributed by Gregor Jasny]_#
+
+- Fixed build errors with Clang on Windows. +
+  [small]#_[contributed by Orgad Shaneh]_#
+
+
+=== Test improvements
+
+- Fixed .incbin test with newer binutil versions. +
+  [small]#_[contributed by Joel Rosdahl]_#
+
+- Fixed basedir test suite failure when using a symlinked CWD. +
+  [small]#_[contributed by Joel Rosdahl]_#
+
+- Improved output of differing text files on failure. +
+  [small]#_[contributed by Joel Rosdahl]_#
+
+
 == Ccache 4.4
 
 Release date: 2021-08-19
@@ -76,8 +130,8 @@
   options. +
   [small]#_[contributed by Joel Rosdahl]_#
 
-- Made the `--config-path` and `--dir` options affect whole command line so 
that
-  they don't have to be put before `-s`/`--show-stats`. +
+- Made the `--config-path` and `--dir` options affect the whole command line so
+  that they don't have to be put before `-s`/`--show-stats`. +
   [small]#_[contributed by Joel Rosdahl]_#
 
 - Made `--dump-manifest` and `--dump-result` accept filename `-` for reading
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/dockerfiles/centos-8/Dockerfile 
new/ccache-4.4.1/dockerfiles/centos-8/Dockerfile
--- old/ccache-4.4/dockerfiles/centos-8/Dockerfile      2021-08-19 
20:43:30.000000000 +0200
+++ new/ccache-4.4.1/dockerfiles/centos-8/Dockerfile    2021-09-11 
09:22:10.000000000 +0200
@@ -4,7 +4,6 @@
 RUN dnf install -y epel-release \
  && dnf update -y \
  && dnf install -y \
-        asciidoctor \
         autoconf \
         bash \
         ccache \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/src/Config.cpp 
new/ccache-4.4.1/src/Config.cpp
--- old/ccache-4.4/src/Config.cpp       2021-08-19 20:43:30.000000000 +0200
+++ new/ccache-4.4.1/src/Config.cpp     2021-09-11 09:22:10.000000000 +0200
@@ -49,13 +49,9 @@
 using nonstd::nullopt;
 using nonstd::optional;
 
-#if defined(_MSC_VER)
-#  define DLLIMPORT __declspec(dllimport)
-#else
-#  define DLLIMPORT
-#endif
-
+#ifndef environ
 DLLIMPORT extern char** environ;
+#endif
 
 namespace {
 
@@ -999,7 +995,10 @@
     break;
   }
 
-  m_origins.emplace(key, origin);
+  auto result = m_origins.emplace(key, origin);
+  if (!result.second) {
+    result.first->second = origin;
+  }
 }
 
 void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/src/SignalHandler.cpp 
new/ccache-4.4.1/src/SignalHandler.cpp
--- old/ccache-4.4/src/SignalHandler.cpp        2021-08-19 20:43:30.000000000 
+0200
+++ new/ccache-4.4.1/src/SignalHandler.cpp      2021-09-11 09:22:10.000000000 
+0200
@@ -71,6 +71,8 @@
 #  ifdef SIGQUIT
   register_signal_handler(SIGQUIT);
 #  endif
+
+  signal(SIGPIPE, SIG_IGN); // NOLINT: This is no error, clang-tidy
 }
 
 SignalHandler::~SignalHandler()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/src/core/Statistics.cpp 
new/ccache-4.4.1/src/core/Statistics.cpp
--- old/ccache-4.4/src/core/Statistics.cpp      2021-08-19 20:43:30.000000000 
+0200
+++ new/ccache-4.4.1/src/core/Statistics.cpp    2021-09-11 09:22:10.000000000 
+0200
@@ -246,6 +246,9 @@
     p_hits + p_misses,
     percent(p_hits, p_hits + p_misses),
   });
+  table.add_row({"  Misses:", misses});
+  table.add_row({"    Direct:", d_misses});
+  table.add_row({"    Preprocessed:", p_misses});
 
   const auto errors = count_stats(FLAG_ERROR);
   const auto uncacheable = count_stats(FLAG_UNCACHEABLE);
@@ -269,6 +272,7 @@
     pri_hits + pri_misses,
     percent(pri_hits, pri_hits + pri_misses),
   });
+  table.add_row({"  Misses:", pri_misses});
   if (!from_log) {
     table.add_row({
       "  Cache size (GB):",
@@ -297,7 +301,7 @@
   const uint64_t sec_errors = S(secondary_storage_error);
   const uint64_t sec_timeouts = S(secondary_storage_timeout);
 
-  if (verbosity > 0 || sec_hits + sec_misses + sec_errors + sec_timeouts > 0) {
+  if (verbosity > 1 || sec_hits + sec_misses + sec_errors + sec_timeouts > 0) {
     table.add_heading("Secondary storage:");
     table.add_row({
       "  Hits:",
@@ -306,6 +310,7 @@
       sec_hits + sec_misses,
       percent(sec_hits, sec_hits + pri_misses),
     });
+    table.add_row({"  Misses:", sec_misses});
     if (verbosity > 1 || sec_errors > 0) {
       table.add_row({"  Errors:", sec_errors});
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/src/core/wincompat.hpp 
new/ccache-4.4.1/src/core/wincompat.hpp
--- old/ccache-4.4/src/core/wincompat.hpp       2021-08-19 20:43:30.000000000 
+0200
+++ new/ccache-4.4.1/src/core/wincompat.hpp     2021-09-11 09:22:10.000000000 
+0200
@@ -104,4 +104,6 @@
 #    define O_BINARY 0
 #  endif
 
+#else
+#  define DLLIMPORT
 #endif // _WIN32
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/src/third_party/httplib.cpp 
new/ccache-4.4.1/src/third_party/httplib.cpp
--- old/ccache-4.4/src/third_party/httplib.cpp  2021-08-19 20:43:30.000000000 
+0200
+++ new/ccache-4.4.1/src/third_party/httplib.cpp        2021-09-11 
09:22:10.000000000 +0200
@@ -622,7 +622,7 @@
   auto service = std::to_string(port);
 
   if (getaddrinfo(host, service.c_str(), &hints, &result)) {
-#ifdef __linux__
+#if defined __linux__ && !defined __ANDROID__
     res_init();
 #endif
     return INVALID_SOCKET;
@@ -1411,8 +1411,7 @@
     std::string encoding = x.get_header_value("Content-Encoding");
     std::unique_ptr<decompressor> decompressor;
 
-    if (encoding.find("gzip") != std::string::npos ||
-        encoding.find("deflate") != std::string::npos) {
+    if (encoding == "gzip" || encoding == "deflate") {
 #ifdef CPPHTTPLIB_ZLIB_SUPPORT
       decompressor = detail::make_unique<gzip_decompressor>();
 #else
@@ -1706,14 +1705,6 @@
   return query;
 }
 
-std::string append_query_params(const char *path, const Params &params) {
-  std::string path_with_query = path;
-  const static std::regex re("[^?]+\\?.*");
-  auto delm = std::regex_match(path, re) ? '&' : '?';
-  path_with_query += delm + params_to_query_str(params);
-  return path_with_query;
-}
-
 void parse_query_text(const std::string &s, Params &params) {
   std::set<std::string> cache;
   split(s.data(), s.data() + s.size(), '&', [&](const char *b, const char *e) {
@@ -2347,6 +2338,14 @@
 
 } // namespace detail
 
+std::string append_query_params(const char *path, const Params &params) {
+  std::string path_with_query = path;
+  const static std::regex re("[^?]+\\?.*");
+  auto delm = std::regex_match(path, re) ? '&' : '?';
+  path_with_query += delm + detail::params_to_query_str(params);
+  return path_with_query;
+}
+
 // Header utilities
 std::pair<std::string, std::string> make_range_header(Ranges ranges) {
   std::string field = "bytes=";
@@ -4440,7 +4439,7 @@
                               const Headers &headers, Progress progress) {
   if (params.empty()) { return Get(path, headers); }
 
-  std::string path_with_query = detail::append_query_params(path, params);
+  std::string path_with_query = append_query_params(path, params);
   return Get(path_with_query.c_str(), headers, progress);
 }
 
@@ -4460,7 +4459,7 @@
     return Get(path, headers, response_handler, content_receiver, progress);
   }
 
-  std::string path_with_query = detail::append_query_params(path, params);
+  std::string path_with_query = append_query_params(path, params);
   return Get(path_with_query.c_str(), headers, response_handler,
              content_receiver, progress);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/src/third_party/httplib.h 
new/ccache-4.4.1/src/third_party/httplib.h
--- old/ccache-4.4/src/third_party/httplib.h    2021-08-19 20:43:30.000000000 
+0200
+++ new/ccache-4.4.1/src/third_party/httplib.h  2021-09-11 09:22:10.000000000 
+0200
@@ -178,7 +178,9 @@
 #include <unistd.h>
 
 using socket_t = int;
+#ifndef INVALID_SOCKET
 #define INVALID_SOCKET (-1)
+#endif
 #endif //_WIN32
 
 #include <algorithm>
@@ -580,23 +582,7 @@
 
 using SocketOptions = std::function<void(socket_t sock)>;
 
-inline void default_socket_options(socket_t sock) {
-  int yes = 1;
-#ifdef _WIN32
-  setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char *>(&yes),
-             sizeof(yes));
-  setsockopt(sock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE,
-             reinterpret_cast<char *>(&yes), sizeof(yes));
-#else
-#ifdef SO_REUSEPORT
-  setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, reinterpret_cast<void *>(&yes),
-             sizeof(yes));
-#else
-  setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<void *>(&yes),
-             sizeof(yes));
-#endif
-#endif
-}
+void default_socket_options(socket_t sock);
 
 class Server {
 public:
@@ -798,33 +784,9 @@
   Compression,
 };
 
-inline std::string to_string(const Error error) {
-  switch (error) {
-  case Error::Success: return "Success";
-  case Error::Connection: return "Connection";
-  case Error::BindIPAddress: return "BindIPAddress";
-  case Error::Read: return "Read";
-  case Error::Write: return "Write";
-  case Error::ExceedRedirectCount: return "ExceedRedirectCount";
-  case Error::Canceled: return "Canceled";
-  case Error::SSLConnection: return "SSLConnection";
-  case Error::SSLLoadingCerts: return "SSLLoadingCerts";
-  case Error::SSLServerVerification: return "SSLServerVerification";
-  case Error::UnsupportedMultipartBoundaryChars:
-    return "UnsupportedMultipartBoundaryChars";
-  case Error::Compression: return "Compression";
-  case Error::Unknown: return "Unknown";
-  default: break;
-  }
-
-  return "Invalid";
-}
+std::string to_string(const Error error);
 
-inline std::ostream &operator<<(std::ostream &os, const Error &obj) {
-  os << to_string(obj);
-  os << " (" << static_cast<std::underlying_type<Error>::type>(obj) << ')';
-  return os;
-}
+std::ostream &operator<<(std::ostream &os, const Error &obj);
 
 class Result {
 public:
@@ -1544,6 +1506,24 @@
   }
 }
 
+inline void default_socket_options(socket_t sock) {
+  int yes = 1;
+#ifdef _WIN32
+  setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char *>(&yes),
+             sizeof(yes));
+  setsockopt(sock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE,
+             reinterpret_cast<char *>(&yes), sizeof(yes));
+#else
+#ifdef SO_REUSEPORT
+  setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, reinterpret_cast<void *>(&yes),
+             sizeof(yes));
+#else
+  setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<void *>(&yes),
+             sizeof(yes));
+#endif
+#endif
+}
+
 template <class Rep, class Period>
 inline Server &
 Server::set_read_timeout(const std::chrono::duration<Rep, Period> &duration) {
@@ -1568,6 +1548,34 @@
   return *this;
 }
 
+inline std::string to_string(const Error error) {
+  switch (error) {
+  case Error::Success: return "Success";
+  case Error::Connection: return "Connection";
+  case Error::BindIPAddress: return "BindIPAddress";
+  case Error::Read: return "Read";
+  case Error::Write: return "Write";
+  case Error::ExceedRedirectCount: return "ExceedRedirectCount";
+  case Error::Canceled: return "Canceled";
+  case Error::SSLConnection: return "SSLConnection";
+  case Error::SSLLoadingCerts: return "SSLLoadingCerts";
+  case Error::SSLServerVerification: return "SSLServerVerification";
+  case Error::UnsupportedMultipartBoundaryChars:
+    return "UnsupportedMultipartBoundaryChars";
+  case Error::Compression: return "Compression";
+  case Error::Unknown: return "Unknown";
+  default: break;
+  }
+
+  return "Invalid";
+}
+
+inline std::ostream &operator<<(std::ostream &os, const Error &obj) {
+  os << to_string(obj);
+  os << " (" << static_cast<std::underlying_type<Error>::type>(obj) << ')';
+  return os;
+}
+
 template <typename T>
 inline T Result::get_request_header_value(const char *key, size_t id) const {
   return detail::get_header_value<T>(request_headers_, key, id, 0);
@@ -1618,6 +1626,8 @@
  * .h + .cc.
  */
 
+std::string append_query_params(const char *path, const Params &params);
+
 std::pair<std::string, std::string> make_range_header(Ranges ranges);
 
 std::pair<std::string, std::string>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/test/CMakeLists.txt 
new/ccache-4.4.1/test/CMakeLists.txt
--- old/ccache-4.4/test/CMakeLists.txt  2021-08-19 20:43:30.000000000 +0200
+++ new/ccache-4.4.1/test/CMakeLists.txt        2021-09-11 09:22:10.000000000 
+0200
@@ -25,6 +25,7 @@
 addtest(cache_levels)
 addtest(cleanup)
 addtest(color_diagnostics)
+addtest(config)
 addtest(cpp1)
 addtest(debug_prefix_map)
 addtest(depend)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/test/run new/ccache-4.4.1/test/run
--- old/ccache-4.4/test/run     2021-08-19 20:43:30.000000000 +0200
+++ new/ccache-4.4.1/test/run   2021-09-11 09:22:10.000000000 +0200
@@ -204,18 +204,6 @@
         test_failed_internal "expect_equal_content: $2 missing"
     fi
     if ! cmp -s "$1" "$2"; then
-        test_failed_internal "$1 and $2 differ"
-    fi
-}
-
-expect_equal_text_content() {
-    if [ ! -e "$1" ]; then
-        test_failed_internal "expect_equal_text_content: $1 missing"
-    fi
-    if [ ! -e "$2" ]; then
-        test_failed_internal "expect_equal_text_content: $2 missing"
-    fi
-    if ! cmp -s "$1" "$2"; then
         test_failed_internal "$1 and $2 differ: $(echo; diff -u "$1" "$2")"
     fi
 }
@@ -329,7 +317,7 @@
     local expected=$1
     local pattern=$2
     local dir=$3
-    local actual=`find $dir -type f -name "$pattern" | wc -l`
+    local actual=`find "$dir" -type f -name "$pattern" | wc -l`
     if [ $actual -ne $expected ]; then
         test_failed_internal "Found $actual (expected $expected) $pattern 
files in $dir"
     fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/test/suites/base.bash 
new/ccache-4.4.1/test/suites/base.bash
--- old/ccache-4.4/test/suites/base.bash        2021-08-19 20:43:30.000000000 
+0200
+++ new/ccache-4.4.1/test/suites/base.bash      2021-09-11 09:22:10.000000000 
+0200
@@ -1113,13 +1113,13 @@
     expect_stat preprocessed_cache_hit 0
     expect_stat cache_miss 1
     expect_stat files_in_cache 1
-    expect_equal_text_content reference_stderr.txt stderr.txt
+    expect_equal_content reference_stderr.txt stderr.txt
 
     $CCACHE_COMPILE -Wall -c stderr.c -fsyntax-only 2>stderr.txt
     expect_stat preprocessed_cache_hit 1
     expect_stat cache_miss 1
     expect_stat files_in_cache 1
-    expect_equal_text_content reference_stderr.txt stderr.txt
+    expect_equal_content reference_stderr.txt stderr.txt
 
     # -------------------------------------------------------------------------
     TEST "Empty object file"
@@ -1394,8 +1394,10 @@
 if ! $HOST_OS_WINDOWS; then
     TEST ".incbin"
 
+    touch empty.bin
+
     cat <<EOF >incbin.c
-__asm__(".incbin \"/dev/null\"");
+__asm__(".incbin \"empty.bin\"");
 EOF
 
     $CCACHE_COMPILE -c incbin.c
@@ -1404,7 +1406,7 @@
     expect_stat unsupported_code_directive 1
 
     cat <<EOF >incbin.s
-.incbin "/dev/null";
+.incbin "empty.bin";
 EOF
 
     $CCACHE_COMPILE -c incbin.s
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/test/suites/basedir.bash 
new/ccache-4.4.1/test/suites/basedir.bash
--- old/ccache-4.4/test/suites/basedir.bash     2021-08-19 20:43:30.000000000 
+0200
+++ new/ccache-4.4.1/test/suites/basedir.bash   2021-09-11 09:22:10.000000000 
+0200
@@ -281,7 +281,7 @@
 EOF
     backdate test.h
 
-    pwd=$PWD.real
+    pwd="$(/bin/pwd -P)"
     $REAL_COMPILER -c $pwd/test.c 2>reference.stderr
 
     CCACHE_ABSSTDERR=1 CCACHE_BASEDIR="$pwd" $CCACHE_COMPILE -c $pwd/test.c 
2>ccache.stderr
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/test/suites/config.bash 
new/ccache-4.4.1/test/suites/config.bash
--- old/ccache-4.4/test/suites/config.bash      1970-01-01 01:00:00.000000000 
+0100
+++ new/ccache-4.4.1/test/suites/config.bash    2021-09-11 09:22:10.000000000 
+0200
@@ -0,0 +1,11 @@
+SUITE_config() {
+    # -------------------------------------------------------------------------
+    TEST "Environment origin"
+
+    export CCACHE_MAXSIZE="40"
+
+    $CCACHE --max-size "75"
+    $CCACHE --show-config > config.txt
+
+    expect_contains config.txt "(environment) max_size = 40"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/test/suites/direct.bash 
new/ccache-4.4.1/test/suites/direct.bash
--- old/ccache-4.4/test/suites/direct.bash      2021-08-19 20:43:30.000000000 
+0200
+++ new/ccache-4.4.1/test/suites/direct.bash    2021-09-11 09:22:10.000000000 
+0200
@@ -222,17 +222,17 @@
             $CCACHE_COMPILE -c test.c $dep_args $obj_args
             expect_stat direct_cache_hit 0
             expect_stat cache_miss 1
-            expect_equal_text_content $dep_file.real $dep_file
+            expect_equal_content $dep_file.real $dep_file
 
             # cache hit
             $CCACHE_COMPILE -c test.c $dep_args $obj_args
             expect_stat direct_cache_hit 1
             expect_stat cache_miss 1
-            expect_equal_text_content $dep_file.real $dep_file
+            expect_equal_content $dep_file.real $dep_file
 
             # change object file name
             $CCACHE_COMPILE -c test.c $dep_args -o another.o
-            expect_equal_text_content another.d.real $another_dep_file
+            expect_equal_content another.d.real $another_dep_file
         done
     done
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/test/suites/secondary_file.bash 
new/ccache-4.4.1/test/suites/secondary_file.bash
--- old/ccache-4.4/test/suites/secondary_file.bash      2021-08-19 
20:43:30.000000000 +0200
+++ new/ccache-4.4.1/test/suites/secondary_file.bash    2021-09-11 
09:22:10.000000000 +0200
@@ -245,5 +245,5 @@
     expect_stat primary_storage_miss 4
     expect_stat secondary_storage_hit 2
     expect_stat secondary_storage_miss 2
-    expect_file_count 0
+    expect_file_count 3 '*' secondary # CACHEDIR.TAG + result + manifest
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccache-4.4/unittest/test_Win32Util.cpp 
new/ccache-4.4.1/unittest/test_Win32Util.cpp
--- old/ccache-4.4/unittest/test_Win32Util.cpp  2021-08-19 20:43:30.000000000 
+0200
+++ new/ccache-4.4.1/unittest/test_Win32Util.cpp        2021-09-11 
09:22:10.000000000 +0200
@@ -21,6 +21,8 @@
 
 #include "third_party/doctest.h"
 
+#include <iostream>
+
 TEST_SUITE_BEGIN("Win32Util");
 
 TEST_CASE("Win32Util::argv_to_string")

Reply via email to