diff options
author | Arnaud Le Blanc <lbarnaud@php.net> | 2008-08-23 13:57:19 +0000 |
---|---|---|
committer | Arnaud Le Blanc <lbarnaud@php.net> | 2008-08-23 13:57:19 +0000 |
commit | 569ea282078741d443ae16f899a3df89fa8e1210 (patch) | |
tree | 2488dd098f183bc7da288e657f4e7d2f9865f7ab /ext | |
parent | 9d5ab6e54f4d0772400e39bfd906987f4ee22ab6 (diff) | |
download | php-git-569ea282078741d443ae16f899a3df89fa8e1210.tar.gz |
MFH: Fix build on solaris
Diffstat (limited to 'ext')
-rw-r--r-- | ext/standard/config.m4 | 21 | ||||
-rw-r--r-- | ext/standard/crypt_freesec.c | 2 | ||||
-rw-r--r-- | ext/standard/crypt_freesec.h | 7 |
3 files changed, 29 insertions, 1 deletions
diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index 125e7266a3..e42d390617 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -464,6 +464,27 @@ if test "$ac_cv_type_mbstate_t" = "yes"; then fi dnl +dnl Check for u_int32_t +dnl +AC_CACHE_CHECK([for u_int32_t], [ac_cv_type_u_int32_t],[ +AC_TRY_COMPILE([ +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +],[ +int __tmp__() { u_int32_t a; } +],[ + ac_cv_type_u_int32_t=yes +],[ + ac_cv_type_u_int32_t=no +])]) +if test "$ac_cv_type_u_int32_t" = "yes"; then + AC_DEFINE([HAVE_U_INT32_T], 1, [Define if your system has u_int32_t in sys/types.h]) +fi + +AC_C_INLINE + +dnl dnl Setup extension sources dnl PHP_NEW_EXTENSION(standard, array.c base64.c basic_functions.c browscap.c crc32.c crypt.c \ diff --git a/ext/standard/crypt_freesec.c b/ext/standard/crypt_freesec.c index c30616eed7..b9c8520167 100644 --- a/ext/standard/crypt_freesec.c +++ b/ext/standard/crypt_freesec.c @@ -184,7 +184,7 @@ static u_int32_t fp_maskl[8][256], fp_maskr[8][256]; static u_int32_t key_perm_maskl[8][128], key_perm_maskr[8][128]; static u_int32_t comp_maskl[8][128], comp_maskr[8][128]; -__inline int +static inline int ascii_to_bin(char ch) { if (ch > 'z') diff --git a/ext/standard/crypt_freesec.h b/ext/standard/crypt_freesec.h index f64ad2fcf0..0cbecacbdc 100644 --- a/ext/standard/crypt_freesec.h +++ b/ext/standard/crypt_freesec.h @@ -2,11 +2,18 @@ #ifndef _CRYPT_FREESEC_H #define _CRYPT_FREESEC_H +#include "php_config.h" + #if PHP_WIN32 # include "win32/php_stdint.h" #elif HAVE_STDINT_H # include <stdint.h> #endif +#if !PHP_WIN32 +# ifndef HAVE_U_INT32_T + typedef uint32_t u_int32_t; +# endif +#endif #define MD5_HASH_MAX_LEN 120 |