From a923d3338e23b650483d5a444a9c08c817c01819 Mon Sep 17 00:00:00 2001 From: Craig Silverstein Date: Sat, 30 Jul 2011 02:55:58 +0000 Subject: [PATCH] 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 --- src/gflags/gflags_completions.h.in | 2 +- src/gflags/gflags_declare.h.in | 3 ++- src/windows/gflags/gflags_completions.h | 2 +- src/windows/gflags/gflags_declare.h | 3 ++- 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