[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard config.m4 crypt_freesec.c crypt_freesec.h
janiMon Aug 25 13:42:55 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard config.m4 crypt_freesec.c crypt_freesec.h Log: MFH http://cvs.php.net/viewvc.cgi/php-src/ext/standard/config.m4?r1=1.80.2.3.2.3.2.5&r2=1.80.2.3.2.3.2.6&diff_format=u Index: php-src/ext/standard/config.m4 diff -u php-src/ext/standard/config.m4:1.80.2.3.2.3.2.5 php-src/ext/standard/config.m4:1.80.2.3.2.3.2.6 --- php-src/ext/standard/config.m4:1.80.2.3.2.3.2.5 Mon Aug 25 12:15:05 2008 +++ php-src/ext/standard/config.m4 Mon Aug 25 13:42:54 2008 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.80.2.3.2.3.2.5 2008/08/25 12:15:05 jani Exp $ -*- autoconf -*- +dnl $Id: config.m4,v 1.80.2.3.2.3.2.6 2008/08/25 13:42:54 jani Exp $ -*- autoconf -*- divert(3)dnl @@ -464,25 +464,6 @@ 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 -#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 - -dnl dnl Setup extension sources dnl PHP_NEW_EXTENSION(standard, array.c base64.c basic_functions.c browscap.c crc32.c crypt.c \ http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt_freesec.c?r1=1.1.2.5&r2=1.1.2.6&diff_format=u Index: php-src/ext/standard/crypt_freesec.c diff -u php-src/ext/standard/crypt_freesec.c:1.1.2.5 php-src/ext/standard/crypt_freesec.c:1.1.2.6 --- php-src/ext/standard/crypt_freesec.c:1.1.2.5Sat Aug 23 20:42:18 2008 +++ php-src/ext/standard/crypt_freesec.cMon Aug 25 13:42:54 2008 @@ -1,5 +1,5 @@ /* - $Id: crypt_freesec.c,v 1.1.2.5 2008/08/23 20:42:18 pajoye Exp $ + $Id: crypt_freesec.c,v 1.1.2.6 2008/08/25 13:42:54 jani Exp $ */ /* * This version is derived from the original implementation of FreeSec @@ -40,7 +40,7 @@ * SUCH DAMAGE. * * $Owl: Owl/packages/glibc/crypt_freesec.c,v 1.4 2005/11/16 13:08:32 solar Exp $ - * $Id: crypt_freesec.c,v 1.1.2.5 2008/08/23 20:42:18 pajoye Exp $ + * $Id: crypt_freesec.c,v 1.1.2.6 2008/08/25 13:42:54 jani Exp $ * * This is an original implementation of the DES and the crypt(3) interfaces * by David Burren . @@ -65,24 +65,6 @@ #include #include -#ifdef TEST -#include -#endif - - -#if defined(__GNUC__) -# ifdef inline -# undef inline -# endif -# define inline inline __attribute__((always_inline)) -#elif defined(_MSC_VER) -# define inline __forceinline -#else -# ifndef inline -# define inline -# endif -#endif - #include "crypt_freesec.h" #define _PASSWORD_EFMT1 '_' @@ -172,7 +154,7 @@ 2, 8, 24, 14, 32, 27, 3, 9, 19, 13, 30, 6, 22, 11, 4, 25 }; -static u_int32_t bits32[32] = +static uint32_t bits32[32] = { 0x8000, 0x4000, 0x2000, 0x1000, 0x0800, 0x0400, 0x0200, 0x0100, @@ -192,11 +174,11 @@ /* 0123456789012345678901234567890123456789012345678901234567890123 */ static u_char m_sbox[4][4096]; -static u_int32_t psbox[4][256]; -static u_int32_t ip_maskl[8][256], ip_maskr[8][256]; -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]; +static uint32_t psbox[4][256]; +static uint32_t ip_maskl[8][256], ip_maskr[8][256]; +static uint32_t fp_maskl[8][256], fp_maskr[8][256]; +static uint32_t key_perm_maskl[8][128], key_perm_maskr[8][128]; +static uint32_t comp_maskl[8][128], comp_maskr[8][128]; static inline int ascii_to_bin(char ch) @@ -220,8 +202,8 @@ _crypt_extended_init(void) { int i, j, b, k, inbit, obit; - u_int32_t *p, *il, *ir, *fl, *fr; - u_int32_t *bits28, *bits24; + uint32_t *p, *il, *ir, *fl, *fr; + uint32_t *bits28, *bits24; u_char inv_key_perm[64]; u_char u_key_perm[56]; u_char inv_comp_perm[56]; @@ -359,9 +341,9 @@ } static void -setup_salt(u_int32_t salt, struct php_crypt_extended_data *data) +setup_salt(uint32_t salt, struct php_crypt_extended_data *data) { - u_int32_t obit, saltbit, saltbits; + uint32_tobit, saltbit, saltbits; int i; if (salt == data->old_salt) @@ -383,19 +365,19 @@ static int des_setkey(const char *key, struct php_crypt_extended_data *data) { - u_int32_t k0, k1, rawkey0, rawkey1; + uint32_tk0, k1, rawkey0, rawkey1; int shifts, round; rawkey0 = - (u_int32_t)(u_char)key[3] | - ((u_int32_t)(u_char)key[2] << 8) | - ((u_int32_t)(u_char)key[1] << 16) | - ((u_int32_t)(u_char)key[0] << 24); + (uint32_t)(u_char)key[3] | + ((uint32_t)(u_char)key[2] << 8) | + ((uint32_t)(u_char)key[1] << 16) | +
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard config.m4
janiMon Aug 25 12:15:05 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard config.m4 Log: MFH http://cvs.php.net/viewvc.cgi/php-src/ext/standard/config.m4?r1=1.80.2.3.2.3.2.4&r2=1.80.2.3.2.3.2.5&diff_format=u Index: php-src/ext/standard/config.m4 diff -u php-src/ext/standard/config.m4:1.80.2.3.2.3.2.4 php-src/ext/standard/config.m4:1.80.2.3.2.3.2.5 --- php-src/ext/standard/config.m4:1.80.2.3.2.3.2.4 Sat Aug 23 13:57:19 2008 +++ php-src/ext/standard/config.m4 Mon Aug 25 12:15:05 2008 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.80.2.3.2.3.2.4 2008/08/23 13:57:19 lbarnaud Exp $ -*- autoconf -*- +dnl $Id: config.m4,v 1.80.2.3.2.3.2.5 2008/08/25 12:15:05 jani Exp $ -*- autoconf -*- divert(3)dnl @@ -482,8 +482,6 @@ 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 CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard config.m4 crypt_freesec.c crypt_freesec.h
lbarnaudSat Aug 23 13:57:19 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard config.m4 crypt_freesec.c crypt_freesec.h Log: MFH: Fix build on solaris http://cvs.php.net/viewvc.cgi/php-src/ext/standard/config.m4?r1=1.80.2.3.2.3.2.3&r2=1.80.2.3.2.3.2.4&diff_format=u Index: php-src/ext/standard/config.m4 diff -u php-src/ext/standard/config.m4:1.80.2.3.2.3.2.3 php-src/ext/standard/config.m4:1.80.2.3.2.3.2.4 --- php-src/ext/standard/config.m4:1.80.2.3.2.3.2.3 Mon Jul 28 11:50:34 2008 +++ php-src/ext/standard/config.m4 Sat Aug 23 13:57:19 2008 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.80.2.3.2.3.2.3 2008/07/28 11:50:34 pajoye Exp $ -*- autoconf -*- +dnl $Id: config.m4,v 1.80.2.3.2.3.2.4 2008/08/23 13:57:19 lbarnaud Exp $ -*- autoconf -*- divert(3)dnl @@ -464,6 +464,27 @@ 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 +#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 \ http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt_freesec.c?r1=1.1.2.3&r2=1.1.2.4&diff_format=u Index: php-src/ext/standard/crypt_freesec.c diff -u php-src/ext/standard/crypt_freesec.c:1.1.2.3 php-src/ext/standard/crypt_freesec.c:1.1.2.4 --- php-src/ext/standard/crypt_freesec.c:1.1.2.3Mon Jul 28 16:33:17 2008 +++ php-src/ext/standard/crypt_freesec.cSat Aug 23 13:57:19 2008 @@ -1,5 +1,5 @@ /* - $Id: crypt_freesec.c,v 1.1.2.3 2008/07/28 16:33:17 pajoye Exp $ + $Id: crypt_freesec.c,v 1.1.2.4 2008/08/23 13:57:19 lbarnaud Exp $ */ /* * This version is derived from the original implementation of FreeSec @@ -40,7 +40,7 @@ * SUCH DAMAGE. * * $Owl: Owl/packages/glibc/crypt_freesec.c,v 1.4 2005/11/16 13:08:32 solar Exp $ - * $Id: crypt_freesec.c,v 1.1.2.3 2008/07/28 16:33:17 pajoye Exp $ + * $Id: crypt_freesec.c,v 1.1.2.4 2008/08/23 13:57:19 lbarnaud Exp $ * * This is an original implementation of the DES and the crypt(3) interfaces * by David Burren . @@ -184,7 +184,7 @@ 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') http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt_freesec.h?r1=1.1.2.3&r2=1.1.2.4&diff_format=u Index: php-src/ext/standard/crypt_freesec.h diff -u php-src/ext/standard/crypt_freesec.h:1.1.2.3 php-src/ext/standard/crypt_freesec.h:1.1.2.4 --- php-src/ext/standard/crypt_freesec.h:1.1.2.3Fri Aug 8 08:20:27 2008 +++ php-src/ext/standard/crypt_freesec.hSat Aug 23 13:57:19 2008 @@ -1,12 +1,19 @@ -/* $Id: crypt_freesec.h,v 1.1.2.3 2008/08/08 08:20:27 bjori Exp $ */ +/* $Id: crypt_freesec.h,v 1.1.2.4 2008/08/23 13:57:19 lbarnaud Exp $ */ #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 #endif +#if !PHP_WIN32 +# ifndef HAVE_U_INT32_T + typedef uint32_t u_int32_t; +# endif +#endif #define MD5_HASH_MAX_LEN 120 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php