]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
refactor: Improve compatibility definition of DLLIMPORT
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 29 Aug 2021 19:36:28 +0000 (21:36 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 7 Sep 2021 17:33:21 +0000 (19:33 +0200)
src/Config.cpp
src/core/wincompat.hpp

index 6169e61c468196b950b0d3de2d0469889b95eba4..ec739c8afa3022431a3bae77e833a325184bdab2 100644 (file)
 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
index f983bec0a324ccc62e06409b8a581be6a85009d2..e550593cb511189c7e2cbfbcbac86de8d3c05bf6 100644 (file)
@@ -104,4 +104,6 @@ const mode_t S_IWUSR = mode_t(_S_IWRITE);
 #    define O_BINARY 0
 #  endif
 
+#else
+#  define DLLIMPORT
 #endif // _WIN32