dbeu            Tue Feb 20 10:00:44 2001 EDT

  Modified files:              
    /php4/ext/gd        gd.c gd.dsp php_gd.h 
    /php4/ext/standard  image.c 
  Log:
  make gd work again under win32
  
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.115 php4/ext/gd/gd.c:1.116
--- php4/ext/gd/gd.c:1.115      Thu Feb 15 06:48:56 2001
+++ php4/ext/gd/gd.c    Tue Feb 20 10:00:42 2001
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: gd.c,v 1.115 2001/02/15 14:48:56 thies Exp $ */
+/* $Id: gd.c,v 1.116 2001/02/20 18:00:42 dbeu Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, 
    Cold Spring Harbor Labs. */
@@ -50,6 +50,12 @@
 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 @@
        "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 @@
 }
 
 /* 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();
 
Index: php4/ext/gd/gd.dsp
diff -u php4/ext/gd/gd.dsp:1.4 php4/ext/gd/gd.dsp:1.5
--- php4/ext/gd/gd.dsp:1.4      Sat Sep 30 09:32:11 2000
+++ php4/ext/gd/gd.dsp  Tue Feb 20 10:00:42 2001
@@ -44,7 +44,7 @@
 # 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 @@
 # 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"
Index: php4/ext/gd/php_gd.h
diff -u php4/ext/gd/php_gd.h:1.22 php4/ext/gd/php_gd.h:1.23
--- php4/ext/gd/php_gd.h:1.22   Thu Feb  1 07:40:35 2001
+++ php4/ext/gd/php_gd.h        Tue Feb 20 10:00:43 2001
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_gd.h,v 1.22 2001/02/01 15:40:35 stas Exp $ */
+/* $Id: php_gd.h,v 1.23 2001/02/20 18:00:43 dbeu Exp $ */
 
 #ifndef PHP_GD_H
 #define 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
Index: php4/ext/standard/image.c
diff -u php4/ext/standard/image.c:1.25 php4/ext/standard/image.c:1.26
--- php4/ext/standard/image.c:1.25      Fri Jan 19 08:52:40 2001
+++ php4/ext/standard/image.c   Tue Feb 20 10:00:44 2001
@@ -15,7 +15,7 @@
    | Authors: Rasmus Lerdorf                                              |
    +----------------------------------------------------------------------+
  */
-/* $Id: image.c,v 1.25 2001/01/19 16:52:40 sniper Exp $ */
+/* $Id: image.c,v 1.26 2001/02/20 18:00:44 dbeu Exp $ */
 /* 
  * Based on Daniel Schmitt's imageinfo.c which carried the following
  * Copyright notice.
@@ -49,11 +49,11 @@
 #include "php_image.h"
 
 /* file type markers */
-const char php_sig_gif[3] = {'G', 'I', 'F'};
-const char php_sig_swf[3] = {'F', 'W', 'S'};
-const char php_sig_jpg[3] = {(char) 0xff, (char) 0xd8, (char) 0xff};
-const char php_sig_png[8] = {(char) 0x89, (char) 0x50, (char) 0x4e, (char) 0x47, 
-                                                        (char) 0x0d, (char) 0x0a, 
(char) 0x1a, (char) 0x0a};
+PHPAPI const char php_sig_gif[3] = {'G', 'I', 'F'};
+PHPAPI const char php_sig_swf[3] = {'F', 'W', 'S'};
+PHPAPI const char php_sig_jpg[3] = {(char) 0xff, (char) 0xd8, (char) 0xff};
+PHPAPI const char php_sig_png[8] = {(char) 0x89, (char) 0x50, (char) 0x4e, (char) 
+0x47, 
+(char) 0x0d, (char) 0x0a, (char) 0x1a, (char) 0x0a};
 
 /* return info as a struct, to make expansion easier */
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to