From eacb7924c84ff831065f328fcf0f108df04472d9 Mon Sep 17 00:00:00 2001 From: Craig Silverstein Date: Thu, 19 May 2011 21:32:31 +0000 Subject: [PATCH] Update the windows version of the .h's to match the unix version. git-svn-id: https://gflags.googlecode.com/svn/trunk@49 6586e3c6-dcc4-952a-343f-ff74eb82781d --- src/windows/gflags/gflags.h | 5 ----- src/windows/gflags/gflags_declare.h | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/windows/gflags/gflags.h b/src/windows/gflags/gflags.h index 662be9e..1c72456 100644 --- a/src/windows/gflags/gflags.h +++ b/src/windows/gflags/gflags.h @@ -522,11 +522,6 @@ GFLAGS_DLL_DECL bool IsBoolFlag(bool from); // into it later. It's not perfect, but the best we can do. namespace fLS { -// The meaning of "string" might be different between now and when the -// macros below get invoked (e.g., if someone is experimenting with -// other string implementations that get defined after this file is -// included). Save the current meaning now and use it in the macros. -typedef std::string clstring; inline clstring* dont_pass0toDEFINE_string(char *stringspot, const char *value) { diff --git a/src/windows/gflags/gflags_declare.h b/src/windows/gflags/gflags_declare.h index c2c9cf5..8c84676 100644 --- a/src/windows/gflags/gflags_declare.h +++ b/src/windows/gflags/gflags_declare.h @@ -57,6 +57,17 @@ namespace google { +namespace fLS { + +// The meaning of "string" might be different between now and when the +// macros below get invoked (e.g., if someone is experimenting with +// other string implementations that get defined after this file is +// included). Save the current meaning now and use it in the macros. +typedef std::string clstring; + +} + + #if 0 // the C99 format typedef int32_t int32; typedef uint32_t uint32; @@ -89,7 +100,10 @@ typedef unsigned __int64 uint64; #define DECLARE_uint64(name) DECLARE_VARIABLE(google::uint64, U64, name) #define DECLARE_double(name) DECLARE_VARIABLE(double, D, name) #define DECLARE_string(name) \ - namespace fLS { typedef std::string clstring; extern GFLAGS_DLL_DECLARE_FLAG ::fLS::clstring& FLAGS_##name; } \ + namespace fLS { \ + using ::fLS::clstring; \ + extern GFLAGS_DLL_DECLARE_FLAG ::fLS::clstring& FLAGS_##name; \ + } \ using fLS::FLAGS_##name #endif // BASE_COMMANDLINEFLAGS_DECLARE_H_