summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCraig Silverstein <csilvers+gflags@google.com>2011-07-30 02:55:58 +0000
committerCraig Silverstein <csilvers+gflags@google.com>2011-07-30 02:55:58 +0000
commita923d3338e23b650483d5a444a9c08c817c01819 (patch)
tree2b96a4c94b731083ed3f6f2ac66d19e9b3eccd04 /src
parent357b3d9d0b6dccbfd56ae0a466494f6c2da21901 (diff)
downloadgflags-a923d3338e23b650483d5a444a9c08c817c01819.tar.gz
gflags-a923d3338e23b650483d5a444a9c08c817c01819.tar.bz2
gflags-a923d3338e23b650483d5a444a9c08c817c01819.zip
It turns out we don't want all this dll-decl stuff for mingw.
So make the #ifdef correct for mscv-but-not-mingw. I think the right fix would be to take all this logic out and insert it via a MOE directive, just for the windows versions of these files. This is what ctemplate does. But it's a more-major change, and I'm looking to get this release out today, so I'm submitting this (TBR), since it's a much more minor change. Revision created by MOE tool push_codebase. MOE_MIGRATION=2837 git-svn-id: https://gflags.googlecode.com/svn/trunk@55 6586e3c6-dcc4-952a-343f-ff74eb82781d
Diffstat (limited to 'src')
-rw-r--r--src/gflags/gflags_completions.h.in2
-rw-r--r--src/gflags/gflags_declare.h.in3
-rw-r--r--src/windows/gflags/gflags_completions.h2
-rw-r--r--src/windows/gflags/gflags_declare.h3
4 files changed, 6 insertions, 4 deletions
diff --git a/src/gflags/gflags_completions.h.in b/src/gflags/gflags_completions.h.in
index 13b380e..7d6e8f0 100644
--- a/src/gflags/gflags_completions.h.in
+++ b/src/gflags/gflags_completions.h.in
@@ -119,7 +119,7 @@ $ complete -o bashdefault -o default -o nospace -C \
// appropriate munging for windows, which needs to add GFLAGS_DLL_DECL.
//
#ifndef GFLAGS_DLL_DECL
-# ifdef _WIN32
+# ifdef _MSC_VER
# define GFLAGS_DLL_DECL __declspec(dllimport)
# else
# define GFLAGS_DLL_DECL /**/
diff --git a/src/gflags/gflags_declare.h.in b/src/gflags/gflags_declare.h.in
index 01feba5..75bf9a2 100644
--- a/src/gflags/gflags_declare.h.in
+++ b/src/gflags/gflags_declare.h.in
@@ -71,7 +71,8 @@ typedef unsigned __int64 uint64;
// Annoying stuff for windows -- makes sure clients can import these functions
-#if defined(_WIN32)
+// 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
diff --git a/src/windows/gflags/gflags_completions.h b/src/windows/gflags/gflags_completions.h
index 772cff3..903c9e0 100644
--- a/src/windows/gflags/gflags_completions.h
+++ b/src/windows/gflags/gflags_completions.h
@@ -119,7 +119,7 @@ $ complete -o bashdefault -o default -o nospace -C \
// appropriate munging for windows, which needs to add GFLAGS_DLL_DECL.
//
#ifndef GFLAGS_DLL_DECL
-# ifdef _WIN32
+# ifdef _MSC_VER
# define GFLAGS_DLL_DECL __declspec(dllimport)
# else
# define GFLAGS_DLL_DECL /**/
diff --git a/src/windows/gflags/gflags_declare.h b/src/windows/gflags/gflags_declare.h
index fffe66b..e7e5a2d 100644
--- a/src/windows/gflags/gflags_declare.h
+++ b/src/windows/gflags/gflags_declare.h
@@ -71,7 +71,8 @@ typedef unsigned __int64 uint64;
// Annoying stuff for windows -- makes sure clients can import these functions
-#if defined(_WIN32)
+// 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