From: Pierre Joye Date: Sun, 3 Jun 2007 17:43:13 +0000 (+0000) Subject: - @DOC add constants GD_MAJOR_VERSION, GD_MINOR_VERSION, GD_RELEASE_VERSION X-Git-Tag: BEFORE_IMPORT_OF_MYSQLND~553 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d6eb2e1c46d3ebf89da5e0ea8bbf78a82df7480e;p=php - @DOC add constants GD_MAJOR_VERSION, GD_MINOR_VERSION, GD_RELEASE_VERSION GD_EXTRA_VERSION and GD_VERSION_STRING - fix #ifdef else clause --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 11ba9d9388..44e9c1c148 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -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" diff --git a/ext/gd/libgd/gd.h b/ext/gd/libgd/gd.h index 58ca9424c0..29ef59a14f 100644 --- a/ext/gd/libgd/gd.h +++ b/ext/gd/libgd/gd.h @@ -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 ";"