]> granicus.if.org Git - php/commitdiff
* Remove overflow2, getmbi and skipheaders from gd_compat.h * Add missing return...
authorOndřej Surý <ondrej@sury.org>
Fri, 3 May 2013 10:40:45 +0000 (12:40 +0200)
committerRemi Collet <remi@php.net>
Sat, 4 May 2013 14:50:03 +0000 (16:50 +0200)
ext/gd/config.m4
ext/gd/gd.c
ext/gd/libgd/gd_compat.h

index 255035a924477d8c5bbc7c32e3bb8b10df0ef615..dc38562935155847555874f3db3b6081b4ab3e20 100644 (file)
@@ -288,6 +288,7 @@ AC_DEFUN([PHP_GD_CHECK_VERSION],[
   PHP_CHECK_LIBRARY(gd, gdImagePixelate,        [AC_DEFINE(HAVE_GD_IMAGE_PIXELATE,         1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdImageFlipBoth,        [AC_DEFINE(HAVE_GD_IMAGE_FLIP,       1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdImageCreateFromJpegEx,[AC_DEFINE(HAVE_GD_JPGEX,            1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
+  PHP_CHECK_LIBRARY(gd, gdImageCreateFromXbm,   [AC_DEFINE(HAVE_GD_XBM,              1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdSetErrorMethod,       [AC_DEFINE(HAVE_LIBGD21,             1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
 ])
 
index 5d8ae4e6c618e46e58f73e29137baf5a67cec603..94b057fb16c53413039333691fec994827869ef7 100644 (file)
 # include <Wingdi.h>
 #endif
 
-#if HAVE_LIBGD
-#if !HAVE_GD_BUNDLED
-# include "libgd/gd_compat.h"
-#else
-extern int overflow2(int a, int b);
-#endif
-
 static int le_gd, le_gd_font;
 #if HAVE_LIBT1
 #include <t1lib.h>
@@ -2396,17 +2389,19 @@ PHP_FUNCTION(imagetypes)
 /* {{{ _php_ctx_getmbi
  */
 
-static _php_ctx_getmbi(gdIOCtx *ctx)
+static int _php_ctx_getmbi(gdIOCtx *ctx)
 {
        int i, mbi = 0;
 
        do {
                i = (ctx->getC)(ctx);
                if (i < 0) {
-                       break;
+                       return -1;
                }
                mbi = (mbi << 7) | (i & 0x7f);
        } while (i & 0x80);
+
+       return mbi;
 }
 /* }}} */
 
index 745fe80f7095ab6d00ec5084d5d1550b7a5eb6cc..f6e00d7fa0b2e7f5d8f2f3b2fb09069207e9095f 100644 (file)
@@ -12,10 +12,6 @@ const char * gdJpegGetVersionString();
 int gdJpegGetVersionInt();
 
 #if !defined(HAVE_LIBGD21)
-int overflow2(int a, int b);
-int getmbi (int (*getin) (void *in), void *in);
-int skipheader (int (*getin) (void *in), void *in);
-
 
 /* filters section
  *