summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2021-08-29 21:36:28 +0200
committerJoel Rosdahl <joel@rosdahl.net>2021-09-07 19:33:21 +0200
commit32fcd3e1c3275b9f850ea35a4057c9bbd009c974 (patch)
tree9fdb3680d4cb1a226dff8c6dc3865bbd3d7e94e4
parente0e0fb4323c302440aee0974d979193b34df2e67 (diff)
downloadccache-32fcd3e1c3275b9f850ea35a4057c9bbd009c974.tar.gz
refactor: Improve compatibility definition of DLLIMPORT
-rw-r--r--src/Config.cpp6
-rw-r--r--src/core/wincompat.hpp2
2 files changed, 2 insertions, 6 deletions
diff --git a/src/Config.cpp b/src/Config.cpp
index 6169e61c..ec739c8a 100644
--- a/src/Config.cpp
+++ b/src/Config.cpp
@@ -49,12 +49,6 @@
using nonstd::nullopt;
using nonstd::optional;
-#if defined(_MSC_VER)
-# define DLLIMPORT __declspec(dllimport)
-#else
-# define DLLIMPORT
-#endif
-
#ifndef environ
DLLIMPORT extern char** environ;
#endif
diff --git a/src/core/wincompat.hpp b/src/core/wincompat.hpp
index f983bec0..e550593c 100644
--- a/src/core/wincompat.hpp
+++ b/src/core/wincompat.hpp
@@ -104,4 +104,6 @@ const mode_t S_IWUSR = mode_t(_S_IWRITE);
# define O_BINARY 0
# endif
+#else
+# define DLLIMPORT
#endif // _WIN32