aboutsummaryrefslogtreecommitdiff
path: root/ports/bzip2/fix-import-export-macros.patch
diff options
context:
space:
mode:
authorcodicodi <rob.ceglinski@gmail.com>2017-01-02 01:31:42 +0100
committerGitHub <noreply@github.com>2017-01-02 01:31:42 +0100
commit044c07ece1aa0e3e46e0c059cb5877b1bc18c76c (patch)
treefdaa68387fd7b8b72bf6ab729668f713affadcf9 /ports/bzip2/fix-import-export-macros.patch
parent31daeeb7f585d0b64de78e31b4e0de8be8b5d213 (diff)
downloadvcpkg-044c07ece1aa0e3e46e0c059cb5877b1bc18c76c.tar.gz
vcpkg-044c07ece1aa0e3e46e0c059cb5877b1bc18c76c.zip
add bzip2
Diffstat (limited to 'ports/bzip2/fix-import-export-macros.patch')
-rw-r--r--ports/bzip2/fix-import-export-macros.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/ports/bzip2/fix-import-export-macros.patch b/ports/bzip2/fix-import-export-macros.patch
new file mode 100644
index 000000000..e3ee8494b
--- /dev/null
+++ b/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