Hello community,

here is the log from the commit of package gflags for openSUSE:Factory checked 
in at 2020-08-21 19:08:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gflags (Old)
 and      /work/SRC/openSUSE:Factory/.gflags.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gflags"

Fri Aug 21 19:08:40 2020 rev:3 rq:827762 version:2.2.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/gflags/gflags.changes    2019-09-16 
10:53:19.707149493 +0200
+++ /work/SRC/openSUSE:Factory/.gflags.new.3399/gflags.changes  2020-08-21 
19:09:54.412560450 +0200
@@ -1,0 +2,32 @@
+Sun Aug  9 20:57:54 UTC 2020 - Matthias Eliasson <eli...@opensuse.org>
+
+- Update to version 2.2.2
+  * Fixed 267: Support build with GCC option "-fvisibility=hidden".
+  * Fixed 262: Declare FALGS_no##name variables as static to avoid
+    "previous extern" warning.
+  * Fixed 261: Declare FlagRegisterer c’tor explicit template instanations as
+    extern in header
+  * Fixed 257: Build with _UNICODE support on Windows.
+  * Fixed 233/234/235: Move CMake defines that are unused by Bazel to
+    separate header; makes config.h private again
+  * Fixed 228: Build with recent MinGW versions that define setenv.
+  * Fixed 226: Remove obsolete and unused CleanFileName code
+  * Merged 266: Various PVS Studio and GCC warnings.
+  * Merged 258: Fix build with some Clang variants that define "restrict"
+    macro.
+  * Merged 252: Update documentation on how to use Bazel.
+  * Merged 249: Use "_debug" postfix for debug libraries. 
+  * Merged 247: CMake "project" VERSION; no enable_testing(); "gflags::"
+    import target prefix.
+  * Merged 246: Add Bazel-on-Windows support.
+  * Merged 239: Use GFLAGS_NAMESPACE instead of "gflags" in test executable.
+  * Merged 237: Removed unused functions; fixes compilation with -Werror
+    compiler option.
+  * Merged 232: Fix typo in Bazel's BUILD definition
+  * Merged 230: Remove using ::fLS::clstring.
+  * Merged 221: Add convenience 'uninstall' target
+- Run spec-cleaner
+  * Remove package groups
+  * Use make macros
+
+-------------------------------------------------------------------

Old:
----
  gflags-2.2.1.tar.gz

New:
----
  gflags-2.2.2.tar.gz

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

Other differences:
------------------
++++++ gflags.spec ++++++
--- /var/tmp/diff_new_pack.eJ80tB/_old  2020-08-21 19:09:56.904561930 +0200
+++ /var/tmp/diff_new_pack.eJ80tB/_new  2020-08-21 19:09:56.912561935 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package gflags
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,11 +17,10 @@
 
 
 Name:           gflags
-Version:        2.2.1
+Version:        2.2.2
 Release:        0
 Summary:        Library for commandline flag processing
 License:        BSD-3-Clause
-Group:          Development/Libraries/C and C++
 URL:            https://github.com/gflags/gflags
 Source0:        
https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 BuildRequires:  cmake
@@ -38,7 +37,6 @@
 
 %package -n libgflags2
 Summary:        Library for commandline flag processing
-Group:          System/Libraries
 
 %description -n libgflags2
 The gflags package contains a library that implements commandline
@@ -49,7 +47,6 @@
 
 %package devel
 Summary:        Development files for gflags library
-Group:          Development/Libraries/C and C++
 Requires:       libgflags2 = %{version}
 
 %description devel
@@ -57,7 +54,6 @@
 
 %package devel-static
 Summary:        Statically linked development libraries for gflags
-Group:          Development/Libraries/C and C++
 Requires:       %{name}-devel = %{version}
 
 %description devel-static
@@ -77,7 +73,7 @@
        -DBUILD_TESTING:BOOL=ON \
        -DCMAKE_BUILD_TYPE=Release
 
-make %{?_smp_mflags} VERBOSE=1
+%make_build
 
 %install
 %cmake_install

++++++ gflags-2.2.1.tar.gz -> gflags-2.2.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/.gitignore new/gflags-2.2.2/.gitignore
--- old/gflags-2.2.1/.gitignore 2017-07-11 19:30:34.000000000 +0200
+++ new/gflags-2.2.2/.gitignore 2018-11-11 22:21:00.000000000 +0100
@@ -2,6 +2,7 @@
 /build/
 /builds/
 /build-*/
+/_build/
 .DS_Store
 CMakeCache.txt
 DartConfiguration.tcl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/BUILD new/gflags-2.2.2/BUILD
--- old/gflags-2.2.1/BUILD      2017-07-11 19:30:34.000000000 +0200
+++ new/gflags-2.2.2/BUILD      2018-11-11 22:21:00.000000000 +0100
@@ -4,9 +4,15 @@
 
 licenses(["notice"])
 
-exports_files(["src/gflags_complections.sh", "COPYING.txt"])
+exports_files(["src/gflags_completions.sh", "COPYING.txt"])
+
+config_setting(
+    name = "x64_windows",
+    values = {"cpu": "x64_windows"},
+)
 
 load(":bazel/gflags.bzl", "gflags_sources", "gflags_library")
+
 (hdrs, srcs) = gflags_sources(namespace=["gflags", "google"])
 gflags_library(hdrs=hdrs, srcs=srcs, threads=0)
 gflags_library(hdrs=hdrs, srcs=srcs, threads=1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/CMakeLists.txt 
new/gflags-2.2.2/CMakeLists.txt
--- old/gflags-2.2.1/CMakeLists.txt     2017-07-11 19:30:34.000000000 +0200
+++ new/gflags-2.2.2/CMakeLists.txt     2018-11-11 22:21:00.000000000 +0100
@@ -14,9 +14,9 @@
 ##
 ## When this project is a subproject (GFLAGS_IS_SUBPROJECT is TRUE), the 
default
 ## settings are such that only the static single-threaded library is built 
without
-## installation of the gflags files. The "gflags" target is in this case an 
ALIAS
+## installation of the gflags files. The "gflags::gflags" target is in this 
case an ALIAS
 ## library target for the "gflags_nothreads_static" library target. Targets 
which
-## depend on the gflags library should link to the "gflags" library target.
+## depend on the gflags library should link to the "gflags::gflags" library 
target.
 ##
 ## Example CMakeLists.txt of user project which requires separate gflags 
installation:
 ##   cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
@@ -26,7 +26,7 @@
 ##   find_package(gflags REQUIRED)
 ##
 ##   add_executable(foo src/foo.cc)
-##   target_link_libraries(foo gflags)
+##   target_link_libraries(foo gflags::gflags)
 ##
 ## Example CMakeLists.txt of user project which requires separate 
single-threaded static gflags installation:
 ##   cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
@@ -36,7 +36,7 @@
 ##   find_package(gflags COMPONENTS nothreads_static)
 ##
 ##   add_executable(foo src/foo.cc)
-##   target_link_libraries(foo gflags)
+##   target_link_libraries(foo gflags::gflags)
 ##
 ## Example CMakeLists.txt of super-project which contains gflags source tree:
 ##   cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
@@ -46,7 +46,7 @@
 ##   add_subdirectory(gflags)
 ##
 ##   add_executable(foo src/foo.cc)
-##   target_link_libraries(foo gflags)
+##   target_link_libraries(foo gflags::gflags)
 ##
 ## Variables to configure the source files:
 ## - GFLAGS_IS_A_DLL
@@ -70,12 +70,16 @@
 ## - GFLAGS_INSTALL_SHARED_LIBS
 ## - GFLAGS_INSTALL_STATIC_LIBS
 
-cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
+cmake_minimum_required (VERSION 3.0.2 FATAL_ERROR)
 
 if (POLICY CMP0042)
   cmake_policy (SET CMP0042 NEW)
 endif ()
 
+if (POLICY CMP0048)
+  cmake_policy (SET CMP0048 NEW)
+endif ()
+
 # ----------------------------------------------------------------------------
 # includes
 include ("${CMAKE_CURRENT_SOURCE_DIR}/cmake/utils.cmake")
@@ -83,14 +87,14 @@
 # ----------------------------------------------------------------------------
 # package information
 set (PACKAGE_NAME        "gflags")
-set (PACKAGE_VERSION     "2.2.1")
+set (PACKAGE_VERSION     "2.2.2")
 set (PACKAGE_STRING      "${PACKAGE_NAME} ${PACKAGE_VERSION}")
 set (PACKAGE_TARNAME     "${PACKAGE_NAME}-${PACKAGE_VERSION}")
 set (PACKAGE_BUGREPORT   "https://github.com/gflags/gflags/issues";)
 set (PACKAGE_DESCRIPTION "A commandline flags library that allows for 
distributed flags.")
 set (PACKAGE_URL         "http://gflags.github.io/gflags";)
 
-project (${PACKAGE_NAME} CXX)
+project (${PACKAGE_NAME} VERSION ${PACKAGE_VERSION} LANGUAGES CXX)
 if (CMAKE_VERSION VERSION_LESS 3.4)
   # C language still needed because the following required CMake modules
   # (or their dependencies, respectively) are not correctly handling
@@ -352,6 +356,7 @@
 endif ()
 
 set (PRIVATE_HDRS
+  "defines.h"
   "config.h"
   "util.h"
   "mutex.h"
@@ -402,6 +407,9 @@
   set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "lib")
   set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "lib")
 endif ()
+# Set postfixes for generated libraries based on buildtype.
+set(CMAKE_RELEASE_POSTFIX "")
+set(CMAKE_DEBUG_POSTFIX "_debug")
 
 # ----------------------------------------------------------------------------
 # installation directories
@@ -490,11 +498,15 @@
   foreach (type IN ITEMS static shared)
     foreach (opts IN ITEMS "_nothreads" "")
       if (TARGET gflags${opts}_${type})
+        # Define "gflags" alias for super-projects treating targets of this 
library as part of their own project
+        # (also for backwards compatibility with gflags 2.2.1 which only 
defined this alias)
         add_library (gflags ALIAS gflags${opts}_${type})
+        # Define "gflags::gflags" alias for projects that support both 
find_package(gflags) and add_subdirectory(gflags)
+        add_library (gflags::gflags ALIAS gflags${opts}_${type})
         break ()
       endif ()
     endforeach ()
-    if (TARGET gflags)
+    if (TARGET gflags::gflags)
        break ()
     endif ()
   endforeach ()
@@ -514,7 +526,8 @@
                EXPORT ${EXPORT_NAME}
                RUNTIME DESTINATION ${RUNTIME_INSTALL_DIR}
                LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR}
-               ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR})
+               ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR}
+      )
     endif ()
   endforeach ()
 endif ()
@@ -525,7 +538,8 @@
                EXPORT ${EXPORT_NAME}
                RUNTIME DESTINATION ${RUNTIME_INSTALL_DIR}
                LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR}
-               ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR})
+               ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR}
+      )
     endif ()
   endforeach ()
 endif ()
@@ -541,7 +555,16 @@
     FILES "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config-version.cmake"
     DESTINATION ${CONFIG_INSTALL_DIR}
   )
-  install (EXPORT ${EXPORT_NAME} DESTINATION ${CONFIG_INSTALL_DIR})
+  install (
+    EXPORT ${EXPORT_NAME}
+    NAMESPACE ${PACKAGE_NAME}::
+    DESTINATION ${CONFIG_INSTALL_DIR}
+  )
+  install (
+    EXPORT ${EXPORT_NAME}
+    FILE ${PACKAGE_NAME}-nonamespace-targets.cmake
+    DESTINATION ${CONFIG_INSTALL_DIR}
+  )
   if (UNIX)
     install (PROGRAMS src/gflags_completions.sh DESTINATION 
${RUNTIME_INSTALL_DIR})
   endif ()
@@ -555,7 +578,15 @@
 # ----------------------------------------------------------------------------
 # support direct use of build tree
 set (INSTALL_PREFIX_REL2CONFIG_DIR .)
-export (TARGETS ${TARGETS} FILE "${PROJECT_BINARY_DIR}/${EXPORT_NAME}.cmake")
+export (
+  TARGETS ${TARGETS}
+  NAMESPACE ${PACKAGE_NAME}::
+  FILE "${PROJECT_BINARY_DIR}/${EXPORT_NAME}.cmake"
+)
+export (
+  TARGETS ${TARGETS}
+  FILE "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-nonamespace-targets.cmake"
+)
 if (REGISTER_BUILD_DIR)
   export (PACKAGE ${PACKAGE_NAME})
 endif ()
@@ -568,7 +599,6 @@
 # testing - MUST follow the generation of the build tree config file
 if (BUILD_TESTING)
   include (CTest)
-  enable_testing ()
   add_subdirectory (test)
 endif ()
 
@@ -588,7 +618,8 @@
                      "\n  BUILD_STATIC_LIBS=ON"
                      "\n  INSTALL_HEADERS=ON"
                      "\n  INSTALL_SHARED_LIBS=ON"
-                     "\n  INSTALL_STATIC_LIBS=ON")
+                     "\n  INSTALL_STATIC_LIBS=ON"
+    )
   endif ()
 
   # default package generators
@@ -700,3 +731,11 @@
   include (CPack)
 
 endif () # BUILD_PACKAGING
+
+if (NOT GFLAGS_IS_SUBPROJECT AND NOT TARGET uninstall)
+  configure_file (
+    "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
+    "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" @ONLY
+  )
+  add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P 
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
+endif ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/ChangeLog.txt 
new/gflags-2.2.2/ChangeLog.txt
--- old/gflags-2.2.1/ChangeLog.txt      2017-07-11 19:30:34.000000000 +0200
+++ new/gflags-2.2.2/ChangeLog.txt      2018-11-11 22:21:00.000000000 +0100
@@ -1,3 +1,25 @@
+* Sun Nov 11 2018 - Andreas Schuh <andreas.schuh...@gmail.com>
+
+- gflags: version 2.2.2
+Fixed 267: Support build with GCC option "-fvisibility=hidden".
+Fixed 262: Declare FALGS_no##name variables as static to avoid "previous 
extern" warning.
+Fixed 261: Declare FlagRegisterer c’tor explicit template instanations as 
extern in header
+Fixed 257: Build with _UNICODE support on Windows.
+Fixed 233/234/235: Move CMake defines that are unused by Bazel to separate 
header; makes config.h private again
+Fixed 228: Build with recent MinGW versions that define setenv.
+Fixed 226: Remove obsolete and unused CleanFileName code
+Merged 266: Various PVS Studio and GCC warnings.
+Merged 258: Fix build with some Clang variants that define "restrict" macro.
+Merged 252: Update documentation on how to use Bazel.
+Merged 249: Use "_debug" postfix for debug libraries. 
+Merged 247: CMake "project" VERSION; no enable_testing(); "gflags::" import 
target prefix.
+Merged 246: Add Bazel-on-Windows support.
+Merged 239: Use GFLAGS_NAMESPACE instead of "gflags" in test executable.
+Merged 237: Removed unused functions; fixes compilation with -Werror compiler 
option.
+Merged 232: Fix typo in Bazel's BUILD definition
+Merged 230: Remove using ::fLS::clstring.
+Merged 221: Add convenience 'uninstall' target
+
 * Tue Jul 11 2017 - Andreas Schuh <andreas.schuh...@gmail.com>
 
 - gflags: version 2.2.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/INSTALL.md new/gflags-2.2.2/INSTALL.md
--- old/gflags-2.2.1/INSTALL.md 2017-07-11 19:30:34.000000000 +0200
+++ new/gflags-2.2.2/INSTALL.md 2018-11-11 22:21:00.000000000 +0100
@@ -78,11 +78,6 @@
         remote = "https://github.com/gflags/gflags.git";,
     )
 
-    bind(
-        name = "gflags",
-        actual = "@com_github_gflags_gflags//:gflags",
-    )
-
-You can then add `//external:gflags` to the `deps` section of a `cc_binary` or
-`cc_library` rule, and `#include <gflags/gflags.h>` to include it in your 
source
-code.
+You can then add `@com_github_gflags_gflags//:gflags` to the `deps` section of 
a
+`cc_binary` or `cc_library` rule, and `#include <gflags/gflags.h>` to include 
it
+in your source code.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/README.md new/gflags-2.2.2/README.md
--- old/gflags-2.2.1/README.md  2017-07-11 19:30:34.000000000 +0200
+++ new/gflags-2.2.2/README.md  2018-11-11 22:21:00.000000000 +0100
@@ -3,6 +3,21 @@
 
 The documentation of the gflags library is available online at 
https://gflags.github.io/gflags/.
 
+
+11 November 2018
+----------------
+
+I've just released gflags 2.2.2.
+
+This maintenance release improves lives of Bazel users (no more "config.h" 
leaking into global include paths),
+fixes build with recent MinGW versions, and silences a number of static code 
analyzer and compiler warnings.
+The build targets exported by the CMake configuration of this library are now 
also prefixed by the package
+name "gflags::" following a more recent (unwritten) CMake convention. The 
unprefixed target names are still
+supported to avoid that dependent projects have to be modified due to this 
change in imported target names.
+
+Please report any further issues with this release using the GitHub issue 
tracker.
+
+
 11 July 2017
 ------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/bazel/gflags.bzl 
new/gflags-2.2.2/bazel/gflags.bzl
--- old/gflags-2.2.1/bazel/gflags.bzl   2017-07-11 19:30:34.000000000 +0200
+++ new/gflags-2.2.2/bazel/gflags.bzl   2018-11-11 22:21:00.000000000 +0100
@@ -2,15 +2,9 @@
 # Add native rules to configure source files
 def gflags_sources(namespace=["google", "gflags"]):
     native.genrule(
-        name = "config_h",
-        srcs = ["src/config.h.in"],
-        outs = ["config.h"],
-        cmd  = "awk '{ gsub(/^#cmakedefine/, \"//cmakedefine\"); print; }' 
$(<) > $(@)"
-    )
-    native.genrule(
         name = "gflags_declare_h",
         srcs = ["src/gflags_declare.h.in"],
-        outs = ["include/gflags/gflags_declare.h"],
+        outs = ["gflags_declare.h"],
         cmd  = ("awk '{ " +
                 "gsub(/@GFLAGS_NAMESPACE@/, \"" + namespace[0] + "\"); " +
                 
"gsub(/@(HAVE_STDINT_H|HAVE_SYS_TYPES_H|HAVE_INTTYPES_H|GFLAGS_INTTYPES_FORMAT_C99)@/,
 \"1\"); " +
@@ -23,7 +17,7 @@
         native.genrule(
             name = gflags_ns_h_file.replace('.', '_'),
             srcs = ["src/gflags_ns.h.in"],
-            outs = ["include/gflags/" + gflags_ns_h_file],
+            outs = [gflags_ns_h_file],
             cmd  = ("awk '{ " +
                     "gsub(/@ns@/, \"" + ns + "\"); " +
                     "gsub(/@NS@/, \"" + ns.upper() + "\"); " +
@@ -33,7 +27,7 @@
     native.genrule(
         name = "gflags_h",
         srcs = ["src/gflags.h.in"],
-        outs = ["include/gflags/gflags.h"],
+        outs = ["gflags.h"],
         cmd  = ("awk '{ " +
                 "gsub(/@GFLAGS_ATTRIBUTE_UNUSED@/, \"\"); " +
                 "gsub(/@INCLUDE_GFLAGS_NS_H@/, \"" + '\n'.join(["#include 
\\\"gflags/{}\\\"".format(hdr) for hdr in gflags_ns_h_files]) + "\"); " +
@@ -42,19 +36,25 @@
     native.genrule(
         name = "gflags_completions_h",
         srcs = ["src/gflags_completions.h.in"],
-        outs = ["include/gflags/gflags_completions.h"],
+        outs = ["gflags_completions.h"],
         cmd  = "awk '{ gsub(/@GFLAGS_NAMESPACE@/, \"" + namespace[0] + "\"); 
print; }' $(<) > $(@)"
     )
     hdrs = [":gflags_h", ":gflags_declare_h", ":gflags_completions_h"]
     hdrs.extend([':' + hdr.replace('.', '_') for hdr in gflags_ns_h_files])
     srcs = [
-        ":config_h",
+        "src/config.h",
         "src/gflags.cc",
         "src/gflags_completions.cc",
         "src/gflags_reporting.cc",
         "src/mutex.h",
-        "src/util.h"
-    ]
+        "src/util.h",
+    ] + select({
+        "//:x64_windows": [
+            "src/windows_port.cc",
+            "src/windows_port.h",
+        ],
+        "//conditions:default": [],
+    })
     return [hdrs, srcs]
 
 # 
------------------------------------------------------------------------------
@@ -62,31 +62,42 @@
 def gflags_library(hdrs=[], srcs=[], threads=1):
     name = "gflags"
     copts = [
+        "-DGFLAGS_BAZEL_BUILD",
+        "-DGFLAGS_INTTYPES_FORMAT_C99",
+        "-DGFLAGS_IS_A_DLL=0",
+        # macros otherwise defined by CMake configured defines.h file
         "-DHAVE_STDINT_H",
         "-DHAVE_SYS_TYPES_H",
         "-DHAVE_INTTYPES_H",
         "-DHAVE_SYS_STAT_H",
-        "-DHAVE_UNISTD_H",
-        "-DHAVE_FNMATCH_H",
         "-DHAVE_STRTOLL",
         "-DHAVE_STRTOQ",
-        "-DHAVE_PTHREAD",
         "-DHAVE_RWLOCK",
-        "-DGFLAGS_INTTYPES_FORMAT_C99",
-        "-DGFLAGS_IS_A_DLL=0",
-    ]
+    ] + select({
+        "//:x64_windows": [
+            "-DOS_WINDOWS",
+        ],
+        "//conditions:default": [
+            "-DHAVE_UNISTD_H",
+            "-DHAVE_FNMATCH_H",
+            "-DHAVE_PTHREAD",
+        ],
+    })
     linkopts = []
     if threads:
-        linkopts.append("-lpthread")
+        linkopts += select({
+            "//:x64_windows": [],
+            "//conditions:default": ["-lpthread"],
+        })
     else:
         name += "_nothreads"
-        copts.append("-DNO_THREADS")
+        copts += ["-DNO_THREADS"]
     native.cc_library(
         name       = name,
         hdrs       = hdrs,
         srcs       = srcs,
-        includes   = ["include/"],
         copts      = copts,
         linkopts   = linkopts,
-        visibility = ["//visibility:public"]
+        visibility = ["//visibility:public"],
+        include_prefix = 'gflags'
     )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/cmake/cmake_uninstall.cmake.in 
new/gflags-2.2.2/cmake/cmake_uninstall.cmake.in
--- old/gflags-2.2.1/cmake/cmake_uninstall.cmake.in     1970-01-01 
01:00:00.000000000 +0100
+++ new/gflags-2.2.2/cmake/cmake_uninstall.cmake.in     2018-11-11 
22:21:00.000000000 +0100
@@ -0,0 +1,26 @@
+if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+  message(FATAL_ERROR "Cannot find install manifest: 
@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+
+if (NOT DEFINED CMAKE_INSTALL_PREFIX)
+  set (CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
+endif ()
+ message(${CMAKE_INSTALL_PREFIX})
+
+file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
+string(REGEX REPLACE "\n" ";" files "${files}")
+foreach(file ${files})
+  message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
+  if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
+    exec_program(
+      "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
+      OUTPUT_VARIABLE rm_out
+      RETURN_VALUE rm_retval
+      )
+    if(NOT "${rm_retval}" STREQUAL 0)
+      message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
+    endif(NOT "${rm_retval}" STREQUAL 0)
+  else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
+    message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
+  endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
+endforeach(file)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/cmake/config.cmake.in 
new/gflags-2.2.2/cmake/config.cmake.in
--- old/gflags-2.2.1/cmake/config.cmake.in      2017-07-11 19:30:34.000000000 
+0200
+++ new/gflags-2.2.2/cmake/config.cmake.in      2018-11-11 22:21:00.000000000 
+0100
@@ -7,7 +7,21 @@
 set (@PACKAGE_PREFIX@_VERSION_PATCH  @PACKAGE_VERSION_PATCH@)
 
 # import targets
-include ("${CMAKE_CURRENT_LIST_DIR}/@EXPORT_NAME@.cmake")
+if (NOT DEFINED @PACKAGE_PREFIX@_USE_TARGET_NAMESPACE)
+  set (@PACKAGE_PREFIX@_USE_TARGET_NAMESPACE FALSE)
+endif ()
+if (@PACKAGE_PREFIX@_USE_TARGET_NAMESPACE)
+  include ("${CMAKE_CURRENT_LIST_DIR}/@EXPORT_NAME@.cmake")
+  set (@PACKAGE_PREFIX@_TARGET_NAMESPACE @PACKAGE_NAME@)
+else ()
+  include 
("${CMAKE_CURRENT_LIST_DIR}/@PACKAGE_NAME@-nonamespace-targets.cmake")
+  set (@PACKAGE_PREFIX@_TARGET_NAMESPACE)
+endif ()
+if (@PACKAGE_PREFIX@_TARGET_NAMESPACE)
+  set (@PACKAGE_PREFIX@_TARGET_PREFIX ${@PACKAGE_PREFIX@_TARGET_NAMESPACE}::)
+else ()
+  set (@PACKAGE_PREFIX@_TARGET_PREFIX)
+endif ()
 
 # installation prefix
 get_filename_component (CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" 
PATH)
@@ -49,7 +63,7 @@
     else ()
       set (@PACKAGE_PREFIX@_SHARED FALSE)
     endif ()
-  elseif (TARGET @PACKAGE_NAME@_shared OR TARGET 
@PACKAGE_NAME@_nothreads_shared)
+  elseif (TARGET ${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@_shared OR 
TARGET ${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@_nothreads_shared)
     set (@PACKAGE_PREFIX@_SHARED TRUE)
   else ()
     set (@PACKAGE_PREFIX@_SHARED FALSE)
@@ -64,7 +78,7 @@
     else ()
       set (@PACKAGE_PREFIX@_NOTHREADS FALSE)
     endif ()
-  elseif (TARGET @PACKAGE_NAME@_static OR TARGET @PACKAGE_NAME@_shared)
+  elseif (TARGET ${@PACKAGE_PREFIX@_TARGET_PREFIX}PACKAGE_NAME@_static OR 
TARGET ${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@_shared)
     set (@PACKAGE_PREFIX@_NOTHREADS FALSE)
   else ()
     set (@PACKAGE_PREFIX@_NOTHREADS TRUE)
@@ -77,15 +91,15 @@
     set (@PACKAGE_PREFIX@_TARGET ${@PACKAGE_NAME@_TARGET})
   elseif (@PACKAGE_PREFIX@_SHARED)
     if (@PACKAGE_PREFIX@_NOTHREADS)
-      set (@PACKAGE_PREFIX@_TARGET @PACKAGE_NAME@_nothreads_shared)
+      set (@PACKAGE_PREFIX@_TARGET 
${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@_nothreads_shared)
     else ()
-      set (@PACKAGE_PREFIX@_TARGET @PACKAGE_NAME@_shared)
+      set (@PACKAGE_PREFIX@_TARGET 
${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@_shared)
     endif ()
   else ()
     if (@PACKAGE_PREFIX@_NOTHREADS)
-      set (@PACKAGE_PREFIX@_TARGET @PACKAGE_NAME@_nothreads_static)
+      set (@PACKAGE_PREFIX@_TARGET 
${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@_nothreads_static)
     else ()
-      set (@PACKAGE_PREFIX@_TARGET @PACKAGE_NAME@_static)
+      set (@PACKAGE_PREFIX@_TARGET 
${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@_static)
     endif ()
   endif ()
 endif ()
@@ -94,12 +108,12 @@
                        " Try a different combination of 
@PACKAGE_PREFIX@_SHARED and @PACKAGE_PREFIX@_NOTHREADS.")
 endif ()
 
-# add more convenient "@PACKAGE_NAME@" import target
-if (NOT TARGET @PACKAGE_NAME@)
+# add more convenient "${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@" import 
target
+if (NOT TARGET ${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@)
   if (@PACKAGE_PREFIX@_SHARED)
-    add_library (@PACKAGE_NAME@ SHARED IMPORTED)
+    add_library (${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@ SHARED 
IMPORTED)
   else ()
-    add_library (@PACKAGE_NAME@ STATIC IMPORTED)
+    add_library (${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@ STATIC 
IMPORTED)
   endif ()
   # copy INTERFACE_* properties
   foreach (_@PACKAGE_PREFIX@_PROPERTY_NAME IN ITEMS
@@ -112,20 +126,20 @@
   )
     get_target_property (_@PACKAGE_PREFIX@_PROPERTY_VALUE 
${@PACKAGE_PREFIX@_TARGET} INTERFACE_${_@PACKAGE_PREFIX@_PROPERTY_NAME})
     if (_@PACKAGE_PREFIX@_PROPERTY_VALUE)
-      set_target_properties(@PACKAGE_NAME@ PROPERTIES
+      set_target_properties(${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@ 
PROPERTIES
         INTERFACE_${_@PACKAGE_PREFIX@_PROPERTY_NAME} 
"${_@PACKAGE_PREFIX@_PROPERTY_VALUE}"
       )
     endif ()
   endforeach ()
   # copy IMPORTED_*_<CONFIG> properties
   get_target_property (_@PACKAGE_PREFIX@_CONFIGURATIONS 
${@PACKAGE_PREFIX@_TARGET} IMPORTED_CONFIGURATIONS)
-  set_target_properties (@PACKAGE_NAME@ PROPERTIES IMPORTED_CONFIGURATIONS 
"${_@PACKAGE_PREFIX@_CONFIGURATIONS}")
+  set_target_properties (${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@ 
PROPERTIES IMPORTED_CONFIGURATIONS "${_@PACKAGE_PREFIX@_CONFIGURATIONS}")
   foreach (_@PACKAGE_PREFIX@_PROPERTY_NAME IN ITEMS
     IMPLIB
     LOCATION
     LINK_DEPENDENT_LIBRARIES
     LINK_INTERFACE_LIBRARIES
-    LINK_INTERFACE_LANGUAGES 
+    LINK_INTERFACE_LANGUAGES
     LINK_INTERFACE_MULTIPLICITY
     NO_SONAME
     SONAME
@@ -133,7 +147,7 @@
     foreach (_@PACKAGE_PREFIX@_CONFIG IN LISTS 
_@PACKAGE_PREFIX@_CONFIGURATIONS)
       get_target_property (_@PACKAGE_PREFIX@_PROPERTY_VALUE 
${@PACKAGE_PREFIX@_TARGET} 
IMPORTED_${_@PACKAGE_PREFIX@_PROPERTY_NAME}_${_@PACKAGE_PREFIX@_CONFIG})
       if (_@PACKAGE_PREFIX@_PROPERTY_VALUE)
-        set_target_properties(@PACKAGE_NAME@ PROPERTIES
+        set_target_properties(${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@ 
PROPERTIES
           
IMPORTED_${_@PACKAGE_PREFIX@_PROPERTY_NAME}_${_@PACKAGE_PREFIX@_CONFIG} 
"${_@PACKAGE_PREFIX@_PROPERTY_VALUE}"
         )
       endif ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/src/config.h 
new/gflags-2.2.2/src/config.h
--- old/gflags-2.2.1/src/config.h       1970-01-01 01:00:00.000000000 +0100
+++ new/gflags-2.2.2/src/config.h       2018-11-11 22:21:00.000000000 +0100
@@ -0,0 +1,59 @@
+// Note: This header file is only used internally. It is not part of public 
interface!
+
+#ifndef GFLAGS_CONFIG_H_
+#define GFLAGS_CONFIG_H_
+
+
+// ---------------------------------------------------------------------------
+// System checks
+
+// CMake build configuration is written to defines.h file, unused by Bazel 
build
+#if !defined(GFLAGS_BAZEL_BUILD)
+#  include "defines.h"
+#endif
+
+// gcc requires this to get PRId64, etc.
+#if defined(HAVE_INTTYPES_H) && !defined(__STDC_FORMAT_MACROS)
+#  define __STDC_FORMAT_MACROS 1
+#endif
+
+// ---------------------------------------------------------------------------
+// Path separator
+#ifndef PATH_SEPARATOR
+#  ifdef OS_WINDOWS
+#    define PATH_SEPARATOR  '\\'
+#  else
+#    define PATH_SEPARATOR  '/'
+#  endif
+#endif
+
+// ---------------------------------------------------------------------------
+// Windows
+
+// Always export symbols when compiling a shared library as this file is only
+// included by internal modules when building the gflags library itself.
+// The gflags_declare.h header file will set it to import these symbols 
otherwise.
+#ifndef GFLAGS_DLL_DECL
+#  if GFLAGS_IS_A_DLL && defined(_MSC_VER)
+#    define GFLAGS_DLL_DECL __declspec(dllexport)
+#  elif defined(__GNUC__) && __GNUC__ >= 4
+#    define GFLAGS_DLL_DECL __attribute__((visibility("default")))
+#  else
+#    define GFLAGS_DLL_DECL
+#  endif
+#endif
+// Flags defined by the gflags library itself must be exported
+#ifndef GFLAGS_DLL_DEFINE_FLAG
+#  define GFLAGS_DLL_DEFINE_FLAG GFLAGS_DLL_DECL
+#endif
+
+#ifdef OS_WINDOWS
+// The unittests import the symbols of the shared gflags library
+#  if GFLAGS_IS_A_DLL && defined(_MSC_VER)
+#    define GFLAGS_DLL_DECL_FOR_UNITTESTS __declspec(dllimport)
+#  endif
+#  include "windows_port.h"
+#endif
+
+
+#endif // GFLAGS_CONFIG_H_
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/src/config.h.in 
new/gflags-2.2.2/src/config.h.in
--- old/gflags-2.2.1/src/config.h.in    2017-07-11 19:30:34.000000000 +0200
+++ new/gflags-2.2.2/src/config.h.in    1970-01-01 01:00:00.000000000 +0100
@@ -1,114 +0,0 @@
-/* Generated from config.h.in during build configuration using CMake. */
-
-// Note: This header file is only used internally. It is not part of public 
interface!
-
-#ifndef GFLAGS_CONFIG_H_
-#define GFLAGS_CONFIG_H_
-
-
-// ---------------------------------------------------------------------------
-// System checks
-
-// Define if you build this library for a MS Windows OS.
-#cmakedefine OS_WINDOWS
-
-// Define if you have the <stdint.h> header file.
-#cmakedefine HAVE_STDINT_H
-
-// Define if you have the <sys/types.h> header file.
-#cmakedefine HAVE_SYS_TYPES_H
-
-// Define if you have the <inttypes.h> header file.
-#cmakedefine HAVE_INTTYPES_H
-
-// Define if you have the <sys/stat.h> header file.
-#cmakedefine HAVE_SYS_STAT_H
-
-// Define if you have the <unistd.h> header file.
-#cmakedefine HAVE_UNISTD_H
-
-// Define if you have the <fnmatch.h> header file.
-#cmakedefine HAVE_FNMATCH_H
-
-// Define if you have the <shlwapi.h> header file (Windows 2000/XP).
-#cmakedefine HAVE_SHLWAPI_H
-
-// Define if you have the strtoll function.
-#cmakedefine HAVE_STRTOLL
-
-// Define if you have the strtoq function.
-#cmakedefine HAVE_STRTOQ
-
-// Define if you have the <pthread.h> header file.
-#cmakedefine HAVE_PTHREAD
-
-// Define if your pthread library defines the type pthread_rwlock_t
-#cmakedefine HAVE_RWLOCK
-
-// gcc requires this to get PRId64, etc.
-#if defined(HAVE_INTTYPES_H) && !defined(__STDC_FORMAT_MACROS)
-#  define __STDC_FORMAT_MACROS 1
-#endif
-
-// ---------------------------------------------------------------------------
-// Package information
-
-// Name of package.
-#define PACKAGE @PROJECT_NAME@
-
-// Define to the full name of this package.
-#define PACKAGE_NAME @PACKAGE_NAME@
-
-// Define to the full name and version of this package.
-#define PACKAGE_STRING @PACKAGE_STRING@
-
-// Define to the one symbol short name of this package.
-#define PACKAGE_TARNAME @PACKAGE_TARNAME@
-
-// Define to the version of this package.
-#define PACKAGE_VERSION @PACKAGE_VERSION@
-
-// Version number of package.
-#define VERSION PACKAGE_VERSION
-
-// Define to the address where bug reports for this package should be sent.
-#define PACKAGE_BUGREPORT @PACKAGE_BUGREPORT@
-
-// ---------------------------------------------------------------------------
-// Path separator
-#ifndef PATH_SEPARATOR
-#  ifdef OS_WINDOWS
-#    define PATH_SEPARATOR  '\\'
-#  else
-#    define PATH_SEPARATOR  '/'
-#  endif
-#endif
-
-// ---------------------------------------------------------------------------
-// Windows
-
-// Always export symbols when compiling a shared library as this file is only
-// included by internal modules when building the gflags library itself.
-// The gflags_declare.h header file will set it to import these symbols 
otherwise.
-#ifndef GFLAGS_DLL_DECL
-#  if GFLAGS_IS_A_DLL && defined(_MSC_VER)
-#    define GFLAGS_DLL_DECL __declspec(dllexport)
-#  else
-#    define GFLAGS_DLL_DECL
-#  endif
-#endif
-// Flags defined by the gflags library itself must be exported
-#ifndef GFLAGS_DLL_DEFINE_FLAG
-#  define GFLAGS_DLL_DEFINE_FLAG GFLAGS_DLL_DECL
-#endif
-
-#ifdef OS_WINDOWS
-// The unittests import the symbols of the shared gflags library
-#  if GFLAGS_IS_A_DLL && defined(_MSC_VER)
-#    define GFLAGS_DLL_DECL_FOR_UNITTESTS __declspec(dllimport)
-#  endif
-#  include "windows_port.h"
-#endif
-
-
-#endif // GFLAGS_CONFIG_H_
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/src/defines.h.in 
new/gflags-2.2.2/src/defines.h.in
--- old/gflags-2.2.1/src/defines.h.in   1970-01-01 01:00:00.000000000 +0100
+++ new/gflags-2.2.2/src/defines.h.in   2018-11-11 22:21:00.000000000 +0100
@@ -0,0 +1,48 @@
+/* Generated from defines.h.in during build configuration using CMake. */
+
+// Note: This header file is only used internally. It is not part of public 
interface!
+//       Any cmakedefine is defined using the -D flag instead when Bazel is 
used.
+//       For Bazel, this file is thus not used to avoid a private file in 
$(GENDIR).
+
+#ifndef GFLAGS_DEFINES_H_
+#define GFLAGS_DEFINES_H_
+
+
+// Define if you build this library for a MS Windows OS.
+#cmakedefine OS_WINDOWS
+
+// Define if you have the <stdint.h> header file.
+#cmakedefine HAVE_STDINT_H
+
+// Define if you have the <sys/types.h> header file.
+#cmakedefine HAVE_SYS_TYPES_H
+
+// Define if you have the <inttypes.h> header file.
+#cmakedefine HAVE_INTTYPES_H
+
+// Define if you have the <sys/stat.h> header file.
+#cmakedefine HAVE_SYS_STAT_H
+
+// Define if you have the <unistd.h> header file.
+#cmakedefine HAVE_UNISTD_H
+
+// Define if you have the <fnmatch.h> header file.
+#cmakedefine HAVE_FNMATCH_H
+
+// Define if you have the <shlwapi.h> header file (Windows 2000/XP).
+#cmakedefine HAVE_SHLWAPI_H
+
+// Define if you have the strtoll function.
+#cmakedefine HAVE_STRTOLL
+
+// Define if you have the strtoq function.
+#cmakedefine HAVE_STRTOQ
+
+// Define if you have the <pthread.h> header file.
+#cmakedefine HAVE_PTHREAD
+
+// Define if your pthread library defines the type pthread_rwlock_t
+#cmakedefine HAVE_RWLOCK
+
+
+#endif // GFLAGS_DEFINES_H_
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/src/gflags.cc 
new/gflags-2.2.2/src/gflags.cc
--- old/gflags-2.2.1/src/gflags.cc      2017-07-11 19:30:34.000000000 +0200
+++ new/gflags-2.2.2/src/gflags.cc      2018-11-11 22:21:00.000000000 +0100
@@ -225,7 +225,6 @@
   bool Equal(const FlagValue& x) const;
   FlagValue* New() const;   // creates a new one with default value
   void CopyFrom(const FlagValue& x);
-  int ValueSize() const;
 
   // Calls the given validate-fn on value_buffer_, and returns
   // whatever it returns.  But first casts validate_fn_proto to a
@@ -485,23 +484,6 @@
   }
 }
 
-int FlagValue::ValueSize() const {
-  if (type_ > FV_MAX_INDEX) {
-    assert(false);  // unknown type
-    return 0;
-  }
-  static const uint8 valuesize[] = {
-    sizeof(bool),
-    sizeof(int32),
-    sizeof(uint32),
-    sizeof(int64),
-    sizeof(uint64),
-    sizeof(double),
-    sizeof(string),
-  };
-  return valuesize[type_];
-}
-
 // --------------------------------------------------------------------
 // CommandLineFlag
 //    This represents a single flag, including its name, description,
@@ -580,26 +562,14 @@
 }
 
 const char* CommandLineFlag::CleanFileName() const {
-  // Compute top-level directory & file that this appears in
-  // search full path backwards.
-  // Stop going backwards at kRootDir; and skip by the first slash.
-  static const char kRootDir[] = "";    // can set this to root directory,
-
-  if (sizeof(kRootDir)-1 == 0)          // no prefix to strip
-    return filename();
-
-  const char* clean_name = filename() + strlen(filename()) - 1;
-  while ( clean_name > filename() ) {
-    if (*clean_name == PATH_SEPARATOR) {
-      if (sizeof(kRootDir) > 1 && strncmp(clean_name, kRootDir, 
sizeof(kRootDir)-1) == 0) {
-        clean_name += sizeof(kRootDir)-1;    // past root-dir
-        break;
-      }
-    }
-    --clean_name;
-  }
-  while ( *clean_name == PATH_SEPARATOR ) ++clean_name;  // Skip any slashes
-  return clean_name;
+  // This function has been used to strip off a common prefix from
+  // flag source file names. Because flags can be defined in different
+  // shared libraries, there may not be a single common prefix.
+  // Further, this functionality hasn't been active for many years.
+  // Need a better way to produce more user friendly help output or
+  // "anonymize" file paths in help output, respectively.
+  // Follow issue at: https://github.com/gflags/gflags/issues/86
+  return filename();
 }
 
 void CommandLineFlag::FillCommandLineFlagInfo(
@@ -972,7 +942,6 @@
   // Stage 3: validate all the commandline flags that have validators
   // registered and were not set/modified by ParseNewCommandLineFlags.
   void ValidateFlags(bool all);
-  void ValidateAllFlags();
   void ValidateUnmodifiedFlags();
 
   // Stage 4: report any errors and return true if any were found.
@@ -1067,17 +1036,15 @@
     char* arg = (*argv)[i];
 
     // Like getopt(), we permute non-option flags to be at the end.
-    if (arg[0] != '-' ||           // must be a program argument
-        (arg[0] == '-' && arg[1] == '\0')) {  // "-" is an argument, not a flag
+    if (arg[0] != '-' || arg[1] == '\0') {     // must be a program argument: 
"-" is an argument, not a flag
       memmove((*argv) + i, (*argv) + i+1, (*argc - (i+1)) * 
sizeof((*argv)[i]));
       (*argv)[*argc-1] = arg;      // we go last
       first_nonopt--;              // we've been pushed onto the stack
       i--;                         // to undo the i++ in the loop
       continue;
     }
-
-    if (arg[0] == '-') arg++;      // allow leading '-'
-    if (arg[0] == '-') arg++;      // or leading '--'
+    arg++;                     // skip leading '-'
+    if (arg[0] == '-') arg++;  // or leading '--'
 
     // -- alone means what it does for GNU: stop options parsing
     if (*arg == '\0') {
@@ -1257,10 +1224,6 @@
   }
 }
 
-void CommandLineFlagParser::ValidateAllFlags() {
-  ValidateFlags(true);
-}
-
 void CommandLineFlagParser::ValidateUnmodifiedFlags() {
   ValidateFlags(false);
 }
@@ -1378,8 +1341,8 @@
             || fnmatch(glob.c_str(), ProgramInvocationName(),      
FNM_PATHNAME) == 0
             || fnmatch(glob.c_str(), ProgramInvocationShortName(), 
FNM_PATHNAME) == 0
 #elif defined(HAVE_SHLWAPI_H)
-            || PathMatchSpec(glob.c_str(), ProgramInvocationName())
-            || PathMatchSpec(glob.c_str(), ProgramInvocationShortName())
+            || PathMatchSpecA(glob.c_str(), ProgramInvocationName())
+            || PathMatchSpecA(glob.c_str(), ProgramInvocationShortName())
 #endif
             ) {
           flags_are_relevant = true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/src/gflags.h.in 
new/gflags-2.2.2/src/gflags.h.in
--- old/gflags-2.2.1/src/gflags.h.in    2017-07-11 19:30:34.000000000 +0200
+++ new/gflags-2.2.2/src/gflags.h.in    2018-11-11 22:21:00.000000000 +0100
@@ -441,6 +441,27 @@
                  FlagType* current_storage, FlagType* defvalue_storage);
 };
 
+// Force compiler to not generate code for the given template specialization.
+#if defined(_MSC_VER) && _MSC_VER < 1800 // Visual Studio 2013 version 12.0
+  #define GFLAGS_DECLARE_FLAG_REGISTERER_CTOR(type)
+#else
+  #define GFLAGS_DECLARE_FLAG_REGISTERER_CTOR(type)                  \
+    extern template GFLAGS_DLL_DECL FlagRegisterer::FlagRegisterer(  \
+        const char* name, const char* help, const char* filename,    \
+        type* current_storage, type* defvalue_storage)
+#endif
+
+// Do this for all supported flag types.
+GFLAGS_DECLARE_FLAG_REGISTERER_CTOR(bool);
+GFLAGS_DECLARE_FLAG_REGISTERER_CTOR(int32);
+GFLAGS_DECLARE_FLAG_REGISTERER_CTOR(uint32);
+GFLAGS_DECLARE_FLAG_REGISTERER_CTOR(int64);
+GFLAGS_DECLARE_FLAG_REGISTERER_CTOR(uint64);
+GFLAGS_DECLARE_FLAG_REGISTERER_CTOR(double);
+GFLAGS_DECLARE_FLAG_REGISTERER_CTOR(std::string);
+
+#undef GFLAGS_DECLARE_FLAG_REGISTERER_CTOR
+
 // If your application #defines STRIP_FLAG_HELP to a non-zero value
 // before #including this file, we remove the help message from the
 // binary file. This can reduce the size of the resulting binary
@@ -478,7 +499,7 @@
     static const type FLAGS_nono##name = value;                         \
     /* We always want to export defined variables, dll or no */         \
     GFLAGS_DLL_DEFINE_FLAG type FLAGS_##name = FLAGS_nono##name;        \
-    type FLAGS_no##name = FLAGS_nono##name;                             \
+    static type FLAGS_no##name = FLAGS_nono##name;                      \
     static GFLAGS_NAMESPACE::FlagRegisterer o_##name(                   \
       #name, MAYBE_STRIPPED_HELP(help), __FILE__,                       \
       &FLAGS_##name, &FLAGS_no##name);                                  \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/src/gflags_completions.cc 
new/gflags-2.2.2/src/gflags_completions.cc
--- old/gflags-2.2.1/src/gflags_completions.cc  2017-07-11 19:30:34.000000000 
+0200
+++ new/gflags-2.2.2/src/gflags_completions.cc  2018-11-11 22:21:00.000000000 
+0100
@@ -179,6 +179,11 @@
   bool flag_description_substring_search;
   bool return_all_matching_flags;
   bool force_no_update;
+  CompletionOptions(): flag_name_substring_search(false),
+                       flag_location_substring_search(false),
+                       flag_description_substring_search(false),
+                       return_all_matching_flags(false),
+                       force_no_update(false) { }
 };
 
 // Notable flags are flags that are special or preferred for some
@@ -202,7 +207,7 @@
 static void PrintFlagCompletionInfo(void) {
   string cursor_word = FLAGS_tab_completion_word;
   string canonical_token;
-  CompletionOptions options = { };
+  CompletionOptions options = CompletionOptions();
   CanonicalizeCursorWordAndSearchOptions(
       cursor_word,
       &canonical_token,
@@ -545,8 +550,7 @@
 
   vector<DisplayInfoGroup> output_groups;
   bool perfect_match_found = false;
-  if (lines_so_far < max_desired_lines &&
-      !notable_flags->perfect_match_flag.empty()) {
+  if (!notable_flags->perfect_match_flag.empty()) {
     perfect_match_found = true;
     DisplayInfoGroup group =
         { "",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/src/gflags_declare.h.in 
new/gflags-2.2.2/src/gflags_declare.h.in
--- old/gflags-2.2.1/src/gflags_declare.h.in    2017-07-11 19:30:34.000000000 
+0200
+++ new/gflags-2.2.2/src/gflags_declare.h.in    2018-11-11 22:21:00.000000000 
+0100
@@ -58,6 +58,8 @@
 #ifndef GFLAGS_DLL_DECL
 #  if GFLAGS_IS_A_DLL && defined(_MSC_VER)
 #    define GFLAGS_DLL_DECL __declspec(dllimport)
+#  elif defined(__GNUC__) && __GNUC__ >= 4
+#    define GFLAGS_DLL_DECL __attribute__((visibility("default")))
 #  else
 #    define GFLAGS_DLL_DECL
 #  endif
@@ -67,6 +69,8 @@
 #ifndef GFLAGS_DLL_DECLARE_FLAG
 #  if GFLAGS_IS_A_DLL && defined(_MSC_VER)
 #    define GFLAGS_DLL_DECLARE_FLAG __declspec(dllimport)
+#  elif defined(__GNUC__) && __GNUC__ >= 4
+#    define GFLAGS_DLL_DECLARE_FLAG __attribute__((visibility("default")))
 #  else
 #    define GFLAGS_DLL_DECLARE_FLAG
 #  endif
@@ -144,7 +148,6 @@
 #define DECLARE_string(name) \
   /* We always want to import declared variables, dll or no */ \
   namespace fLS { \
-  using ::fLS::clstring; \
   extern GFLAGS_DLL_DECLARE_FLAG ::fLS::clstring& FLAGS_##name; \
   } \
   using fLS::FLAGS_##name
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/src/gflags_reporting.cc 
new/gflags-2.2.2/src/gflags_reporting.cc
--- old/gflags-2.2.1/src/gflags_reporting.cc    2017-07-11 19:30:34.000000000 
+0200
+++ new/gflags-2.2.2/src/gflags_reporting.cc    2018-11-11 22:21:00.000000000 
+0100
@@ -296,10 +296,10 @@
   }
 }
 
-void ShowUsageWithFlagsRestrict(const char *argv0, const char *restrict) {
+void ShowUsageWithFlagsRestrict(const char *argv0, const char *restrict_) {
   vector<string> substrings;
-  if (restrict != NULL && *restrict != '\0') {
-    substrings.push_back(restrict);
+  if (restrict_ != NULL && *restrict_ != '\0') {
+    substrings.push_back(restrict_);
   }
   ShowUsageWithFlagsMatching(argv0, substrings);
 }
@@ -389,8 +389,8 @@
     gflags_exitfunc(1);
 
   } else if (!FLAGS_helpon.empty()) {
-    string restrict = PATH_SEPARATOR + FLAGS_helpon + ".";
-    ShowUsageWithFlagsRestrict(progname, restrict.c_str());
+    string restrict_ = PATH_SEPARATOR + FLAGS_helpon + ".";
+    ShowUsageWithFlagsRestrict(progname, restrict_.c_str());
     gflags_exitfunc(1);
 
   } else if (!FLAGS_helpmatch.empty()) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/src/windows_port.h 
new/gflags-2.2.2/src/windows_port.h
--- old/gflags-2.2.1/src/windows_port.h 2017-07-11 19:30:34.000000000 +0200
+++ new/gflags-2.2.2/src/windows_port.h 2018-11-11 22:21:00.000000000 +0100
@@ -77,6 +77,7 @@
 #  pragma warning(push)
 #  pragma warning(disable: 4996) // ignore getenv security warning
 #endif
+#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L
 inline void setenv(const char* name, const char* value, int) {
   // In windows, it's impossible to set a variable to the empty string.
   // We handle this by setting it to "0" and the NUL-ing out the \0.
@@ -98,6 +99,7 @@
       *getenv(name) = '\0';            // works when putenv() copies nameval
   }
 }
+#endif
 #ifdef _MSC_VER
 #  pragma warning(pop)
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/test/config/CMakeLists.txt 
new/gflags-2.2.2/test/config/CMakeLists.txt
--- old/gflags-2.2.1/test/config/CMakeLists.txt 2017-07-11 19:30:34.000000000 
+0200
+++ new/gflags-2.2.2/test/config/CMakeLists.txt 2018-11-11 22:21:00.000000000 
+0100
@@ -7,4 +7,4 @@
 find_package (gflags REQUIRED)
 
 add_executable (foo main.cc)
-target_link_libraries (foo gflags)
+target_link_libraries (foo gflags::gflags)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gflags-2.2.1/test/gflags_declare_test.cc 
new/gflags-2.2.2/test/gflags_declare_test.cc
--- old/gflags-2.2.1/test/gflags_declare_test.cc        2017-07-11 
19:30:34.000000000 +0200
+++ new/gflags-2.2.2/test/gflags_declare_test.cc        2018-11-11 
22:21:00.000000000 +0100
@@ -5,8 +5,8 @@
 
 int main(int argc, char **argv)
 {
-  gflags::SetUsageMessage("Test compilation and use of gflags_declare.h");
-  gflags::ParseCommandLineFlags(&argc, &argv, true);
+  GFLAGS_NAMESPACE::SetUsageMessage("Test compilation and use of 
gflags_declare.h");
+  GFLAGS_NAMESPACE::ParseCommandLineFlags(&argc, &argv, true);
   print_message();
   return 0;
 }


Reply via email to