1 // Note: This header file is only used internally. It is not part of public interface!
2 
3 #ifndef GFLAGS_CONFIG_H_
4 #define GFLAGS_CONFIG_H_
5 
6 
7 // ---------------------------------------------------------------------------
8 // System checks
9 
10 // CMake build configuration is written to defines.h file, unused by Bazel build
11 #if !defined(GFLAGS_BAZEL_BUILD)
12 #  include "defines.h"
13 #endif
14 
15 // gcc requires this to get PRId64, etc.
16 #if defined(HAVE_INTTYPES_H) && !defined(__STDC_FORMAT_MACROS)
17 #  define __STDC_FORMAT_MACROS 1
18 #endif
19 
20 // ---------------------------------------------------------------------------
21 // Path separator
22 #ifndef PATH_SEPARATOR
23 #  ifdef OS_WINDOWS
24 #    define PATH_SEPARATOR  '\\'
25 #  else
26 #    define PATH_SEPARATOR  '/'
27 #  endif
28 #endif
29 
30 // ---------------------------------------------------------------------------
31 // Windows
32 
33 // Always export symbols when compiling a shared library as this file is only
34 // included by internal modules when building the gflags library itself.
35 // The gflags_declare.h header file will set it to import these symbols otherwise.
36 #ifndef GFLAGS_DLL_DECL
37 #  if GFLAGS_IS_A_DLL && defined(_MSC_VER)
38 #    define GFLAGS_DLL_DECL __declspec(dllexport)
39 #  elif defined(__GNUC__) && __GNUC__ >= 4
40 #    define GFLAGS_DLL_DECL __attribute__((visibility("default")))
41 #  else
42 #    define GFLAGS_DLL_DECL
43 #  endif
44 #endif
45 // Flags defined by the gflags library itself must be exported
46 #ifndef GFLAGS_DLL_DEFINE_FLAG
47 #  define GFLAGS_DLL_DEFINE_FLAG GFLAGS_DLL_DECL
48 #endif
49 
50 #ifdef OS_WINDOWS
51 // The unittests import the symbols of the shared gflags library
52 #  if GFLAGS_IS_A_DLL && defined(_MSC_VER)
53 #    define GFLAGS_DLL_DECL_FOR_UNITTESTS __declspec(dllimport)
54 #  endif
55 #  include "windows_port.h"
56 #endif
57 
58 
59 #endif // GFLAGS_CONFIG_H_
60