Commit 1b8e9bab authored by Craig Silverstein's avatar Craig Silverstein

Clean up the 'GFLAGS_DLL_DECL' stuff better: reduce use outside of windows/ directory.

R=jyrki
DELTA=33  (0 added, 27 deleted, 6 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3016


git-svn-id: https://gflags.googlecode.com/svn/trunk@60 6586e3c6-dcc4-952a-343f-ff74eb82781d
parent beb69a87
...@@ -88,9 +88,9 @@ ...@@ -88,9 +88,9 @@
// them. Our automated opensourcing tools use this as a signal to do // them. Our automated opensourcing tools use this as a signal to do
// appropriate munging for windows, which needs to add GFLAGS_DLL_DECL. // appropriate munging for windows, which needs to add GFLAGS_DLL_DECL.
// //
#ifdef SWIG // it apparently can't see the define in gflags_declare.h #define GFLAGS_DLL_DECL /* rewritten to be non-empty in windows dir */
# define GFLAGS_DLL_DECL /**/ #define GFLAGS_DLL_DEFINE_FLAG /* rewritten to be non-empty in windows dir */
#endif
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// To actually define a flag in a file, use DEFINE_bool, // To actually define a flag in a file, use DEFINE_bool,
......
...@@ -118,13 +118,8 @@ $ complete -o bashdefault -o default -o nospace -C \ ...@@ -118,13 +118,8 @@ $ complete -o bashdefault -o default -o nospace -C \
// them. Our automated opensourcing tools use this as a signal to do // them. Our automated opensourcing tools use this as a signal to do
// appropriate munging for windows, which needs to add GFLAGS_DLL_DECL. // appropriate munging for windows, which needs to add GFLAGS_DLL_DECL.
// //
#ifndef GFLAGS_DLL_DECL #define GFLAGS_DLL_DECL /* rewritten to be non-empty in windows dir */
# ifdef _MSC_VER
# define GFLAGS_DLL_DECL __declspec(dllimport)
# else
# define GFLAGS_DLL_DECL /**/
# endif
#endif
@ac_google_start_namespace@ @ac_google_start_namespace@
......
...@@ -70,29 +70,7 @@ typedef unsigned __int64 uint64; ...@@ -70,29 +70,7 @@ typedef unsigned __int64 uint64;
@ac_google_end_namespace@ @ac_google_end_namespace@
// Annoying stuff for windows -- makes sure clients can import these functions #define GFLAGS_DLL_DECLARE_FLAG /* rewritten to be non-empty in windows dir */
// TODO(csilvers): add this only for the windows version of the file.
#if defined(_MSC_VER)
# ifndef GFLAGS_DLL_DECL
# define GFLAGS_DLL_DECL __declspec(dllimport)
# endif
# ifndef GFLAGS_DLL_DECLARE_FLAG
# define GFLAGS_DLL_DECLARE_FLAG __declspec(dllimport)
# endif
# ifndef GFLAGS_DLL_DEFINE_FLAG
# define GFLAGS_DLL_DEFINE_FLAG __declspec(dllexport)
# endif
#else
# ifndef GFLAGS_DLL_DECL
# define GFLAGS_DLL_DECL /**/
# endif
# ifndef GFLAGS_DLL_DECLARE_FLAG
# define GFLAGS_DLL_DECLARE_FLAG /**/
# endif
# ifndef GFLAGS_DLL_DEFINE_FLAG
# define GFLAGS_DLL_DEFINE_FLAG /**/
# endif
#endif
namespace fLS { namespace fLS {
......
...@@ -88,9 +88,13 @@ namespace google { ...@@ -88,9 +88,13 @@ namespace google {
// them. Our automated opensourcing tools use this as a signal to do // them. Our automated opensourcing tools use this as a signal to do
// appropriate munging for windows, which needs to add GFLAGS_DLL_DECL. // appropriate munging for windows, which needs to add GFLAGS_DLL_DECL.
// //
#ifdef SWIG // it apparently can't see the define in gflags_declare.h #if defined(_MSC_VER) && !defined(GFLAGS_DLL_DECL)
# define GFLAGS_DLL_DECL /**/ # define GFLAGS_DLL_DECL __declspec(dllimport)
#endif #endif
#if defined(_MSC_VER) && !defined(GFLAGS_DLL_DEFINE_FLAG)
# define GFLAGS_DLL_DEFINE_FLAG __declspec(dllexport)
#endif
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// To actually define a flag in a file, use DEFINE_bool, // To actually define a flag in a file, use DEFINE_bool,
......
...@@ -118,14 +118,11 @@ $ complete -o bashdefault -o default -o nospace -C \ ...@@ -118,14 +118,11 @@ $ complete -o bashdefault -o default -o nospace -C \
// them. Our automated opensourcing tools use this as a signal to do // them. Our automated opensourcing tools use this as a signal to do
// appropriate munging for windows, which needs to add GFLAGS_DLL_DECL. // appropriate munging for windows, which needs to add GFLAGS_DLL_DECL.
// //
#ifndef GFLAGS_DLL_DECL #if defined(_MSC_VER) && !defined(GFLAGS_DLL_DECL)
# ifdef _MSC_VER
# define GFLAGS_DLL_DECL __declspec(dllimport) # define GFLAGS_DLL_DECL __declspec(dllimport)
# else
# define GFLAGS_DLL_DECL /**/
# endif
#endif #endif
namespace google { namespace google {
extern GFLAGS_DLL_DECL void HandleCommandLineCompletions(void); extern GFLAGS_DLL_DECL void HandleCommandLineCompletions(void);
......
...@@ -70,28 +70,8 @@ typedef unsigned __int64 uint64; ...@@ -70,28 +70,8 @@ typedef unsigned __int64 uint64;
} }
// Annoying stuff for windows -- makes sure clients can import these functions #if defined(_MSC_VER) && !defined(GFLAGS_DLL_DECLARE_FLAG)
// TODO(csilvers): add this only for the windows version of the file.
#if defined(_MSC_VER)
# ifndef GFLAGS_DLL_DECL
# define GFLAGS_DLL_DECL __declspec(dllimport)
# endif
# ifndef GFLAGS_DLL_DECLARE_FLAG
# define GFLAGS_DLL_DECLARE_FLAG __declspec(dllimport) # define GFLAGS_DLL_DECLARE_FLAG __declspec(dllimport)
# endif
# ifndef GFLAGS_DLL_DEFINE_FLAG
# define GFLAGS_DLL_DEFINE_FLAG __declspec(dllexport)
# endif
#else
# ifndef GFLAGS_DLL_DECL
# define GFLAGS_DLL_DECL /**/
# endif
# ifndef GFLAGS_DLL_DECLARE_FLAG
# define GFLAGS_DLL_DECLARE_FLAG /**/
# endif
# ifndef GFLAGS_DLL_DEFINE_FLAG
# define GFLAGS_DLL_DEFINE_FLAG /**/
# endif
#endif #endif
namespace fLS { 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