summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/date/config0.m41
-rw-r--r--ext/date/lib/timelib_structs.h10
-rw-r--r--ext/exif/exif.c10
-rw-r--r--ext/hash/config.m42
-rw-r--r--ext/hash/config.w323
-rw-r--r--ext/hash/package.xml1
-rw-r--r--ext/hash/php_hash.h7
-rw-r--r--ext/hash/php_hash_types.h71
-rw-r--r--ext/mysqlnd/config9.m412
-rw-r--r--ext/mysqlnd/mysqlnd_portability.h107
-rw-r--r--ext/oci8/oci8.c9
-rw-r--r--ext/phar/phar_internal.h3
-rw-r--r--ext/spl/php_spl.h5
-rw-r--r--ext/standard/crypt_freesec.h17
-rw-r--r--ext/standard/crypt_sha256.c6
-rw-r--r--ext/standard/crypt_sha512.c6
-rw-r--r--ext/standard/string.c7
-rw-r--r--ext/zip/lib/zipconf.h6
18 files changed, 17 insertions, 266 deletions
diff --git a/ext/date/config0.m4 b/ext/date/config0.m4
index f403104a8a..0b46c6803a 100644
--- a/ext/date/config0.m4
+++ b/ext/date/config0.m4
@@ -22,4 +22,5 @@ cat > $ext_builddir/lib/timelib_config.h <<EOF
#else
# include <php_config.h>
#endif
+#include <php_stdint.h>
EOF
diff --git a/ext/date/lib/timelib_structs.h b/ext/date/lib/timelib_structs.h
index a3d7793447..5d1d963330 100644
--- a/ext/date/lib/timelib_structs.h
+++ b/ext/date/lib/timelib_structs.h
@@ -33,11 +33,6 @@
#include <stdint.h>
#endif
-#ifdef PHP_WIN32
-/* TODO: Remove these hacks/defs once we have the int definitions in main/
- rathen than in each 2nd extension and win32/ */
-# include "win32/php_stdint.h"
-#else
# ifndef HAVE_INT32_T
# if SIZEOF_INT == 4
typedef int int32_t;
@@ -53,7 +48,6 @@ typedef unsigned int uint32_t;
typedef unsigned long int uint32_t;
# endif
# endif
-#endif
#include <stdio.h>
@@ -68,8 +62,8 @@ typedef unsigned long int uint32_t;
#endif
#if defined(_MSC_VER)
-typedef uint64_t timelib_ull;
-typedef int64_t timelib_sll;
+typedef __uint64 timelib_ull;
+typedef __int64 timelib_sll;
# define TIMELIB_LL_CONST(n) n ## i64
#else
typedef unsigned long long timelib_ull;
diff --git a/ext/exif/exif.c b/ext/exif/exif.c
index bd646d9adf..ec121a6c32 100644
--- a/ext/exif/exif.c
+++ b/ext/exif/exif.c
@@ -40,16 +40,6 @@
#include "php.h"
#include "ext/standard/file.h"
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef PHP_WIN32
-# include "win32/php_stdint.h"
-#endif
-
#if HAVE_EXIF
/* When EXIF_DEBUG is defined the module generates a lot of debug messages
diff --git a/ext/hash/config.m4 b/ext/hash/config.m4
index 79ac25e19f..9d080bf7af 100644
--- a/ext/hash/config.m4
+++ b/ext/hash/config.m4
@@ -31,7 +31,7 @@ if test "$PHP_HASH" != "no"; then
EXT_HASH_HEADERS="php_hash.h php_hash_md.h php_hash_sha.h php_hash_ripemd.h \
php_hash_haval.h php_hash_tiger.h php_hash_gost.h php_hash_snefru.h \
php_hash_whirlpool.h php_hash_adler32.h php_hash_crc32.h \
- php_hash_fnv.h php_hash_joaat.h php_hash_types.h"
+ php_hash_fnv.h php_hash_joaat.h"
PHP_NEW_EXTENSION(hash, $EXT_HASH_SOURCES, $ext_shared)
ifdef([PHP_INSTALL_HEADERS], [
diff --git a/ext/hash/config.w32 b/ext/hash/config.w32
index abe8675f30..8e9d4c3d48 100644
--- a/ext/hash/config.w32
+++ b/ext/hash/config.w32
@@ -19,7 +19,6 @@ if (PHP_HASH != "no") {
PHP_INSTALL_HEADERS("ext/hash/", "php_hash.h php_hash_md.h php_hash_sha.h php_hash_ripemd.h " +
"php_hash_haval.h php_hash_tiger.h php_hash_gost.h php_hash_snefru.h " +
- "php_hash_whirlpool.h php_hash_adler32.h php_hash_crc32.h " +
- "php_hash_types.h");
+ "php_hash_whirlpool.h php_hash_adler32.h php_hash_crc32.h");
}
diff --git a/ext/hash/package.xml b/ext/hash/package.xml
index 119cdd673d..25a598a4a1 100644
--- a/ext/hash/package.xml
+++ b/ext/hash/package.xml
@@ -42,7 +42,6 @@ Supported Algorithms:
<file role="src" name="config.w32"/>
<file role="src" name="hash.c"/>
<file role="src" name="php_hash.h"/>
- <file role="src" name="php_hash_types.h"/>
<file role="src" name="hash_md.c"/>
<file role="src" name="php_hash_md.h"/>
<file role="src" name="hash_sha.c"/>
diff --git a/ext/hash/php_hash.h b/ext/hash/php_hash.h
index 4bfddbacd9..3f5e7ced3a 100644
--- a/ext/hash/php_hash.h
+++ b/ext/hash/php_hash.h
@@ -22,7 +22,6 @@
#define PHP_HASH_H
#include "php.h"
-#include "php_hash_types.h"
#define PHP_HASH_EXTNAME "hash"
#define PHP_HASH_EXTVER "1.0"
@@ -30,6 +29,12 @@
#define PHP_HASH_HMAC 0x0001
+#define L64 INT64_C
+#define php_hash_int32 int32_t
+#define php_hash_uint32 uint32_t
+#define php_hash_int64 int64_t
+#define php_hash_uint64 uint64_t
+
typedef void (*php_hash_init_func_t)(void *context);
typedef void (*php_hash_update_func_t)(void *context, const unsigned char *buf, unsigned int count);
typedef void (*php_hash_final_func_t)(unsigned char *digest, void *context);
diff --git a/ext/hash/php_hash_types.h b/ext/hash/php_hash_types.h
deleted file mode 100644
index 8793da55d6..0000000000
--- a/ext/hash/php_hash_types.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 5 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2013 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Author: Michael Wallner <mike@php.net> |
- +----------------------------------------------------------------------+
-*/
-
-/* $Id$ */
-
-#ifndef PHP_HASH_TYPES_H
-#define PHP_HASH_TYPES_H
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#else
-#ifndef PHP_WIN32
-#include "php_config.h"
-#endif
-#endif
-
-#ifndef PHP_WIN32
-#if SIZEOF_LONG == 8
-#define L64(x) x
-typedef unsigned long php_hash_uint64;
-#if SIZEOF_INT == 4
-typedef unsigned int php_hash_uint32;
-#elif SIZEOF_SHORT == 4
-typedef unsigned short php_hash_uint32;
-#else
-#error "Need a 32bit integer type"
-#endif
-#elif SIZEOF_LONG_LONG == 8
-#define L64(x) x##LL
-typedef unsigned long long php_hash_uint64;
-#if SIZEOF_INT == 4
-typedef unsigned int php_hash_uint32;
-#elif SIZEOF_LONG == 4
-typedef unsigned long php_hash_uint32;
-#else
-#error "Need a 32bit integer type"
-#endif
-#else
-#error "Need a 64bit integer type"
-#endif
-#else
-#define L64(x) x##i64
-typedef unsigned __int64 php_hash_uint64;
-typedef unsigned __int32 php_hash_uint32;
-#endif
-
-#endif
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
diff --git a/ext/mysqlnd/config9.m4 b/ext/mysqlnd/config9.m4
index 3fc767b231..8d74c91ce5 100644
--- a/ext/mysqlnd/config9.m4
+++ b/ext/mysqlnd/config9.m4
@@ -48,16 +48,4 @@ fi
if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes" || test "$PHP_MYSQLI" != "no"; then
PHP_ADD_BUILD_DIR([ext/mysqlnd], 1)
-
- dnl This creates a file so it has to be after above macros
- PHP_CHECK_TYPES([int8 uint8 int16 uint16 int32 uint32 uchar ulong int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t], [
- ext/mysqlnd/php_mysqlnd_config.h
- ],[
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
- ])
fi
diff --git a/ext/mysqlnd/mysqlnd_portability.h b/ext/mysqlnd/mysqlnd_portability.h
index b9479150ae..72a156a795 100644
--- a/ext/mysqlnd/mysqlnd_portability.h
+++ b/ext/mysqlnd/mysqlnd_portability.h
@@ -36,8 +36,6 @@ This file is public domain and comes with NO WARRANTY of any kind */
#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
# include "ext/mysqlnd/config-win.h"
-#else
-# include <ext/mysqlnd/php_mysqlnd_config.h>
#endif /* _WIN32... */
#if __STDC_VERSION__ < 199901L && !defined(atoll)
@@ -45,14 +43,7 @@ This file is public domain and comes with NO WARRANTY of any kind */
#define atoll atol
#endif
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
+#include "php_stdint.h"
#if SIZEOF_LONG_LONG > 4 && !defined(_LONG_LONG)
#define _LONG_LONG 1 /* For AIX string library */
@@ -70,102 +61,6 @@ This file is public domain and comes with NO WARRANTY of any kind */
#define HAVE_LONG_LONG 1
#endif
-
-/* Typdefs for easyier portability */
-#ifndef HAVE_INT8_T
-#ifndef HAVE_INT8
-typedef signed char int8_t; /* Signed integer >= 8 bits */
-#else
-typedef int8 int8_t; /* Signed integer >= 8 bits */
-#endif
-#endif
-
-#ifndef HAVE_UINT8_T
-#ifndef HAVE_UINT8
-typedef unsigned char uint8_t; /* Unsigned integer >= 8 bits */
-#else
-typedef uint8 uint8_t; /* Signed integer >= 8 bits */
-#endif
-#endif
-
-#ifndef HAVE_INT16_T
-#ifndef HAVE_INT16
-typedef signed short int16_t; /* Signed integer >= 16 bits */
-#else
-typedef int16 int16_t; /* Signed integer >= 16 bits */
-#endif
-#endif
-
-#ifndef HAVE_UINT16_T
-#ifndef HAVE_UINT16
-typedef unsigned short uint16_t; /* Signed integer >= 16 bits */
-#else
-typedef uint16 uint16_t; /* Signed integer >= 16 bits */
-#endif
-#endif
-
-
-#ifndef HAVE_INT32_T
-#ifdef HAVE_INT32
-typedef int32 int32_t;
-#elif SIZEOF_INT == 4
-typedef signed int int32_t;
-#elif SIZEOF_LONG == 4
-typedef signed long int32_t;
-#else
-error "Neither int nor long is of 4 bytes width"
-#endif
-#endif /* HAVE_INT32_T */
-
-#ifndef HAVE_UINT32_T
-#ifdef HAVE_UINT32
-typedef uint32 uint32_t;
-#elif SIZEOF_INT == 4
-typedef unsigned int uint32_t;
-#elif SIZEOF_LONG == 4
-typedef unsigned long uint32_t;
-#else
-#error "Neither int nor long is of 4 bytes width"
-#endif
-#endif /* HAVE_UINT32_T */
-
-#ifndef HAVE_INT64_T
-#ifdef HAVE_INT64
-typedef int64 int64_t;
-#elif SIZEOF_INT == 8
-typedef signed int int64_t;
-#elif SIZEOF_LONG == 8
-typedef signed long int64_t;
-#elif SIZEOF_LONG_LONG == 8
-#ifdef PHP_WIN32
-typedef __int64 int64_t;
-#else
-typedef signed long long int64_t;
-#endif
-#else
-#error "Neither int nor long nor long long is of 8 bytes width"
-#endif
-#endif /* HAVE_INT64_T */
-
-#ifndef HAVE_UINT64_T
-#ifdef HAVE_UINT64
-typedef uint64 uint64_t;
-#elif SIZEOF_INT == 8
-typedef unsigned int uint64_t;
-#elif SIZEOF_LONG == 8
-typedef unsigned long uint64_t;
-#elif SIZEOF_LONG_LONG == 8
-#ifdef PHP_WIN32
-typedef unsigned __int64 uint64_t;
-#else
-typedef unsigned long long uint64_t;
-#endif
-#else
-#error "Neither int nor long nor long long is of 8 bytes width"
-#endif
-#endif /* HAVE_INT64_T */
-
-
#ifdef PHP_WIN32
#define MYSQLND_LLU_SPEC "%I64u"
#define MYSQLND_LL_SPEC "%I64d"
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index cd1b0a0860..ad00c02d72 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -12,7 +12,7 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Stig Sæther Bakken <ssb@php.net> |
+ | Authors: Stig S�ther Bakken <ssb@php.net> |
| Thies C. Arntzen <thies@thieso.net> |
| Maxim Maletsky <maxim@maxim.cx> |
| |
@@ -37,13 +37,6 @@
#include "php_ini.h"
#include "ext/standard/php_smart_str.h"
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#ifdef PHP_WIN32
-#include "win32/php_stdint.h"
-#endif
-
#if HAVE_OCI8
#if PHP_MAJOR_VERSION > 5
diff --git a/ext/phar/phar_internal.h b/ext/phar/phar_internal.h
index 9b8d608207..e0a9faf38f 100644
--- a/ext/phar/phar_internal.h
+++ b/ext/phar/phar_internal.h
@@ -63,9 +63,6 @@
#include "ext/spl/spl_iterators.h"
#endif
#include "php_phar.h"
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
#ifdef PHAR_HASH_OK
#include "ext/hash/php_hash.h"
#include "ext/hash/php_hash_sha.h"
diff --git a/ext/spl/php_spl.h b/ext/spl/php_spl.h
index 4794f12443..28aa19def3 100644
--- a/ext/spl/php_spl.h
+++ b/ext/spl/php_spl.h
@@ -20,11 +20,6 @@
#define PHP_SPL_H
#include "php.h"
-#if defined(PHP_WIN32)
-# include "win32/php_stdint.h"
-#elif defined(HAVE_STDINT_H)
-# include <stdint.h>
-#endif
#include <stdarg.h>
#if 0
diff --git a/ext/standard/crypt_freesec.h b/ext/standard/crypt_freesec.h
index a87663d4fe..860462a2dd 100644
--- a/ext/standard/crypt_freesec.h
+++ b/ext/standard/crypt_freesec.h
@@ -4,26 +4,13 @@
#define _CRYPT_FREESEC_H
#if PHP_WIN32
-# include "win32/php_stdint.h"
# ifndef inline
# define inline __inline
# endif
-#else
-# include "php_config.h"
-# if HAVE_INTTYPES_H
-# include <inttypes.h>
-# elif HAVE_STDINT_H
-# include <stdint.h>
-# endif
-# ifndef HAVE_UINT32_T
-# if SIZEOF_INT == 4
-typedef unsigned int uint32_t;
-# elif SIZEOF_LONG == 4
-typedef unsigned long int uint32_t;
-# endif
-# endif
#endif
+#include "php_stdint.h"
+
#define MD5_HASH_MAX_LEN 120
struct php_crypt_extended_data {
diff --git a/ext/standard/crypt_sha256.c b/ext/standard/crypt_sha256.c
index d334e3d477..ccfa66bd60 100644
--- a/ext/standard/crypt_sha256.c
+++ b/ext/standard/crypt_sha256.c
@@ -9,15 +9,9 @@
#include <limits.h>
#ifdef PHP_WIN32
-# include "win32/php_stdint.h"
# define __alignof__ __alignof
# define alloca _alloca
#else
-# if HAVE_INTTYPES_H
-# include <inttypes.h>
-# elif HAVE_STDINT_H
-# include <stdint.h>
-# endif
# ifndef HAVE_ALIGNOF
# include <stddef.h>
# define __alignof__(type) offsetof (struct { char c; type member;}, member)
diff --git a/ext/standard/crypt_sha512.c b/ext/standard/crypt_sha512.c
index 0955532131..ebabed9d24 100644
--- a/ext/standard/crypt_sha512.c
+++ b/ext/standard/crypt_sha512.c
@@ -8,15 +8,9 @@
#include <errno.h>
#include <limits.h>
#ifdef PHP_WIN32
-# include "win32/php_stdint.h"
# define __alignof__ __alignof
# define alloca _alloca
#else
-# if HAVE_INTTYPES_H
-# include <inttypes.h>
-# elif HAVE_STDINT_H
-# include <stdint.h>
-# endif
# ifndef HAVE_ALIGNOF
# include <stddef.h>
# define __alignof__(type) offsetof (struct { char c; type member;}, member)
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 6a67efbd7e..5ae729af0f 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -13,7 +13,7 @@
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Rasmus Lerdorf <rasmus@php.net> |
- | Stig Sæther Bakken <ssb@php.net> |
+ | Stig S�ther Bakken <ssb@php.net> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -23,11 +23,6 @@
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
#include <stdio.h>
-#ifdef PHP_WIN32
-# include "win32/php_stdint.h"
-#else
-# include <stdint.h>
-#endif
#include "php.h"
#include "php_rand.h"
#include "php_string.h"
diff --git a/ext/zip/lib/zipconf.h b/ext/zip/lib/zipconf.h
index 2b4340c861..646c0bde53 100644
--- a/ext/zip/lib/zipconf.h
+++ b/ext/zip/lib/zipconf.h
@@ -13,11 +13,7 @@
#define LIBZIP_VERSION_MINOR 10
#define LIBZIP_VERSION_MICRO 0
-#ifdef PHP_WIN32
-#include <win32/php_stdint.h>
-#else
-#include <inttypes.h>
-#endif
+#include <php_stdint.h>
typedef int8_t zip_int8_t;
#define ZIP_INT8_MIN INT8_MIN