aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/bzip2/fix-import-export-macros.patch
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/bzip2/fix-import-export-macros.patch')
-rw-r--r--vcpkg/ports/bzip2/fix-import-export-macros.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/vcpkg/ports/bzip2/fix-import-export-macros.patch b/vcpkg/ports/bzip2/fix-import-export-macros.patch
new file mode 100644
index 0000000..fc67887
--- /dev/null
+++ b/vcpkg/ports/bzip2/fix-import-export-macros.patch
@@ -0,0 +1,40 @@
+diff --git a/bzlib.h b/bzlib.h
+index 8277123..84fbd0a 100644
+--- a/bzlib.h
++++ b/bzlib.h
+@@ -65,29 +65,23 @@ typedef
+ }
+ bz_stream;
+
+-
+-#ifndef BZ_IMPORT
+-#define BZ_EXPORT
+-#endif
+-
+ #ifndef BZ_NO_STDIO
+ /* Need a definitition for FILE */
+ #include <stdio.h>
+ #endif
+
+ #ifdef _WIN32
+-# include <windows.h>
+ # ifdef small
+ /* windows.h define small to char */
+ # undef small
+ # endif
+-# ifdef BZ_EXPORT
+-# define BZ_API(func) WINAPI func
+-# define BZ_EXTERN extern
++# define BZ_API(func) func
++# if defined(BZ_BUILD_DLL)
++# define BZ_EXTERN __declspec(dllexport)
++# elif defined(BZ_IMPORT)
++# define BZ_EXTERN __declspec(dllimport)
+ # else
+- /* import windows dll dynamically */
+-# define BZ_API(func) (WINAPI * func)
+-# define BZ_EXTERN
++# define BZ_EXTERN
+ # endif
+ #else
+ # define BZ_API(func) func