]> wimlib.net Git - wimlib/blobdiff - src/util.h
Support for making DLL correctly on Cygwin
[wimlib] / src / util.h
index 4f4056660e282dd2ca457584acdc7484be597b42..b79490e8ad4c3ff180105ea3c353c43af6bccd64 100644 (file)
@@ -9,7 +9,11 @@
 #include "config.h"
 
 #ifdef __GNUC__
-#      define WIMLIBAPI __attribute__((visibility("default")))
+#      if defined(__CYGWIN__) || defined(__WIN32__)
+#              define WIMLIBAPI __declspec(dllexport)
+#      else
+#              define WIMLIBAPI __attribute__((visibility("default")))
+#      endif
 #      define ALWAYS_INLINE inline __attribute__((always_inline))
 #      define PACKED __attribute__((packed))
 #      define FORMAT(type, format_str, args_start) \