summaryrefslogtreecommitdiff
path: root/ext/hash
diff options
context:
space:
mode:
Diffstat (limited to 'ext/hash')
-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
5 files changed, 8 insertions, 76 deletions
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
- */