From 721d59948e45124b624fa3bfc827bff1d57e1fb9 Mon Sep 17 00:00:00 2001 From: Daniel Beulshausen Date: Tue, 20 Feb 2001 18:00:44 +0000 Subject: make gd work again under win32 --- ext/gd/gd.c | 14 +++++++------- ext/gd/gd.dsp | 4 ++-- ext/gd/php_gd.h | 13 ++++++++++--- 3 files changed, 19 insertions(+), 12 deletions(-) (limited to 'ext/gd') diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 32defd355a..57e3d2507f 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -50,6 +50,12 @@ static int le_gd, le_gd_font; static int le_ps_font, le_ps_enc; #endif +#ifdef ZTS +int gd_globals_id; +#else +static php_gd_globals gd_globals; +#endif + #include #include /* 1 Tiny font */ #include /* 2 Small font */ @@ -193,12 +199,6 @@ zend_module_entry gd_module_entry = { "gd", gd_functions, PHP_MINIT(gd), NULL, NULL, NULL, PHP_MINFO(gd), STANDARD_MODULE_PROPERTIES }; -#ifdef ZTS -int gd_globals_id; -#else -static php_gd_globals gd_globals; -#endif - #ifdef COMPILE_DL_GD ZEND_GET_MODULE(gd) #endif @@ -310,7 +310,7 @@ PHP_MINFO_FUNCTION(gd) } /* Need this for cpdf. See also comment in file.c php3i_get_le_fp() */ -PHPAPI int phpi_get_le_gd(void) +PHP_GD_API int phpi_get_le_gd(void) { GDLS_FETCH(); diff --git a/ext/gd/gd.dsp b/ext/gd/gd.dsp index 9b992e87ac..7e6f5ea397 100644 --- a/ext/gd/gd.dsp +++ b/ext/gd/gd.dsp @@ -44,7 +44,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_GD" /D ZTS=1 /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP_EXPORTS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GDIMAGECOLORRESOLVE=1 /D HAVE_LIBTTF=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D HAVE_LIBGD13=1 /D HAVE_LIBGD=1 /FR /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GDIMAGECOLORRESOLVE=1 /D HAVE_LIBTTF=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D HAVE_LIBGD13=1 /D HAVE_LIBGD=1 /D HAVE_LIBGD15=1 /FR /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x406 /d "NDEBUG" @@ -72,7 +72,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_GD" /D "DBNTWIN32" /D ZTS=1 /YX /FD /c -# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP_EXPORTS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GDIMAGECOLORRESOLVE=1 /D HAVE_LIBTTF=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D HAVE_LIBGD13=1 /D HAVE_LIBGD=1 /FR /YX /FD /c +# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GDIMAGECOLORRESOLVE=1 /D HAVE_LIBTTF=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D HAVE_LIBGD13=1 /D HAVE_LIBGD=1 /D HAVE_LIBGD15=1 /FR /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x406 /d "NDEBUG" diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h index 75afd788ea..4f068c69a1 100644 --- a/ext/gd/php_gd.h +++ b/ext/gd/php_gd.h @@ -43,9 +43,16 @@ #define PHP_GDIMG_TYPE_XBM 5 #define PHP_GDIMG_TYPE_XPM 6 -extern const char php_sig_gif[3]; -extern const char php_sig_jpg[3]; -extern const char php_sig_png[3]; +#ifdef PHP_WIN32 +#define PHP_GD_API __declspec(dllexport) +#else +#define PHP_GD_API +#endif + + +PHPAPI extern const char php_sig_gif[3]; +PHPAPI extern const char php_sig_jpg[3]; +PHPAPI extern const char php_sig_png[3]; extern zend_module_entry gd_module_entry; #define phpext_gd_ptr &gd_module_entry -- cgit v1.2.1