summaryrefslogtreecommitdiff
path: root/ext/gd
diff options
context:
space:
mode:
authorDaniel Beulshausen <dbeu@php.net>2001-02-20 18:00:44 +0000
committerDaniel Beulshausen <dbeu@php.net>2001-02-20 18:00:44 +0000
commit721d59948e45124b624fa3bfc827bff1d57e1fb9 (patch)
treeb0d9c4e91c58a0777bbde550f61194c1ed801dfb /ext/gd
parent57ce23e3cbc692db6ba5b00b638e0651c330695a (diff)
downloadphp-git-721d59948e45124b624fa3bfc827bff1d57e1fb9.tar.gz
make gd work again under win32
Diffstat (limited to 'ext/gd')
-rw-r--r--ext/gd/gd.c14
-rw-r--r--ext/gd/gd.dsp4
-rw-r--r--ext/gd/php_gd.h13
3 files changed, 19 insertions, 12 deletions
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 <gd.h>
#include <gdfontt.h> /* 1 Tiny font */
#include <gdfonts.h> /* 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