diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/bzip2/fix-import-export-macros.patch | |
Diffstat (limited to 'vcpkg/ports/bzip2/fix-import-export-macros.patch')
| -rw-r--r-- | vcpkg/ports/bzip2/fix-import-export-macros.patch | 40 |
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 |