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.5r2=1.80.2.3.2.3.2.6diff_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 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
-
-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.5r2=1.1.2.6diff_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 davidb at werj.com.au.
@@ -65,24 +65,6 @@
#include sys/types.h
#include string.h
-#ifdef TEST
-#include stdio.h
-#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) |
+