Commit:    2fc17d83cb8e1adb95542c6c18a698082a7f687c
Author:    Ondřej Surý <ond...@sury.org>         Fri, 3 May 2013 12:40:45 +0200
Committer: Remi Collet <r...@php.net>      Sat, 4 May 2013 16:50:03 +0200
Parents:   8a07908215556f24ebe12acfc843483d4a85420d
Branches:  PHP-5.5

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=2fc17d83cb8e1adb95542c6c18a698082a7f687c

Log:
* Remove overflow2, getmbi and skipheaders from gd_compat.h * Add missing 
return in _php_ctx_getmbi * Reintroduce imagecreatefromxbm by checking for 
gdCreateImageFromXbm

Changed paths:
  M  ext/gd/config.m4
  M  ext/gd/gd.c
  M  ext/gd/libgd/gd_compat.h


Diff:
diff --git a/ext/gd/config.m4 b/ext/gd/config.m4
index 255035a..dc38562 100644
--- a/ext/gd/config.m4
+++ b/ext/gd/config.m4
@@ -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 ])
 ])
 
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 5d8ae4e..94b057f 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -53,13 +53,6 @@
 # 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;
 }
 /* }}} */
 
diff --git a/ext/gd/libgd/gd_compat.h b/ext/gd/libgd/gd_compat.h
index 745fe80..f6e00d7 100644
--- a/ext/gd/libgd/gd_compat.h
+++ b/ext/gd/libgd/gd_compat.h
@@ -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
  *


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to