Austin Schuh | 8fec4f4 | 2018-10-29 21:52:32 -0700 | [diff] [blame] | 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 | # else |
| 40 | # define GFLAGS_DLL_DECL |
| 41 | # endif |
| 42 | #endif |
| 43 | // Flags defined by the gflags library itself must be exported |
| 44 | #ifndef GFLAGS_DLL_DEFINE_FLAG |
| 45 | # define GFLAGS_DLL_DEFINE_FLAG GFLAGS_DLL_DECL |
| 46 | #endif |
| 47 | |
| 48 | #ifdef OS_WINDOWS |
| 49 | // The unittests import the symbols of the shared gflags library |
| 50 | # if GFLAGS_IS_A_DLL && defined(_MSC_VER) |
| 51 | # define GFLAGS_DLL_DECL_FOR_UNITTESTS __declspec(dllimport) |
| 52 | # endif |
| 53 | # include "windows_port.h" |
| 54 | #endif |
| 55 | |
| 56 | |
| 57 | #endif // GFLAGS_CONFIG_H_ |