Skip to content

Commit

Permalink
Clean up the 'GFLAGS_DLL_DECL' stuff better: reduce use outside of wi…
Browse files Browse the repository at this point in the history
…ndows/ directory.

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


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3016


git-svn-id: http://google-gflags.googlecode.com/svn/trunk@60 990008b9-e524-0410-ae84-45f8ed876473
  • Loading branch information
csilvers+gflags@google.com committed Aug 18, 2011
1 parent a30f38c commit 6bc7afb
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 63 deletions.
6 changes: 3 additions & 3 deletions src/gflags/gflags.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@
// them. Our automated opensourcing tools use this as a signal to do
// 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 /**/
#endif
#define GFLAGS_DLL_DECL /* rewritten to be non-empty in windows dir */
#define GFLAGS_DLL_DEFINE_FLAG /* rewritten to be non-empty in windows dir */


// --------------------------------------------------------------------
// To actually define a flag in a file, use DEFINE_bool,
Expand Down
9 changes: 2 additions & 7 deletions src/gflags/gflags_completions.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,8 @@ $ complete -o bashdefault -o default -o nospace -C \
// them. Our automated opensourcing tools use this as a signal to do
// appropriate munging for windows, which needs to add GFLAGS_DLL_DECL.
//
#ifndef GFLAGS_DLL_DECL
# ifdef _MSC_VER
# define GFLAGS_DLL_DECL __declspec(dllimport)
# else
# define GFLAGS_DLL_DECL /**/
# endif
#endif
#define GFLAGS_DLL_DECL /* rewritten to be non-empty in windows dir */


@ac_google_start_namespace@

Expand Down
24 changes: 1 addition & 23 deletions src/gflags/gflags_declare.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -70,29 +70,7 @@ typedef unsigned __int64 uint64;
@ac_google_end_namespace@


// Annoying stuff for windows -- makes sure clients can import these functions
// 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
#define GFLAGS_DLL_DECLARE_FLAG /* rewritten to be non-empty in windows dir */

namespace fLS {

Expand Down
8 changes: 6 additions & 2 deletions src/windows/gflags/gflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,13 @@ namespace google {
// them. Our automated opensourcing tools use this as a signal to do
// 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 /**/
#if defined(_MSC_VER) && !defined(GFLAGS_DLL_DECL)
# define GFLAGS_DLL_DECL __declspec(dllimport)
#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,
Expand Down
9 changes: 3 additions & 6 deletions src/windows/gflags/gflags_completions.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,11 @@
// them. Our automated opensourcing tools use this as a signal to do
// appropriate munging for windows, which needs to add GFLAGS_DLL_DECL.
//
#ifndef GFLAGS_DLL_DECL
# ifdef _MSC_VER
# define GFLAGS_DLL_DECL __declspec(dllimport)
# else
# define GFLAGS_DLL_DECL /**/
# endif
#if defined(_MSC_VER) && !defined(GFLAGS_DLL_DECL)
# define GFLAGS_DLL_DECL __declspec(dllimport)
#endif


namespace google {

extern GFLAGS_DLL_DECL void HandleCommandLineCompletions(void);
Expand Down
24 changes: 2 additions & 22 deletions src/windows/gflags/gflags_declare.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,8 @@ typedef unsigned __int64 uint64;
}


// Annoying stuff for windows -- makes sure clients can import these functions
// 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
#if defined(_MSC_VER) && !defined(GFLAGS_DLL_DECLARE_FLAG)
# define GFLAGS_DLL_DECLARE_FLAG __declspec(dllimport)
#endif

namespace fLS {
Expand Down

0 comments on commit 6bc7afb

Please sign in to comment.