Commit 13025b11 authored by Andreas Schuh's avatar Andreas Schuh

Remove GFLAGS_NAMESPACE and version macros from public headers again.

parent 0b116eb4
......@@ -2,9 +2,6 @@
// Note: This header file is only used internally. It is not part of public interface!
// Whether gflags library is shared. Used for DLL import declaration.
#define GFLAGS_IS_A_DLL @GFLAGS_IS_A_DLL@
// ---------------------------------------------------------------------------
// System checks
......@@ -70,6 +67,9 @@
// Define to the address where bug reports for this package should be sent.
#define PACKAGE_BUGREPORT @PACKAGE_BUGREPORT@
// Namespace of gflags library symbols.
#define GFLAGS_NAMESPACE @GFLAGS_NAMESPACE@
// ---------------------------------------------------------------------------
// Path separator
#ifndef PATH_SEPARATOR
......@@ -83,6 +83,9 @@
// ---------------------------------------------------------------------------
// Windows
// Whether gflags library is shared.
#define GFLAGS_IS_A_DLL @GFLAGS_IS_A_DLL@
// 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.
......
......@@ -94,7 +94,7 @@
#endif
namespace GFLAGS_NAMESPACE {
namespace @GFLAGS_NAMESPACE@ {
// --------------------------------------------------------------------
......@@ -136,7 +136,7 @@ extern GFLAGS_DLL_DECL bool RegisterFlagValidator(const std::string* flag, bool
// Convenience macro for the registration of a flag validator
#define DEFINE_validator(name, validator) \
static const bool name##_validator_registered = \
GFLAGS_NAMESPACE::RegisterFlagValidator(&FLAGS_##name, validator)
@GFLAGS_NAMESPACE@::RegisterFlagValidator(&FLAGS_##name, validator)
// --------------------------------------------------------------------
......@@ -284,8 +284,7 @@ class GFLAGS_DLL_DECL FlagSaver {
FlagSaver(const FlagSaver&); // no copying!
void operator=(const FlagSaver&);
}
GFLAGS_ATTRIBUTE_UNUSED;
}@GFLAGS_ATTRIBUTE_UNUSED@;
// --------------------------------------------------------------------
// Some deprecated or hopefully-soon-to-be-deprecated functions.
......@@ -443,7 +442,7 @@ class GFLAGS_DLL_DECL FlagRegisterer {
extern GFLAGS_DLL_DECL const char kStrippedFlagHelp[];
} // namespace GFLAGS_NAMESPACE
} // namespace @GFLAGS_NAMESPACE@
#ifndef SWIG // In swig, ignore the main flag declarations
......@@ -451,7 +450,7 @@ extern GFLAGS_DLL_DECL const char kStrippedFlagHelp[];
#if defined(STRIP_FLAG_HELP) && STRIP_FLAG_HELP > 0
// Need this construct to avoid the 'defined but not used' warning.
#define MAYBE_STRIPPED_HELP(txt) \
(false ? (txt) : GFLAGS_NAMESPACE::kStrippedFlagHelp)
(false ? (txt) : @GFLAGS_NAMESPACE@::kStrippedFlagHelp)
#else
#define MAYBE_STRIPPED_HELP(txt) txt
#endif
......@@ -473,7 +472,7 @@ extern GFLAGS_DLL_DECL const char kStrippedFlagHelp[];
/* 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 GFLAGS_NAMESPACE::FlagRegisterer o_##name( \
static @GFLAGS_NAMESPACE@::FlagRegisterer o_##name( \
#name, #type, MAYBE_STRIPPED_HELP(help), __FILE__, \
&FLAGS_##name, &FLAGS_no##name); \
} \
......@@ -506,15 +505,15 @@ GFLAGS_DLL_DECL bool IsBoolFlag(bool from);
DEFINE_VARIABLE(bool, B, name, val, txt)
#define DEFINE_int32(name, val, txt) \
DEFINE_VARIABLE(GFLAGS_NAMESPACE::int32, I, \
DEFINE_VARIABLE(@GFLAGS_NAMESPACE@::int32, I, \
name, val, txt)
#define DEFINE_int64(name, val, txt) \
DEFINE_VARIABLE(GFLAGS_NAMESPACE::int64, I64, \
DEFINE_VARIABLE(@GFLAGS_NAMESPACE@::int64, I64, \
name, val, txt)
#define DEFINE_uint64(name,val, txt) \
DEFINE_VARIABLE(GFLAGS_NAMESPACE::uint64, U64, \
DEFINE_VARIABLE(@GFLAGS_NAMESPACE@::uint64, U64, \
name, val, txt)
#define DEFINE_double(name, val, txt) \
......@@ -555,7 +554,7 @@ inline clstring* dont_pass0toDEFINE_string(char *stringspot,
clstring* const FLAGS_no##name = ::fLS:: \
dont_pass0toDEFINE_string(s_##name[0].s, \
val); \
static GFLAGS_NAMESPACE::FlagRegisterer o_##name( \
static @GFLAGS_NAMESPACE@::FlagRegisterer o_##name( \
#name, "string", MAYBE_STRIPPED_HELP(txt), __FILE__, \
s_##name[0].s, new (s_##name[1].s) clstring(*FLAGS_no##name)); \
extern GFLAGS_DLL_DEFINE_FLAG clstring& FLAGS_##name; \
......
......@@ -37,24 +37,6 @@
#ifndef GFLAGS_DECLARE_H_
#define GFLAGS_DECLARE_H_
// ---------------------------------------------------------------------------
// Meta-information
// Version number of gflags library.
#define GFLAGS_VERSION_STRING "@PACKAGE_VERSION@"
#define GFLAGS_VERSION_MAJOR @PACKAGE_VERSION_MAJOR@ ///< Major version number.
#define GFLAGS_VERSION_MINOR @PACKAGE_VERSION_MINOR@ ///< Minor version number.
#define GFLAGS_VERSION_PATCH @PACKAGE_VERSION_PATCH@ ///< Version patch number.
// ---------------------------------------------------------------------------
// Namespace for gflags symbols.
#define GFLAGS_NAMESPACE @GFLAGS_NAMESPACE@
// ---------------------------------------------------------------------------
// Unused attribute declaration for GNU GCC.
#define GFLAGS_ATTRIBUTE_UNUSED @GFLAGS_ATTRIBUTE_UNUSED@
// ---------------------------------------------------------------------------
// Windows DLL import/export.
......@@ -87,7 +69,7 @@
# include <inttypes.h> // a third place for uint32_t or u_int32_t
#endif
namespace GFLAGS_NAMESPACE {
namespace @GFLAGS_NAMESPACE@ {
#if @GFLAGS_INTTYPES_FORMAT_C99@ // C99
typedef int32_t int32;
......@@ -108,7 +90,7 @@ typedef unsigned __int64 uint64;
# error Do not know how to define a 32-bit integer quantity on your system
#endif
} // namespace GFLAGS_NAMESPACE
} // namespace @GFLAGS_NAMESPACE@
namespace fLS {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment