From: Remi Collet Date: Sat, 4 May 2013 14:54:46 +0000 (+0200) Subject: Merge branch 'PHP-5.5' X-Git-Tag: php-5.6.0alpha1~442^2~112 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71e76816cec42ac1d4b47a6008bd8ebb6279b369;p=php Merge branch 'PHP-5.5' * PHP-5.5: NEWS fix build with bundled libgd Move png and jpeg version functions to gd.c so the external library build doesn't include anything from libgd/. Remove extra unused functions from gd_compat.h Rewrite Xpm library check so it doesn't break on MultiArch systems Required GD >= 2.1.0 or GD bundled, this allows us to remove most of the #ifdef * Remove overflow2, getmbi and skipheaders from gd_compat.h * Add missing return in _php_ctx_getmbi * Reintroduce imagecreatefromxbm by checking for gdCreateImageFromXbm Remove overflow2, getmbi and skipheader, since they are not needed anymore. Allow to use new GD-2.1.0 function from system library --- 71e76816cec42ac1d4b47a6008bd8ebb6279b369 diff --cc ext/gd/gd.c index 802b3d3a25,9b326305bc..c39ffdfe1a --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@@ -97,43 -131,8 +135,12 @@@ static void php_free_ps_enc(zend_rsrc_l static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int, int); #endif - #if HAVE_LIBGD15 - /* it's >= 1.5, i.e. has IOCtx */ - #define USE_GD_IOCTX 1 - #else - #undef USE_GD_IOCTX - #endif - - #ifdef USE_GD_IOCTX #include "gd_ctx.c" - #else - #define gdImageCreateFromGdCtx NULL - #define gdImageCreateFromGd2Ctx NULL - #define gdImageCreateFromGd2partCtx NULL - #define gdImageCreateFromGifCtx NULL - #define gdImageCreateFromJpegCtx NULL - #define gdImageCreateFromPngCtx NULL - #define gdImageCreateFromWBMPCtx NULL - typedef FILE gdIOCtx; - #define CTX_PUTC(c, fp) fputc(c, fp) - #endif - - #ifndef HAVE_GDIMAGECOLORRESOLVE - extern int gdImageColorResolve(gdImagePtr, int, int, int); - #endif - - #if HAVE_COLORCLOSESTHWB - int gdImageColorClosestHWB(gdImagePtr im, int r, int g, int b); - #endif - - #ifndef HAVE_GD_DYNAMIC_CTX_EX - #define gdNewDynamicCtxEx(len, data, val) gdNewDynamicCtx(len, data) - #endif +/* as it is not really public, duplicate declaration here to avoid + pointless warnings */ +int overflow2(int a, int b); + /* Section Filters Declarations */ /* IMPORTANT NOTE FOR NEW FILTER * Do not forget to update: