summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2007-07-24 19:20:28 +0000
committerAndrey Hristov <andrey@php.net>2007-07-24 19:20:28 +0000
commitbb4b052c2341312481f4de0895a0aff29b9ba35c (patch)
tree4dc787de515aedc43850b13cf2ca69be272bbd72
parent215edd7a4a427a011851a92e46a7330d179bccf3 (diff)
downloadphp-git-bb4b052c2341312481f4de0895a0aff29b9ba35c.tar.gz
Don't use AC_CHECK_TYPES, as autoconf 2.13 is buggy, use an workaround.
-rw-r--r--ext/mysqli/config9.m430
-rw-r--r--ext/mysqli/mysqlnd/portability.h34
2 files changed, 40 insertions, 24 deletions
diff --git a/ext/mysqli/config9.m4 b/ext/mysqli/config9.m4
index 086b744f01..4d88225ced 100644
--- a/ext/mysqli/config9.m4
+++ b/ext/mysqli/config9.m4
@@ -81,13 +81,29 @@ fi
dnl MySQLnd build
dnl If some extension uses mysqlnd it will get compiled in PHP whether MYSQLi is enabled or not.
if test "$PHP_MYSQLND_ENABLED" = "yes"; then
- AC_CHECK_TYPES([int8, uint8, int16, uint16, int32, uint32, uchar],[],[], [
- #include <sys/types.h>
- ])
-
- AC_CHECK_TYPES([int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t],[],[], [
- #include <stdint.h>
- ])
+dnl AC_CHECK_TYPES([int8, uint8, int16, uint16, int32, uint32, uchar],[],[], [
+dnl #include <sys/types.h>
+dnl ])
+dnl AC_CHECK_TYPES([int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t],[],[], [
+dnl #include <stdint.h>
+dnl ])
+ PHP_CHECK_SIZEOF(int8, 0)
+ PHP_CHECK_SIZEOF(uint8, 0)
+ PHP_CHECK_SIZEOF(int16, 0)
+ PHP_CHECK_SIZEOF(uint16, 0)
+ PHP_CHECK_SIZEOF(int32, 0)
+ PHP_CHECK_SIZEOF(uint32, 0)
+ PHP_CHECK_SIZEOF(int64, 0)
+ PHP_CHECK_SIZEOF(uint64, 0)
+ PHP_CHECK_SIZEOF(int8_t, 0)
+ PHP_CHECK_SIZEOF(uint8_t, 0)
+ PHP_CHECK_SIZEOF(int16_t, 0)
+ PHP_CHECK_SIZEOF(uint16_t, 0)
+ PHP_CHECK_SIZEOF(int32_t, 0)
+ PHP_CHECK_SIZEOF(uint32_t, 0)
+ PHP_CHECK_SIZEOF(int64_t, 0)
+ PHP_CHECK_SIZEOF(uint64_t, 0)
+ PHP_CHECK_SIZEOF(ulong, 0)
mysqlnd_sources="mysqlnd.c mysqlnd_charset.c mysqlnd_wireprotocol.c \
mysqlnd_ps.c mysqlnd_loaddata.c mysqlnd_palloc.c \
diff --git a/ext/mysqli/mysqlnd/portability.h b/ext/mysqli/mysqlnd/portability.h
index 79e519d454..4e1aeb15c6 100644
--- a/ext/mysqli/mysqlnd/portability.h
+++ b/ext/mysqli/mysqlnd/portability.h
@@ -59,62 +59,62 @@ This file is public domain and comes with NO WARRANTY of any kind */
/* Typdefs for easyier portability */
-#ifndef HAVE_INT8
-#ifndef HAVE_INT8_T
+#if (SIZEOF_INT8 == 0)
+#if (SIZEOF_INT8_T == 0)
typedef signed char int8; /* Signed integer >= 8 bits */
#else
typedef int8_t int8; /* Signed integer >= 8 bits */
#endif
#endif
-#ifndef HAVE_UINT8
-#ifndef HAVE_UINT8_T
+#if (SIZEOF_UINT8 == 0)
+#if (SIZEOF_UINT8_T == 0)
typedef unsigned char uint8; /* Unsigned integer >= 8 bits */
#else
typedef uint8_t uint8; /* Signed integer >= 8 bits */
#endif
#endif
-#ifndef HAVE_INT16
-#ifndef HAVE_INT16_T
+#if (SIZEOF_INT16 == 0)
+#if (SIZEOF_INT16_T == 0)
typedef signed short int16; /* Signed integer >= 16 bits */
#else
typedef int16_t int16; /* Signed integer >= 16 bits */
#endif
#endif
-#ifndef HAVE_UINT16
-#ifndef HAVE_UINT16_T
+#if (SIZEOF_UINT16 == 0)
+#if (SIZEOF_UINT16_T == 0)
typedef unsigned short uint16; /* Signed integer >= 16 bits */
#else
typedef uint16_t uint16; /* Signed integer >= 16 bits */
#endif
#endif
-#ifndef HAVE_UCHAR
+#if (SIZEOF_UCHAR == 0)
typedef unsigned char uchar; /* Short for unsigned char */
#endif
-#if defined(HAVE_INT32_T) && defined (HAVE_UINT32_T)
+#if (SIZEOF_INT32_T != 0) && (SIZEOF_UINT32_T != 0)
typedef int32_t int32;
typedef uint32_t uint32;
#elif SIZEOF_INT == 4
-#ifndef HAVE_INT32
+#ifndef (SIZEOF_INT32 == 0)
typedef signed int int32;
#endif
-#ifndef HAVE_UINT32
+#ifndef (SIZEOF_UINT32 == 0)
typedef unsigned int uint32;
#endif
#elif SIZEOF_LONG == 4
-#ifndef HAVE_INT32
+#ifndef (SIZEOF_INT32 == 0)
typedef signed long int32;
#endif
-#ifndef HAVE_UINT32
+#ifndef (SIZEOF_UINT32 == 0)
typedef unsigned long uint32;
#endif
@@ -122,7 +122,7 @@ typedef unsigned long uint32;
error "Neither int or long is of 4 bytes width"
#endif
-#if !defined(HAVE_ULONG) && !defined(__USE_MISC) && !defined(ulong)
+#if (SIZEOF_ULONG == 0) && !defined(__USE_MISC) && !defined(ulong)
typedef unsigned long ulong; /* Short for unsigned long */
#endif
#ifndef longlong_defined
@@ -487,14 +487,14 @@ typedef __int64 mynd_longlong;
#ifndef L64
#define L64(x) x##LL
#endif
-#ifndef HAVE_UINT64_T
+#if (SIZEOF_UINT64_T == 0)
typedef unsigned long long my_uint64;
typedef unsigned long long mynd_ulonglong;
#else
typedef uint64_t my_uint64;
typedef uint64_t mynd_ulonglong;
#endif
-#ifndef HAVE_INT64_T
+#if (SIZEOF_INT64_T == 0)
typedef long long my_int64;
typedef long long mynd_longlong;
#else