summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/gd/libgd/gd.c2
-rw-r--r--ext/gd/libgd/gd_interpolation.c60
-rw-r--r--ext/gd/libgd/gd_jpeg.c19
-rw-r--r--ext/gmp/gmp.c16
-rw-r--r--ext/ldap/config.m457
-rw-r--r--ext/ldap/config.w321
-rw-r--r--ext/ldap/ldap.c4
7 files changed, 16 insertions, 143 deletions
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c
index 2013e8ef42..4492a9d381 100644
--- a/ext/gd/libgd/gd.c
+++ b/ext/gd/libgd/gd.c
@@ -1256,7 +1256,7 @@ void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col)
if (dx == 0 && dy == 0) {
return;
}
- if (abs(dx) > abs(dy)) {
+ if (abs((int)dx) > abs((int)dy)) {
if (dx < 0) {
tmp = x1;
x1 = x2;
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index ba5db679b0..357cfa47bd 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -658,14 +658,6 @@ static inline int _color_blend (const int dst, const int src)
}
}
-static inline int _setEdgePixel(const gdImagePtr src, unsigned int x, unsigned int y, gdFixed coverage, const int bgColor)
-{
- const gdFixed f_127 = gd_itofx(127);
- register int c = src->tpixels[y][x];
- c = c | (( (int) (gd_fxtof(gd_mulfx(coverage, f_127)) + 50.5f)) << 24);
- return _color_blend(bgColor, c);
-}
-
static inline int getPixelOverflowTC(gdImagePtr im, const int x, const int y, const int bgColor)
{
if (gdImageBoundsSafe(im, x, y)) {
@@ -1138,54 +1130,6 @@ gdImagePtr gdImageScaleNearestNeighbour(gdImagePtr im, const unsigned int width,
return dst_img;
}
-static inline int getPixelOverflowColorTC(gdImagePtr im, const int x, const int y, const int color)
-{
- if (gdImageBoundsSafe(im, x, y)) {
- const int c = im->tpixels[y][x];
- if (c == im->transparent) {
- return gdTrueColorAlpha(0, 0, 0, 127);
- }
- return c;
- } else {
- register int border = 0;
- if (y < im->cy1) {
- border = im->tpixels[0][im->cx1];
- goto processborder;
- }
-
- if (y < im->cy1) {
- border = im->tpixels[0][im->cx1];
- goto processborder;
- }
-
- if (y > im->cy2) {
- if (x >= im->cx1 && x <= im->cx1) {
- border = im->tpixels[im->cy2][x];
- goto processborder;
- } else {
- return gdTrueColorAlpha(0, 0, 0, 127);
- }
- }
-
- /* y is bound safe at this point */
- if (x < im->cx1) {
- border = im->tpixels[y][im->cx1];
- goto processborder;
- }
-
- if (x > im->cx2) {
- border = im->tpixels[y][im->cx2];
- }
-
-processborder:
- if (border == im->transparent) {
- return gdTrueColorAlpha(0, 0, 0, 127);
- } else{
- return gdTrueColorAlpha(gdTrueColorGetRed(border), gdTrueColorGetGreen(border), gdTrueColorGetBlue(border), 127);
- }
- }
-}
-
static gdImagePtr gdImageScaleBilinearPalette(gdImagePtr im, const unsigned int new_width, const unsigned int new_height)
{
long _width = MAX(1, new_width);
@@ -2398,8 +2342,8 @@ int gdTransformAffineCopy(gdImagePtr dst,
gdImageGetClip(dst, &c1x, &c1y, &c2x, &c2y);
- end_x = bbox.width + (int) fabs(bbox.x);
- end_y = bbox.height + (int) fabs(bbox.y);
+ end_x = bbox.width + abs(bbox.x);
+ end_y = bbox.height + abs(bbox.y);
/* Get inverse affine to let us work with destination -> source */
gdAffineInvert(inv, affine);
diff --git a/ext/gd/libgd/gd_jpeg.c b/ext/gd/libgd/gd_jpeg.c
index ef46c4a22c..3f0241a8e0 100644
--- a/ext/gd/libgd/gd_jpeg.c
+++ b/ext/gd/libgd/gd_jpeg.c
@@ -542,19 +542,6 @@ static int CMYKToRGB(int c, int m, int y, int k, int inverted)
*
*/
-/* Different versions of libjpeg use either 'jboolean' or 'boolean', and
- some platforms define 'boolean', and so forth. Deal with this
- madness by typedeffing 'safeboolean' to 'boolean' if HAVE_BOOLEAN
- is already set, because this is the test that libjpeg uses.
- Otherwise, typedef it to int, because that's what libjpeg does
- if HAVE_BOOLEAN is not defined. -TBB */
-
-#ifdef HAVE_BOOLEAN
-typedef boolean safeboolean;
-#else
-typedef int safeboolean;
-#endif /* HAVE_BOOLEAN */
-
/* Expanded data source object for gdIOCtx input */
typedef struct
@@ -563,7 +550,7 @@ typedef struct
gdIOCtx *infile; /* source stream */
unsigned char *buffer; /* start of buffer */
- safeboolean start_of_file; /* have we gotten any data yet? */
+ boolean start_of_file; /* have we gotten any data yet? */
} my_source_mgr;
typedef my_source_mgr *my_src_ptr;
@@ -622,7 +609,7 @@ void init_source (j_decompress_ptr cinfo)
#define END_JPEG_SEQUENCE "\r\n[*]--:END JPEG:--[*]\r\n"
-safeboolean fill_input_buffer (j_decompress_ptr cinfo)
+boolean fill_input_buffer (j_decompress_ptr cinfo)
{
my_src_ptr src = (my_src_ptr) cinfo->src;
/* 2.0.12: signed size. Thanks to Geert Jansen */
@@ -813,7 +800,7 @@ void init_destination (j_compress_ptr cinfo)
* write it out when emptying the buffer externally.
*/
-safeboolean empty_output_buffer (j_compress_ptr cinfo)
+boolean empty_output_buffer (j_compress_ptr cinfo)
{
my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index 52bb962db2..966b07e81c 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -365,7 +365,6 @@ static inline void gmp_zval_unary_ui_op(zval *return_value, zval *a_arg, gmp_una
/* Unary operations */
#define gmp_unary_op(op) _gmp_unary_op(INTERNAL_FUNCTION_PARAM_PASSTHRU, op)
#define gmp_unary_opl(op) _gmp_unary_opl(INTERNAL_FUNCTION_PARAM_PASSTHRU, op)
-#define gmp_unary_ui_op(op) _gmp_unary_ui_op(INTERNAL_FUNCTION_PARAM_PASSTHRU, op)
static void gmp_free_object_storage(zend_object *obj) /* {{{ */
{
@@ -956,21 +955,6 @@ static inline void gmp_zval_unary_ui_op(zval *return_value, zval *a_arg, gmp_una
}
/* }}} */
-/* {{{ _gmp_unary_ui_op
- Execute GMP unary operation.
-*/
-static inline void _gmp_unary_ui_op(INTERNAL_FUNCTION_PARAMETERS, gmp_unary_ui_op_t gmp_op)
-{
- zval *a_arg;
-
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &a_arg) == FAILURE){
- return;
- }
-
- gmp_zval_unary_ui_op(return_value, a_arg, gmp_op);
-}
-/* }}} */
-
/* {{{ _gmp_unary_op
*/
static inline void _gmp_unary_op(INTERNAL_FUNCTION_PARAMETERS, gmp_unary_op_t gmp_op)
diff --git a/ext/ldap/config.m4 b/ext/ldap/config.m4
index 204aeb6085..a2f77b0fa4 100644
--- a/ext/ldap/config.m4
+++ b/ext/ldap/config.m4
@@ -41,59 +41,15 @@ AC_DEFUN([PHP_LDAP_CHECKS], [
fi
])
-AC_DEFUN([PHP_LDAP_SASL_CHECKS], [
- if test "$1" = "yes"; then
- SEARCH_DIRS="/usr/local /usr"
- else
- SEARCH_DIRS=$1
- fi
-
- for i in $SEARCH_DIRS; do
- if test -f $i/include/sasl/sasl.h; then
- LDAP_SASL_DIR=$i
- AC_DEFINE(HAVE_LDAP_SASL_SASL_H,1,[ ])
- break
- elif test -f $i/include/sasl.h; then
- LDAP_SASL_DIR=$i
- AC_DEFINE(HAVE_LDAP_SASL_H,1,[ ])
- break
- fi
- done
-
- if test "$LDAP_SASL_DIR"; then
- LDAP_SASL_INCDIR=$LDAP_SASL_DIR/include
- LDAP_SASL_LIBDIR=$LDAP_SASL_DIR/$PHP_LIBDIR
- else
- AC_MSG_ERROR([sasl.h not found!])
- fi
-
- if test "$PHP_LDAP_SASL" = "yes"; then
- SASL_LIB="-lsasl2"
- else
- SASL_LIB="-L$LDAP_SASL_LIBDIR -lsasl2"
- fi
-
- PHP_CHECK_LIBRARY(sasl2, sasl_version,
- [
- PHP_ADD_INCLUDE($LDAP_SASL_INCDIR)
- PHP_ADD_LIBRARY_WITH_PATH(sasl2, $LDAP_SASL_LIBDIR, LDAP_SHARED_LIBADD)
- AC_DEFINE(HAVE_LDAP_SASL, 1, [LDAP SASL support])
- ], [
- AC_MSG_ERROR([LDAP SASL check failed. Please check config.log for more information.])
- ], [
- $LDAP_SHARED_LIBADD $SASL_LIB
- ])
-])
-
PHP_ARG_WITH([ldap],
[for LDAP support],
[AS_HELP_STRING([[--with-ldap[=DIR]]],
[Include LDAP support])])
PHP_ARG_WITH([ldap-sasl],
- [for LDAP Cyrus SASL support],
- [AS_HELP_STRING([[--with-ldap-sasl[=DIR]]],
- [LDAP: Include Cyrus SASL support])],
+ [whether to build with LDAP Cyrus SASL support],
+ [AS_HELP_STRING([--with-ldap-sasl],
+ [LDAP: Build with Cyrus SASL support])],
[no],
[no])
@@ -216,7 +172,12 @@ if test "$PHP_LDAP" != "no"; then
dnl SASL check
if test "$PHP_LDAP_SASL" != "no"; then
- PHP_LDAP_SASL_CHECKS([$PHP_LDAP_SASL])
+ PKG_CHECK_MODULES([SASL], [libsasl2])
+
+ PHP_EVAL_INCLINE($SASL_CFLAGS)
+ PHP_EVAL_LIBLINE($SASL_LIBS, LDAP_SHARED_LIBADD)
+
+ AC_DEFINE(HAVE_LDAP_SASL, 1, [LDAP SASL support])
fi
dnl Sanity check
diff --git a/ext/ldap/config.w32 b/ext/ldap/config.w32
index 59aff718bf..1cbbfb8ba8 100644
--- a/ext/ldap/config.w32
+++ b/ext/ldap/config.w32
@@ -17,7 +17,6 @@ if (PHP_LDAP != "no") {
AC_DEFINE('HAVE_LDAP_START_TLS_S', 1);
AC_DEFINE('HAVE_LDAP', 1);
AC_DEFINE('HAVE_LDAP_SASL', 1);
- AC_DEFINE('HAVE_LDAP_SASL_SASL_H', 1);
AC_DEFINE('HAVE_LDAP_CONTROL_FIND', 1);
AC_DEFINE('HAVE_LDAP_PARSE_EXTENDED_RESULT', 1);
AC_DEFINE('HAVE_LDAP_EXTENDED_OPERATION_S', 1);
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index 411c289894..101bb889ad 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -53,9 +53,7 @@
#include "ext/standard/php_string.h"
#include "ext/standard/info.h"
-#ifdef HAVE_LDAP_SASL_H
-#include <sasl.h>
-#elif defined(HAVE_LDAP_SASL_SASL_H)
+#ifdef HAVE_LDAP_SASL
#include <sasl/sasl.h>
#endif