]> granicus.if.org Git - php/commitdiff
- @DOC add constants GD_MAJOR_VERSION, GD_MINOR_VERSION, GD_RELEASE_VERSION
authorPierre Joye <pajoye@php.net>
Sun, 3 Jun 2007 17:43:13 +0000 (17:43 +0000)
committerPierre Joye <pajoye@php.net>
Sun, 3 Jun 2007 17:43:13 +0000 (17:43 +0000)
  GD_EXTRA_VERSION and GD_VERSION_STRING
- fix #ifdef else clause

ext/gd/gd.c
ext/gd/libgd/gd.h

index 11ba9d938813d7bbba2e6b65ce175371ee67c2be..44e9c1c14851bb1285d05e1ef38ffe0121060397 100644 (file)
@@ -1233,6 +1233,18 @@ PHP_MINIT_FUNCTION(gd)
        REGISTER_LONG_CONSTANT("GD_BUNDLED", 0, CONST_CS | CONST_PERSISTENT);
 #endif
 
+#ifdef GD_VERSION_STRING
+       REGISTER_STRING_CONSTANT("GD_VERSION", GD_VERSION_STRING, CONST_CS | CONST_PERSISTENT);
+#endif
+
+#if defined(GD_MAJOR_VERSION) && defined(GD_MINOR_VERSION) && defined(GD_RELEASE_VERSION) && defined(GD_EXTRA_VERSION)
+       REGISTER_LONG_CONSTANT("GD_MAJOR_VERSION", GD_MAJOR_VERSION, CONST_CS | CONST_PERSISTENT);
+       REGISTER_LONG_CONSTANT("GD_MINOR_VERSION", GD_MINOR_VERSION, CONST_CS | CONST_PERSISTENT);
+       REGISTER_LONG_CONSTANT("GD_RELEASE_VERSION", GD_RELEASE_VERSION, CONST_CS | CONST_PERSISTENT);
+       REGISTER_STRING_CONSTANT("GD_EXTRA_VERSION", GD_EXTRA_VERSION, CONST_CS | CONST_PERSISTENT);
+#endif
+
+
 #ifdef HAVE_GD_PNG
        /*
         * cannot include #include "png.h"
index 58ca9424c09eb01d32d7bdf6d0119da0050e41f3..29ef59a14fb2482fbdb1fcbf055ff20c567c3dab 100644 (file)
@@ -7,11 +7,17 @@ extern "C" {
 
 #include "php_compat.h"
 
+#define GD_MAJOR_VERSION 2
+#define GD_MINOR_VERSION 0
+#define GD_RELEASE_VERSION 35
+#define GD_EXTRA_VERSION ""
+#define GD_VERSION_STRING "2.0.35"
+
 #ifdef NETWARE
 /* default fontpath for netware systems */
 #define DEFAULT_FONTPATH "sys:/java/nwgfx/lib/x11/fonts/ttf;."
 #define PATHSEPARATOR ";"
-#elif WIN32
+#elif defined(WIN32)
 /* default fontpath for windows systems */
 #define DEFAULT_FONTPATH "c:\\winnt\\fonts;c:\\windows\\fonts;."
 #define PATHSEPARATOR ";"