[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2008-08-23 Thread changelog
changelog   Sun Aug 24 01:32:05 2008 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3147r2=1.3148diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.3147 php-src/ChangeLog:1.3148
--- php-src/ChangeLog:1.3147Sat Aug 23 01:32:13 2008
+++ php-src/ChangeLog   Sun Aug 24 01:32:04 2008
@@ -1,3 +1,97 @@
+2008-08-23  Pierre-Alain Joye  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/standard/crypt_freesec.c
+  ext/standard/crypt_freesec.h:
+  - MFB: fix build (common inline definition will be done later)
+
+* ext/standard/flock_compat.c
+  ext/standard/flock_compat.h
+  win32/inet.h:
+  - more fixes for inet_* with vc9/xp
+
+* (PHP_5_3)
+  ext/standard/flock_compat.h:
+  - keep inet_aton declaration on non windows (what inet_aton has to do 
with
+  flock?)
+
+* win32/build/config.w32.h.in:
+  - MFB!!! _WIN32_WINNT and NTDDI_VERSION (bunnie--;)
+
+* win32/inet.c
+  win32/inet.h:
+  - MFB: fix logic, build correctly when the build targets xp/2k
+
+* win32/build/config.w32:
+  - we need it for vc  9 (even if php6 will support officially only 9)
+
+* win32/build/config.w32:
+  - readd the usual suspects to lib/include (was droped with the resolv.h
+  check removal)
+
+* (PHP_5_3)
+  ext/sockets/php_sockets_win.c
+  ext/sockets/sockets.c
+  ext/standard/basic_functions.c
+  ext/standard/dns.c
+  ext/standard/flock_compat.c
+  ext/standard/flock_compat.h
+  main/network.c
+  main/php_network.h
+  win32/glob.h
+  win32/inet.c
+  win32/inet.h
+  win32/build/config.w32:
+  - MFH:
+   - drop bindlib usage on windows
+   - inet_pton, inet_ntop and inet_aton are always available (VC9 uses the
+  CRT implementation, VC6 our own)
+
+2008-08-23  Hannes Magnusson  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/xmlreader/php_xmlreader.c:
+  fix proto
+
+* ext/xmlreader/php_xmlreader.c:
+  Fix proto
+
+2008-08-23  Pierre-Alain Joye  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  NEWS
+  main/main.c:
+  - MFH: expose MAXPATHLEN (PHP_MAXPATHLEN)
+
+* main/main.c:
+  - exposePHP_MAXPATHLEN
+
+* ext/standard/crypt_freesec.c
+  ext/standard/crypt_freesec.h:
+  - fix build
+
+2008-08-23  Felipe Pena  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/pspell/pspell.c
+  ext/pspell/tests/003.phpt
+  ext/pspell/tests/005.phpt:
+  MFH:
+  - WS, Cosmetics
+  - Removed unnecessary variables
+
+* ext/pspell/pspell.c
+  ext/pspell/tests/002.phpt:
+  - MFB: New parameter parsing API
+  - WS, Cosmetics
+
+2008-08-23  Arnaud Le Blanc  [EMAIL PROTECTED]
+
+* ext/standard/config.m4
+  ext/standard/crypt_freesec.c
+  ext/standard/crypt_freesec.h:
+  Fix build on solaris
+
 2008-08-22  Felipe Pena  [EMAIL PROTECTED]
 
 * ZendEngine2/zend_compile.c
@@ -3302,7 +3396,7 @@
 
 * sapi/litespeed/lsapi_main.c
   sapi/litespeed/lsapilib.c:
-  - Added missing $Id: ChangeLog,v 1.3147 2008/08/23 01:32:13 changelog 
Exp $ tags and nuked c++ comments
+  - Added missing $Id: ChangeLog,v 1.3148 2008/08/24 01:32:04 changelog 
Exp $ tags and nuked c++ comments
 
 * (PHP_5_3)
   ext/intl/locale/locale.c




[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard config.m4 crypt_freesec.c crypt_freesec.h

2008-08-23 Thread Arnaud Le Blanc
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.3r2=1.80.2.3.2.3.2.4diff_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 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 \
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt_freesec.c?r1=1.1.2.3r2=1.1.2.4diff_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 davidb at werj.com.au.
@@ -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.3r2=1.1.2.4diff_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 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
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/pspell pspell.c /ext/pspell/tests 002.phpt

2008-08-23 Thread Felipe Pena
felipe  Sat Aug 23 16:20:14 2008 UTC

  Modified files:  
/php-src/ext/pspell pspell.c 
/php-src/ext/pspell/tests   002.phpt 
  Log:
  - MFB: New parameter parsing API
  - WS, Cosmetics
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/pspell/pspell.c?r1=1.62r2=1.63diff_format=u
Index: php-src/ext/pspell/pspell.c
diff -u php-src/ext/pspell/pspell.c:1.62 php-src/ext/pspell/pspell.c:1.63
--- php-src/ext/pspell/pspell.c:1.62Wed Aug 13 08:08:30 2008
+++ php-src/ext/pspell/pspell.c Sat Aug 23 16:20:14 2008
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: pspell.c,v 1.62 2008/08/13 08:08:30 tony2001 Exp $ */
+/* $Id: pspell.c,v 1.63 2008/08/23 16:20:14 felipe Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -247,18 +247,16 @@
 }
 
 #define PSPELL_FETCH_CONFIG \
-   convert_to_long_ex(conf);   \
-   config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), type);   
\
+   config = (PspellConfig *) zend_list_find(conf, type);  \
if (config == NULL || type != le_pspell_config) {   \
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, %ld is not a 
PSPELL config index, Z_LVAL_PP(conf));   \
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, %ld is not a 
PSPELL config index, conf);  \
RETURN_FALSE;   \
}   \
 
 #define PSPELL_FETCH_MANAGER \
-   convert_to_long_ex(scin);   \
-   manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), type); 
\
+   manager = (PspellManager *) zend_list_find(scin, type);\
if (!manager || type != le_pspell) {\
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, %ld is not a 
PSPELL result index, Z_LVAL_PP(scin));   \
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, %ld is not a 
PSPELL result index, scin);  \
RETURN_FALSE;   \
}   \
 
@@ -280,9 +278,10 @@
Load a dictionary */
 static PHP_FUNCTION(pspell_new)
 {
-   zval **language,**spelling,**jargon,**encoding,**pmode;
+   char *language, *spelling = NULL, *jargon = NULL, *encoding = NULL;
+   int language_len, spelling_len = 0, jargon_len = 0, encoding_len = 0;
long mode = 0L,  speed = 0L;
-   int argc;
+   int argc = ZEND_NUM_ARGS();
int ind;
 
 #ifdef PHP_WIN32
@@ -297,9 +296,9 @@
PspellManager *manager;
PspellConfig *config;

-   argc = ZEND_NUM_ARGS();
-   if (argc  1 || argc  5 || 
zend_get_parameters_ex(argc,language,spelling,jargon,encoding,pmode) == 
FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(argc TSRMLS_CC, s|sssl, language, 
language_len, spelling, spelling_len,
+   jargon, jargon_len, encoding, encoding_len, mode) == 
FAILURE) {
+   return;
}
 
config = new_pspell_config();
@@ -308,12 +307,12 @@
/* If aspell was installed using installer, we should have a key
 * pointing to the location of the dictionaries
 */
-   if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) {
+   if (0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) {
LONG result;
dwLen = sizeof(aspell_dir) - 1;
result = RegQueryValueEx(hkey, , NULL, dwType, 
(LPBYTE)aspell_dir, dwLen);
RegCloseKey(hkey);
-   if(result == ERROR_SUCCESS) {
+   if (result == ERROR_SUCCESS) {
strlcpy(data_dir, aspell_dir, sizeof(data_dir));
strlcat(data_dir, \\data, sizeof(data_dir));
strlcpy(dict_dir, aspell_dir, sizeof(dict_dir));
@@ -325,46 +324,40 @@
}
 #endif
 
-   convert_to_string_ex(language);
-   pspell_config_replace(config, language-tag, Z_STRVAL_PP(language));
+   pspell_config_replace(config, language-tag, language);
 
-   if(argc  1){
-   convert_to_string_ex(spelling);
-   if(Z_STRLEN_PP(spelling)  0){
-   pspell_config_replace(config, spelling, 
Z_STRVAL_PP(spelling));
+   if (argc  1) {
+   if (spelling_len  0) {
+   pspell_config_replace(config, spelling, spelling);
}
}
 
-   if(argc  2){
-   convert_to_string_ex(jargon);
-   if(Z_STRLEN_PP(jargon)  0){
-   pspell_config_replace(config, jargon, 
Z_STRVAL_PP(jargon));
+   if (argc  2) {
+   if (jargon_len  0) {
+   pspell_config_replace(config, jargon, jargon);
}
}
 
-   if(argc  3){
-   convert_to_string_ex(encoding);
-   if(Z_STRLEN_PP(encoding)  0){
-   pspell_config_replace(config, encoding, 
Z_STRVAL_PP(encoding));
+   if (argc  3) {
+   if (encoding_len  0) {
+   

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pspell pspell.c /ext/pspell/tests 003.phpt 005.phpt

2008-08-23 Thread Felipe Pena
felipe  Sat Aug 23 16:32:04 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/pspell pspell.c 
/php-src/ext/pspell/tests   003.phpt 005.phpt 
  Log:
  MFH: 
  - WS, Cosmetics
  - Removed unnecessary variables
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/pspell/pspell.c?r1=1.45.2.4.2.7.2.5r2=1.45.2.4.2.7.2.6diff_format=u
Index: php-src/ext/pspell/pspell.c
diff -u php-src/ext/pspell/pspell.c:1.45.2.4.2.7.2.5 
php-src/ext/pspell/pspell.c:1.45.2.4.2.7.2.6
--- php-src/ext/pspell/pspell.c:1.45.2.4.2.7.2.5Wed Aug 13 08:08:47 2008
+++ php-src/ext/pspell/pspell.c Sat Aug 23 16:32:04 2008
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: pspell.c,v 1.45.2.4.2.7.2.5 2008/08/13 08:08:47 tony2001 Exp $ */
+/* $Id: pspell.c,v 1.45.2.4.2.7.2.6 2008/08/23 16:32:04 felipe Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -307,12 +307,12 @@
/* If aspell was installed using installer, we should have a key
 * pointing to the location of the dictionaries
 */
-   if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) {
+   if (0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) {
LONG result;
dwLen = sizeof(aspell_dir) - 1;
result = RegQueryValueEx(hkey, , NULL, dwType, 
(LPBYTE)aspell_dir, dwLen);
RegCloseKey(hkey);
-   if(result == ERROR_SUCCESS) {
+   if (result == ERROR_SUCCESS) {
strlcpy(data_dir, aspell_dir, sizeof(data_dir));
strlcat(data_dir, \\data, sizeof(data_dir));
strlcpy(dict_dir, aspell_dir, sizeof(dict_dir));
@@ -342,16 +342,16 @@
speed = mode  PSPELL_SPEED_MASK_INTERNAL;
 
/* First check what mode we want (how many suggestions) */
-   if(speed == PSPELL_FAST){
+   if (speed == PSPELL_FAST) {
pspell_config_replace(config, sug-mode, fast);
-   }else if(speed == PSPELL_NORMAL){
+   } else if (speed == PSPELL_NORMAL) {
pspell_config_replace(config, sug-mode, normal);
-   }else if(speed == PSPELL_BAD_SPELLERS){
+   } else if (speed == PSPELL_BAD_SPELLERS) {
pspell_config_replace(config, sug-mode, 
bad-spellers);
}

/* Then we see if run-together words should be treated as valid 
components */
-   if(mode  PSPELL_RUN_TOGETHER){
+   if (mode  PSPELL_RUN_TOGETHER) {
pspell_config_replace(config, run-together, true);
}
}
@@ -359,8 +359,8 @@
ret = new_pspell_manager(config);
delete_pspell_config(config);
 
-   if(pspell_error_number(ret) != 0){
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, PSPELL couldn't 
open the dictionary. reason: %s , pspell_error_message(ret));
+   if (pspell_error_number(ret) != 0) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, PSPELL couldn't 
open the dictionary. reason: %s, pspell_error_message(ret));
delete_pspell_can_have_error(ret);
RETURN_FALSE;
}
@@ -404,12 +404,12 @@
/* If aspell was installed using installer, we should have a key
 * pointing to the location of the dictionaries
 */
-   if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) {
+   if (0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) {
LONG result;
dwLen = sizeof(aspell_dir) - 1;
result = RegQueryValueEx(hkey, , NULL, dwType, 
(LPBYTE)aspell_dir, dwLen);
RegCloseKey(hkey);
-   if(result == ERROR_SUCCESS) {
+   if (result == ERROR_SUCCESS) {
strlcpy(data_dir, aspell_dir, sizeof(data_dir));
strlcat(data_dir, \\data, sizeof(data_dir));
strlcpy(dict_dir, aspell_dir, sizeof(dict_dir));
@@ -452,16 +452,16 @@
speed = mode  PSPELL_SPEED_MASK_INTERNAL;
 
/* First check what mode we want (how many suggestions) */
-   if(speed == PSPELL_FAST){
+   if (speed == PSPELL_FAST) {
pspell_config_replace(config, sug-mode, fast);
-   }else if(speed == PSPELL_NORMAL){
+   } else if (speed == PSPELL_NORMAL) {
pspell_config_replace(config, sug-mode, normal);
-   }else if(speed == PSPELL_BAD_SPELLERS){
+   } else if (speed == PSPELL_BAD_SPELLERS) {
pspell_config_replace(config, sug-mode, 
bad-spellers);
}

/* Then we see if run-together words should be treated as valid 
components */
-   if(mode  PSPELL_RUN_TOGETHER){
+  

Re: [PHP-CVS] cvs: php-src /ext/standard config.m4 crypt_freesec.c crypt_freesec.h

2008-08-23 Thread Pierre Joye
hi Arnaud,

this commit breaks the windows build. Parts of it makes little sense, see below:

On Sat, Aug 23, 2008 at 3:57 PM, Arnaud Le Blanc [EMAIL PROTECTED] wrote:
 lbarnaudSat Aug 23 13:57:02 2008 UTC

  Modified files:
/php-src/ext/standard   config.m4 crypt_freesec.c crypt_freesec.h
  Log:
  Fix build on solaris


 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/config.m4?r1=1.89r2=1.90diff_format=u
 Index: php-src/ext/standard/config.m4
 diff -u php-src/ext/standard/config.m4:1.89 
 php-src/ext/standard/config.m4:1.90
 --- php-src/ext/standard/config.m4:1.89 Mon Jul 28 11:34:53 2008
 +++ php-src/ext/standard/config.m4  Sat Aug 23 13:57:01 2008
 @@ -1,4 +1,4 @@
 -dnl $Id: config.m4,v 1.89 2008/07/28 11:34:53 pajoye Exp $ -*- autoconf -*-
 +dnl $Id: config.m4,v 1.90 2008/08/23 13:57:01 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 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 \
 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt_freesec.c?r1=1.2r2=1.3diff_format=u
 Index: php-src/ext/standard/crypt_freesec.c
 diff -u php-src/ext/standard/crypt_freesec.c:1.2 
 php-src/ext/standard/crypt_freesec.c:1.3
 --- php-src/ext/standard/crypt_freesec.c:1.2Mon Jul 28 16:32:48 2008
 +++ php-src/ext/standard/crypt_freesec.cSat Aug 23 13:57:01 2008
 @@ -1,5 +1,5 @@
  /*
 -  $Id: crypt_freesec.c,v 1.2 2008/07/28 16:32:48 pajoye Exp $
 +  $Id: crypt_freesec.c,v 1.3 2008/08/23 13:57:01 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.2 2008/07/28 16:32:48 pajoye Exp $
 + * $Id: crypt_freesec.c,v 1.3 2008/08/23 13:57:01 lbarnaud Exp $
  *
  * This is an original implementation of the DES and the crypt(3) interfaces
  * by David Burren davidb at werj.com.au.
 @@ -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

__inline is known on gcc and windows, adding a define for solaris
sounds more appropriate.

 +#include php_config.h

that breaks on win.

  #if PHP_WIN32
  # include win32/php_stdint.h
  #elif HAVE_STDINT_H
  # include stdint.h
  #endif
 +#if !PHP_WIN32

little #else instead? :)

 +# ifndef HAVE_U_INT32_T
 +   typedef uint32_t u_int32_t;
 +# endif
 +#endif

I don't understand this part. If  HAVE_U_INT32_T is not defined, you
still use u_int32_t?

I will commit the fixes for windows soonish but the last problem seems
to be wrong (sorry but I don't have any solaris to test).

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard crypt_freesec.c crypt_freesec.h

2008-08-23 Thread Pierre-Alain Joye
pajoye  Sat Aug 23 17:08:31 2008 UTC

  Modified files:  
/php-src/ext/standard   crypt_freesec.c crypt_freesec.h 
  Log:
  - fix build
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt_freesec.c?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/crypt_freesec.c
diff -u php-src/ext/standard/crypt_freesec.c:1.3 
php-src/ext/standard/crypt_freesec.c:1.4
--- php-src/ext/standard/crypt_freesec.c:1.3Sat Aug 23 13:57:01 2008
+++ php-src/ext/standard/crypt_freesec.cSat Aug 23 17:08:30 2008
@@ -1,5 +1,5 @@
 /*
-  $Id: crypt_freesec.c,v 1.3 2008/08/23 13:57:01 lbarnaud Exp $ 
+  $Id: crypt_freesec.c,v 1.4 2008/08/23 17:08:30 pajoye 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.3 2008/08/23 13:57:01 lbarnaud Exp $
+ * $Id: crypt_freesec.c,v 1.4 2008/08/23 17:08:30 pajoye Exp $
  *
  * This is an original implementation of the DES and the crypt(3) interfaces
  * by David Burren davidb at werj.com.au.
@@ -69,6 +69,20 @@
 #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 '_'
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt_freesec.h?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/crypt_freesec.h
diff -u php-src/ext/standard/crypt_freesec.h:1.3 
php-src/ext/standard/crypt_freesec.h:1.4
--- php-src/ext/standard/crypt_freesec.h:1.3Sat Aug 23 13:57:01 2008
+++ php-src/ext/standard/crypt_freesec.hSat Aug 23 17:08:30 2008
@@ -1,15 +1,15 @@
-/* $Id: crypt_freesec.h,v 1.3 2008/08/23 13:57:01 lbarnaud Exp $ */
+/* $Id: crypt_freesec.h,v 1.4 2008/08/23 17:08:30 pajoye 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 stdint.h
-#endif
-#if !PHP_WIN32
+#else
+# include php_config.h
+# if HAVE_STDINT_H
+#  include stdint.h
+# endif
 # ifndef HAVE_U_INT32_T
typedef uint32_t u_int32_t;
 # endif



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file

2008-08-23 Thread Antony Dovgal

Hello Raghubansh.

Just curious, did you happen to run these tests on AIX?
One of them, specifically this one:
ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt 
creates an interesting directory ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2

which contains a hardlink to itself and so ad infinitum.

I don't even know how to delete it now since rm fails with Illegal 
instruction =)

Any ideas?

On 05.07.2007 22:53, Raghubansh Kumar wrote:

kraghubaThu Jul  5 18:53:34 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/file
	symlink_link_linkinfo_is_link_error1.phpt 
	symlink_link_linkinfo_is_link_error2.phpt 
	symlink_link_linkinfo_is_link_variation1.phpt 
	symlink_link_linkinfo_is_link_variation2.phpt 
	symlink_link_linkinfo_is_link_variation3.phpt 
	symlink_link_linkinfo_is_link_variation4.phpt 
	symlink_link_linkinfo_is_link_variation5.phpt 
	symlink_link_linkinfo_is_link_basic1.phpt 
	symlink_link_linkinfo_is_link_variation6.phpt 
	symlink_link_linkinfo_is_link_basic2.phpt 
	symlink_link_linkinfo_is_link_variation7.phpt 
	symlink_link_linkinfo_is_link_variation8.phpt 
	symlink_link_linkinfo_is_link_variation9.phpt 




  Modified files:  
/php-src/ext/standard/tests/file	filegroup_basic.phpt 
	006_error.phpt 
  Log:

  fix test: 006_error.phpt  filegroup_basic.phpt
  fix and smaller tests for 
symlink_link_linkinfo_is_link[basic|error|variation].phpt
   
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/filegroup_basic.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u

Index: php-src/ext/standard/tests/file/filegroup_basic.phpt
diff -u php-src/ext/standard/tests/file/filegroup_basic.phpt:1.1.2.1 
php-src/ext/standard/tests/file/filegroup_basic.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/filegroup_basic.phpt:1.1.2.1Wed Jun 
13 22:38:49 2007
+++ php-src/ext/standard/tests/file/filegroup_basic.phptThu Jul  5 
18:53:33 2007
@@ -2,8 +2,8 @@
 Test filegroup() function: basic functionality
 --SKIPIF--
 ?php
-if (!function_exists(posix_getgrgid)) { 
-   die(skip no posix_getgrgid);

+if( substr(PHP_OS, 0, 3) == 'WIN') {
+  die('skip Not valid for Windows');
 }
 ?
 --FILE--
@@ -17,7 +17,7 @@
 echo -- Testing with the file or directory created by owner --\n;
 
 $file_path = dirname(__FILE__);

-var_dump( posix_getgrgid( filegroup(__FILE__) ) );
+var_dump( filegroup(__FILE__) );
 var_dump( filegroup(.) );
 var_dump( filegroup(./..) );
 
@@ -55,25 +55,15 @@

 --EXPECTF--
 *** Testing filegroup(): basic functionality ***
 -- Testing with the file or directory created by owner --
-array(4) {
-  [name]=
-  string(%d) %s
-  [passwd]=
-  string(1) x
-  [members]=
-  array(0) {
-  }
-  [gid]=
-  int(%d)
-}
+int(%d)
 int(%d)
 int(%d)
 int(%d)
 int(%d)
 
 -- Testing with the standard file or directory --

-int(0)
-int(0)
-int(0)
+int(%d)
+int(%d)
+int(%d)
 
 *** Done ***

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/006_error.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/006_error.phpt
diff -u php-src/ext/standard/tests/file/006_error.phpt:1.1.2.1 
php-src/ext/standard/tests/file/006_error.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/006_error.phpt:1.1.2.1  Mon Jun 11 
16:14:59 2007
+++ php-src/ext/standard/tests/file/006_error.phpt  Thu Jul  5 18:53:33 2007
@@ -5,9 +5,17 @@
 if (substr(PHP_OS, 0, 3) == 'WIN') {
 die('skip Not on Windows');
 }
-elseif (get_current_user() == 'root') {
- die( skip Do not run with root permissions );
+// Skip if being run by root
+$filename = dirname(__FILE__)./006_root_check.tmp;
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+unlink ($filename);
+die('skip...cannot be run as root\n');
 }
+
+unlink($filename);
+
 ?
 --FILE--
 ?php
@@ -60,11 +68,11 @@
 --EXPECTF--
 *** Testing error conditions for fileperms(), chmod() ***
 
-Warning: chmod(): Operation not permitted in %s on line %d

+Warning: chmod(): %s in %s on line %d
 bool(false)
 100644
 
-Warning: chmod(): Operation not permitted in %s on line %d

+Warning: chmod(): %s in %s on line %d
 bool(false)
 40755
 


http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt
+++ 

[PHP-CVS] cvs: php-src /main main.c

2008-08-23 Thread Pierre-Alain Joye
pajoye  Sat Aug 23 17:53:19 2008 UTC

  Modified files:  
/php-src/main   main.c 
  Log:
  - exposePHP_MAXPATHLEN
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.780r2=1.781diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.780 php-src/main/main.c:1.781
--- php-src/main/main.c:1.780   Fri Aug 22 12:59:38 2008
+++ php-src/main/main.c Sat Aug 23 17:53:19 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.780 2008/08/22 12:59:38 helly Exp $ */
+/* $Id: main.c,v 1.781 2008/08/23 17:53:19 pajoye Exp $ */
 
 /* {{{ includes
  */
@@ -1914,6 +1914,7 @@
REGISTER_MAIN_STRINGL_CONSTANT(PHP_CONFIG_FILE_SCAN_DIR, 
PHP_CONFIG_FILE_SCAN_DIR, sizeof(PHP_CONFIG_FILE_SCAN_DIR)-1, CONST_PERSISTENT 
| CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_SHLIB_SUFFIX, PHP_SHLIB_SUFFIX, 
sizeof(PHP_SHLIB_SUFFIX)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_EOL, PHP_EOL, sizeof(PHP_EOL)-1, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_MAXPATHLEN, MAXPATHLEN, 
CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT(PHP_INT_MAX, LONG_MAX, CONST_PERSISTENT | 
CONST_CS);
REGISTER_MAIN_LONG_CONSTANT(PHP_INT_SIZE, sizeof(long), 
CONST_PERSISTENT | CONST_CS);
 



-- 
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) / NEWS /main main.c

2008-08-23 Thread Pierre-Alain Joye
pajoye  Sat Aug 23 17:55:54 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
/php-src/main   main.c 
  Log:
  - MFH: expose MAXPATHLEN (PHP_MAXPATHLEN)
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.283r2=1.2027.2.547.2.965.2.284diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.283 
php-src/NEWS:1.2027.2.547.2.965.2.284
--- php-src/NEWS:1.2027.2.547.2.965.2.283   Wed Aug 20 20:35:34 2008
+++ php-src/NEWSSat Aug 23 17:55:50 2008
@@ -18,6 +18,7 @@
 - Added stream_context_set_default() function. (Davey Shafik)
 - Added optional is_xhtml parameter to nl2br() which makes the function
   output br when false and br / when true (FR #34381). (Kalle)
+- Added PHP_MAXPATHLEN constant (maximum length of a path). (Pierre)
 
 - Improved Windows support and portability for stat(), touch(), filemtime(),
   filesize() and related functions. (Pierre)
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.30r2=1.640.2.23.2.57.2.31diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.30 
php-src/main/main.c:1.640.2.23.2.57.2.31
--- php-src/main/main.c:1.640.2.23.2.57.2.30Fri Aug 22 12:59:46 2008
+++ php-src/main/main.c Sat Aug 23 17:55:50 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.30 2008/08/22 12:59:46 helly Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.31 2008/08/23 17:55:50 pajoye Exp $ */
 
 /* {{{ includes
  */
@@ -1799,6 +1799,7 @@
REGISTER_MAIN_STRINGL_CONSTANT(PHP_CONFIG_FILE_SCAN_DIR, 
PHP_CONFIG_FILE_SCAN_DIR, sizeof(PHP_CONFIG_FILE_SCAN_DIR)-1, CONST_PERSISTENT 
| CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_SHLIB_SUFFIX, PHP_SHLIB_SUFFIX, 
sizeof(PHP_SHLIB_SUFFIX)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_EOL, PHP_EOL, sizeof(PHP_EOL)-1, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_MAXPATHLEN, MAXPATHLEN, 
CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT(PHP_INT_MAX, LONG_MAX, CONST_PERSISTENT | 
CONST_CS);
REGISTER_MAIN_LONG_CONSTANT(PHP_INT_SIZE, sizeof(long), 
CONST_PERSISTENT | CONST_CS);
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/standard config.m4 crypt_freesec.c crypt_freesec.h

2008-08-23 Thread Arnaud Le Blanc
Hi,

On Saturday 23 August 2008 18:50:37 Pierre Joye wrote:
  -__inline int
  +static inline int
 
 __inline is known on gcc and windows, adding a define for solaris
 sounds more appropriate.

The commit adds AC_C_INLINE in config.m4, which defines inline appropriatly 
to 
__inline or __inline__ if the compiler does not know the inline keyword.

Basically it does what you added in your commit, but without forcing inlining, 
and unlike a test against some known compiler macros, this will work on all 
compilers by checking what they actually support.
For instance your code will check only GCC and the MS compiler, and the last 
#else may miss the fact that the compiler actually supported __inline or 
__inline__.

For static before inline, it avoids a problem with the Sun compiler 
(without static the compiler references the function but does not actually 
outputs it).

 
  +#include php_config.h
 
 that breaks on win.

Sorry

 
   #if PHP_WIN32
   # include win32/php_stdint.h
   #elif HAVE_STDINT_H
   # include stdint.h
   #endif
  +#if !PHP_WIN32
 
 little #else instead? :)
 
  +# ifndef HAVE_U_INT32_T
  +   typedef uint32_t u_int32_t;
  +# endif
  +#endif
 
 I don't understand this part. If  HAVE_U_INT32_T is not defined, you
 still use u_int32_t?

If HAVE_U_INT32_T is not defined that means that u_int32_t is not defined.
So I define u_int32_t it to uint32_t. This makes sense for me.

 
 I will commit the fixes for windows soonish but the last problem seems
 to be wrong (sorry but I don't have any solaris to test).
 
 Cheers,
 -- 
 Pierre
 
 http://blog.thepimp.net | http://www.libgd.org
 

Regards,

Arnaud


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/xmlreader php_xmlreader.c

2008-08-23 Thread Hannes Magnusson
bjori   Sat Aug 23 18:06:43 2008 UTC

  Modified files:  
/php-src/ext/xmlreader  php_xmlreader.c 
  Log:
  Fix proto
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlreader/php_xmlreader.c?r1=1.52r2=1.53diff_format=u
Index: php-src/ext/xmlreader/php_xmlreader.c
diff -u php-src/ext/xmlreader/php_xmlreader.c:1.52 
php-src/ext/xmlreader/php_xmlreader.c:1.53
--- php-src/ext/xmlreader/php_xmlreader.c:1.52  Mon Jun 16 15:44:22 2008
+++ php-src/ext/xmlreader/php_xmlreader.c   Sat Aug 23 18:06:43 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_xmlreader.c,v 1.52 2008/06/16 15:44:22 rrichards Exp $ */
+/* $Id: php_xmlreader.c,v 1.53 2008/08/23 18:06:43 bjori Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -958,7 +958,7 @@
 */
 
 #if LIBXML_VERSION = 20620
-/* {{{ proto boolean XMLReader::readInnerXml() U
+/* {{{ proto string XMLReader::readInnerXml() U
 Reads the contents of the current node, including child nodes and markup. */
 PHP_METHOD(xmlreader, readInnerXml)
 {



-- 
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/xmlreader php_xmlreader.c

2008-08-23 Thread Hannes Magnusson
bjori   Sat Aug 23 18:06:59 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/xmlreader  php_xmlreader.c 
  Log:
  fix proto
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlreader/php_xmlreader.c?r1=1.13.2.14.2.9.2.5r2=1.13.2.14.2.9.2.6diff_format=u
Index: php-src/ext/xmlreader/php_xmlreader.c
diff -u php-src/ext/xmlreader/php_xmlreader.c:1.13.2.14.2.9.2.5 
php-src/ext/xmlreader/php_xmlreader.c:1.13.2.14.2.9.2.6
--- php-src/ext/xmlreader/php_xmlreader.c:1.13.2.14.2.9.2.5 Mon Jun 16 
15:45:06 2008
+++ php-src/ext/xmlreader/php_xmlreader.c   Sat Aug 23 18:06:59 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_xmlreader.c,v 1.13.2.14.2.9.2.5 2008/06/16 15:45:06 rrichards Exp 
$ */
+/* $Id: php_xmlreader.c,v 1.13.2.14.2.9.2.6 2008/08/23 18:06:59 bjori Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -924,7 +924,7 @@
 */
 
 #if LIBXML_VERSION = 20620
-/* {{{ proto boolean XMLReader::readInnerXml()
+/* {{{ proto string XMLReader::readInnerXml()
 Reads the contents of the current node, including child nodes and markup. */
 PHP_METHOD(xmlreader, readInnerXml)
 {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/standard config.m4 crypt_freesec.c crypt_freesec.h

2008-08-23 Thread Pierre Joye
hi,

On Sat, Aug 23, 2008 at 7:57 PM, Arnaud Le Blanc [EMAIL PROTECTED] wrote:

 The commit adds AC_C_INLINE in config.m4, which defines inline appropriatly 
 to
 __inline or __inline__ if the compiler does not know the inline keyword.

 Basically it does what you added in your commit, but without forcing inlining,

The latter is an optimization, I should have added it in my commit
msg. By the way, config.m4 is unix only and is completely useless on
windows.

 and unlike a test against some known compiler macros, this will work on all
 compilers by checking what they actually support.

Except windows (and certainly other).

 For instance your code will check only GCC and the MS compiler, and the last
 #else may miss the fact that the compiler actually supported __inline or
 __inline__.

 For static before inline, it avoids a problem with the Sun compiler
 (without static the compiler references the function but does not actually
 outputs it).

So please apply the correct fix, but keep the windows linux and
windows build safe. That certainly means to add what you need in the
src or add a portable way to use inline (like in zend, which is where
I took the #ifdef). That would be actually the best solution (in
php_config.h and config.w32.h).

  +# ifndef HAVE_U_INT32_T
  +   typedef uint32_t u_int32_t;
  +# endif
  +#endif

 I don't understand this part. If  HAVE_U_INT32_T is not defined, you
 still use u_int32_t?

 If HAVE_U_INT32_T is not defined that means that u_int32_t is not defined.
 So I define u_int32_t it to uint32_t. This makes sense for me.

It defines unint32_t not u_int32_t. The define should be HAVE_UINT32_T
if what you test is uint32_t.

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/standard config.m4 crypt_freesec.c crypt_freesec.h

2008-08-23 Thread Arnaud Le Blanc
Hi,

On Saturday 23 August 2008 20:16:16 Pierre Joye wrote:
 hi,
 
   +# ifndef HAVE_U_INT32_T
   +   typedef uint32_t u_int32_t;
   +# endif
   +#endif
 
  I don't understand this part. If  HAVE_U_INT32_T is not defined, you
  still use u_int32_t?
 
  If HAVE_U_INT32_T is not defined that means that u_int32_t is not defined.
  So I define u_int32_t it to uint32_t. This makes sense for me.
 
 It defines unint32_t not u_int32_t. The define should be HAVE_UINT32_T
 if what you test is uint32_t.

This is a typedef, not a #define ;)

 
 Cheers,
 -- 
 Pierre
 
 http://blog.thepimp.net | http://www.libgd.org
 

Regards,

Arnaud

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/standard config.m4 crypt_freesec.c crypt_freesec.h

2008-08-23 Thread Pierre Joye
On Sat, Aug 23, 2008 at 9:15 PM, Arnaud Le Blanc [EMAIL PROTECTED] wrote:
 Hi,

 On Saturday 23 August 2008 20:16:16 Pierre Joye wrote:
 hi,

   +# ifndef HAVE_U_INT32_T
   +   typedef uint32_t u_int32_t;
   +# endif
   +#endif
 
  I don't understand this part. If  HAVE_U_INT32_T is not defined, you
  still use u_int32_t?
 
  If HAVE_U_INT32_T is not defined that means that u_int32_t is not defined.
  So I define u_int32_t it to uint32_t. This makes sense for me.

 It defines unint32_t not u_int32_t. The define should be HAVE_UINT32_T
 if what you test is uint32_t.

 This is a typedef, not a #define ;)

 HAVE_U_INT32_T is a define  or a /D (or whatever uses other compilers)  :-)

-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

-- 
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/sockets php_sockets_win.c sockets.c /ext/standard basic_functions.c dns.c flock_compat.c flock_compat.h /main network.c php_network.h /win32 glob.h inet.c inet.

2008-08-23 Thread Pierre-Alain Joye
pajoye  Sat Aug 23 19:22:11 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/win32  inet.c inet.h 

  Modified files:  
/php-src/ext/socketsphp_sockets_win.c sockets.c 
/php-src/ext/standard   basic_functions.c dns.c flock_compat.c 
flock_compat.h 
/php-src/main   network.c php_network.h 
/php-src/win32/buildconfig.w32 
/php-src/win32  glob.h 
  Log:
  - MFH:
   - drop bindlib usage on windows
   - inet_pton, inet_ntop and inet_aton are always available (VC9 uses the CRT 
implementation, VC6 our own)
  http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/php_sockets_win.c?r1=1.12.2.1.2.2.2.1r2=1.12.2.1.2.2.2.2diff_format=u
Index: php-src/ext/sockets/php_sockets_win.c
diff -u php-src/ext/sockets/php_sockets_win.c:1.12.2.1.2.2.2.1 
php-src/ext/sockets/php_sockets_win.c:1.12.2.1.2.2.2.2
--- php-src/ext/sockets/php_sockets_win.c:1.12.2.1.2.2.2.1  Mon Dec 31 
07:17:13 2007
+++ php-src/ext/sockets/php_sockets_win.c   Sat Aug 23 19:22:07 2008
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: php_sockets_win.c,v 1.12.2.1.2.2.2.1 2007/12/31 07:17:13 sebastian Exp 
$ */
+/* $Id: php_sockets_win.c,v 1.12.2.1.2.2.2.2 2008/08/23 19:22:07 pajoye Exp $ 
*/
 
 
 #ifdef PHP_WIN32
@@ -72,13 +72,4 @@
return 0;
 }
 
-int inet_aton(const char *cp, struct in_addr *inp) {
-  inp-s_addr = inet_addr(cp);
-
-  if (inp-s_addr == INADDR_NONE) {
- return 0;
-  }
-
-  return 1;
-}
 #endif
http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.171.2.9.2.14.2.5r2=1.171.2.9.2.14.2.6diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.171.2.9.2.14.2.5 
php-src/ext/sockets/sockets.c:1.171.2.9.2.14.2.6
--- php-src/ext/sockets/sockets.c:1.171.2.9.2.14.2.5Wed Jul 16 14:08:38 2008
+++ php-src/ext/sockets/sockets.c   Sat Aug 23 19:22:07 2008
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: sockets.c,v 1.171.2.9.2.14.2.5 2008/07/16 14:08:38 jani Exp $ */
+/* $Id: sockets.c,v 1.171.2.9.2.14.2.6 2008/08/23 19:22:07 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -33,8 +33,15 @@
 #include ext/standard/file.h
 #include ext/standard/info.h
 #include php_ini.h
-
-#ifndef PHP_WIN32
+#ifdef PHP_WIN32
+# include win32/inet.h
+# include winsock2.h
+# include windows.h
+# include Ws2tcpip.h
+# include php_sockets.h
+# include php_sockets_win.h
+# define IS_INVALID_SOCKET(a)  (a-bsd_socket == INVALID_SOCKET)
+#else
 # include php_sockets.h
 # include sys/types.h
 # include sys/socket.h
@@ -51,10 +58,6 @@
 # include sys/uio.h
 # define IS_INVALID_SOCKET(a)  (a-bsd_socket  0)
 # define set_errno(a) (errno = a)
-#else /* windows */
-# include php_sockets.h
-# include php_sockets_win.h
-# define IS_INVALID_SOCKET(a)  (a-bsd_socket == INVALID_SOCKET)
 #endif
 
 ZEND_DECLARE_MODULE_GLOBALS(sockets)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.61r2=1.725.2.31.2.64.2.62diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.61 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.62
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.61 Thu Aug 21 
16:55:45 2008
+++ php-src/ext/standard/basic_functions.c  Sat Aug 23 19:22:08 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.61 2008/08/21 16:55:45 helly Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.62 2008/08/23 19:22:08 pajoye 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -63,7 +63,11 @@
 #include netinet/in.h
 #endif
 
-#include netdb.h
+#ifndef PHP_WIN32
+# include netdb.h
+#else
+#include win32/inet.h
+#endif
 
 #if HAVE_ARPA_INET_H
 # include arpa/inet.h
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns.c?r1=1.70.2.7.2.5.2.6r2=1.70.2.7.2.5.2.7diff_format=u
Index: php-src/ext/standard/dns.c
diff -u php-src/ext/standard/dns.c:1.70.2.7.2.5.2.6 
php-src/ext/standard/dns.c:1.70.2.7.2.5.2.7
--- php-src/ext/standard/dns.c:1.70.2.7.2.5.2.6 Fri May 23 09:40:44 2008
+++ php-src/ext/standard/dns.c  Sat Aug 23 19:22:08 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: dns.c,v 1.70.2.7.2.5.2.6 2008/05/23 09:40:44 mattwil Exp $ */
+/* $Id: dns.c,v 1.70.2.7.2.5.2.7 2008/08/23 19:22:08 pajoye Exp $ */
 
 /* {{{ includes */
 #include php.h
@@ -29,23 +29,10 @@
 #endif
 
 #ifdef PHP_WIN32
-#if HAVE_LIBBIND
-#ifndef WINNT
-#define WINNT 1
-#endif
-/* located in www.php.net/extra/bindlib.zip */
-#if HAVE_ARPA_INET_H
-#include arpa/inet.h
-#endif
-#include netdb.h
-#if HAVE_ARPA_NAMESERV_H
-#include arpa/nameser.h
-#endif
-#if HAVE_RESOLV_H
-#include resolv.h
-#endif
-#endif /* 

Re: [PHP-CVS] cvs: php-src /ext/standard config.m4 crypt_freesec.c crypt_freesec.h

2008-08-23 Thread Arnaud Le Blanc
On Saturday 23 August 2008 21:21:16 Pierre Joye wrote:
 On Sat, Aug 23, 2008 at 9:15 PM, Arnaud Le Blanc [EMAIL PROTECTED] wrote:
  Hi,
 
  On Saturday 23 August 2008 20:16:16 Pierre Joye wrote:
  hi,
 
+# ifndef HAVE_U_INT32_T
+   typedef uint32_t u_int32_t;
+# endif
+#endif
  
   I don't understand this part. If  HAVE_U_INT32_T is not defined, you
   still use u_int32_t?
  
   If HAVE_U_INT32_T is not defined that means that u_int32_t is not 
defined.
   So I define u_int32_t it to uint32_t. This makes sense for me.
 
  It defines unint32_t not u_int32_t. The define should be HAVE_UINT32_T
  if what you test is uint32_t.
 
  This is a typedef, not a #define ;)
 
  HAVE_U_INT32_T is a define  or a /D (or whatever uses other compilers)  :-)

Yes, but I was speaking about this line:
typedef uint32_t u_int32_t;

 
 -- 
 Pierre
 
 http://blog.thepimp.net | http://www.libgd.org
 

Regards,

Arnaud


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /win32/build config.w32

2008-08-23 Thread Pierre-Alain Joye
pajoye  Sat Aug 23 19:39:07 2008 UTC

  Modified files:  
/php-src/win32/buildconfig.w32 
  Log:
  - readd the usual suspects to lib/include (was droped with the resolv.h check 
removal)
  
http://cvs.php.net/viewvc.cgi/php-src/win32/build/config.w32?r1=1.83r2=1.84diff_format=u
Index: php-src/win32/build/config.w32
diff -u php-src/win32/build/config.w32:1.83 php-src/win32/build/config.w32:1.84
--- php-src/win32/build/config.w32:1.83 Thu Aug 21 23:37:40 2008
+++ php-src/win32/build/config.w32  Sat Aug 23 19:39:07 2008
@@ -1,5 +1,5 @@
 // vim:ft=javascript
-// $Id: config.w32,v 1.83 2008/08/21 23:37:40 pajoye Exp $
+// $Id: config.w32,v 1.84 2008/08/23 19:39:07 pajoye Exp $
 // Master config file; think of it as a configure.in
 // equivalent.
 
@@ -246,6 +246,25 @@
if (PHP_PHP_BUILD != no) {
php_usual_include_suspects += ; + PHP_PHP_BUILD + \\include;
php_usual_lib_suspects += ; + PHP_PHP_BUILD + \\lib;
+
+   path = php_usual_include_suspects.split(';');
+   for (i = 0; i  path.length; i++) {
+   f = FSO.GetAbsolutePathName(path[i]);
+   if (FSO.FolderExists(f)) {
+   ADD_FLAG(CFLAGS, '/I ' + f + ' ');
+   }
+   }
+   path = php_usual_lib_suspects.split(';');
+   for (i = 0; i  path.length; i++) {
+   f = FSO.GetAbsolutePathName(path[i]);
+   if (FSO.FolderExists(f)) {
+   if (VCVERS = 1200  f.indexOf( ) = 0) {
+   ADD_FLAG(LDFLAGS, '/libpath:\\' + f 
+ '\\ ');
+   } else {
+   ADD_FLAG(LDFLAGS, '/libpath:' + f + 
' ');
+   }
+   }
+   }
}
 }
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /win32/build config.w32

2008-08-23 Thread Pierre-Alain Joye
pajoye  Sat Aug 23 19:50:36 2008 UTC

  Modified files:  
/php-src/win32/buildconfig.w32 
  Log:
  - we need it for vc  9 (even if php6 will support officially only 9)
  
http://cvs.php.net/viewvc.cgi/php-src/win32/build/config.w32?r1=1.84r2=1.85diff_format=u
Index: php-src/win32/build/config.w32
diff -u php-src/win32/build/config.w32:1.84 php-src/win32/build/config.w32:1.85
--- php-src/win32/build/config.w32:1.84 Sat Aug 23 19:39:07 2008
+++ php-src/win32/build/config.w32  Sat Aug 23 19:50:36 2008
@@ -1,5 +1,5 @@
 // vim:ft=javascript
-// $Id: config.w32,v 1.84 2008/08/23 19:39:07 pajoye Exp $
+// $Id: config.w32,v 1.85 2008/08/23 19:50:36 pajoye Exp $
 // Master config file; think of it as a configure.in
 // equivalent.
 
@@ -339,6 +339,8 @@
php_open_temporary_file.c php_logos.c output.c internal_functions.c 
php_sprintf.c \
getopt.c);
 
+ADD_SOURCES(win32, inet.c);
+
 ADD_SOURCES(main/streams, streams.c cast.c memory.c filter.c 
plain_wrapper.c \
userspace.c transports.c xp_socket.c mmap.c unicode_filter.c 
glob_wrapper.c);
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /win32 inet.c inet.h

2008-08-23 Thread Pierre-Alain Joye
pajoye  Sat Aug 23 19:55:44 2008 UTC

  Modified files:  
/php-src/win32  inet.c inet.h 
  Log:
  - MFB: fix logic, build correctly when the build targets xp/2k
  
http://cvs.php.net/viewvc.cgi/php-src/win32/inet.c?r1=1.1r2=1.2diff_format=u
Index: php-src/win32/inet.c
diff -u php-src/win32/inet.c:1.1 php-src/win32/inet.c:1.2
--- php-src/win32/inet.c:1.1Thu Aug 21 23:37:40 2008
+++ php-src/win32/inet.cSat Aug 23 19:55:44 2008
@@ -1,5 +1,5 @@
-#if _MSC_VER  1500
 #include config.w32.h
+#if (_WIN32_WINNT  0x0600) /* Vita/2k8 have these functions */
 #include php.h
 #include winsock2.h
 #include windows.h
http://cvs.php.net/viewvc.cgi/php-src/win32/inet.h?r1=1.1r2=1.2diff_format=u
Index: php-src/win32/inet.h
diff -u php-src/win32/inet.h:1.1 php-src/win32/inet.h:1.2
--- php-src/win32/inet.h:1.1Thu Aug 21 23:37:40 2008
+++ php-src/win32/inet.hSat Aug 23 19:55:44 2008
@@ -2,8 +2,7 @@
 # include In6addr.h
 #endif
 #include Ws2tcpip.h
-
-#if _MSC_VER  1500
+#if (_WIN32_WINNT  0x0600) /* Vita/2k8 have these functions */
 PHPAPI int inet_pton(int af, const char* src, void* dst);
 PHPAPI const char* inet_ntop(int af, const void* src, char* dst, size_t size);
 PHPAPI int inet_aton(const char *cp, struct in_addr *inp);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/standard config.m4 crypt_freesec.c crypt_freesec.h

2008-08-23 Thread Pierre Joye
On Sat, Aug 23, 2008 at 9:34 PM, Arnaud Le Blanc [EMAIL PROTECTED] wrote:
 Yes, but I was speaking about this line:
 typedef uint32_t u_int32_t;

Right :)

Do you have the time to give the inline a try? It would be nice to
standardize it in php_config and config.w32.h as it can be used in
other places as well.

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /win32/build config.w32.h.in

2008-08-23 Thread Pierre-Alain Joye
pajoye  Sat Aug 23 20:03:29 2008 UTC

  Modified files:  
/php-src/win32/buildconfig.w32.h.in 
  Log:
  - MFB!!! _WIN32_WINNT and NTDDI_VERSION (bunnie--;)
  
http://cvs.php.net/viewvc.cgi/php-src/win32/build/config.w32.h.in?r1=1.16r2=1.17diff_format=u
Index: php-src/win32/build/config.w32.h.in
diff -u php-src/win32/build/config.w32.h.in:1.16 
php-src/win32/build/config.w32.h.in:1.17
--- php-src/win32/build/config.w32.h.in:1.16Mon Jul 28 11:34:53 2008
+++ php-src/win32/build/config.w32.h.in Sat Aug 23 20:03:29 2008
@@ -1,8 +1,12 @@
 /*
Build Configuration Template for Win32.
-   $Id: config.w32.h.in,v 1.16 2008/07/28 11:34:53 pajoye Exp $
+   $Id: config.w32.h.in,v 1.17 2008/08/23 20:03:29 pajoye Exp $
 */
 
+/* Define the minimum supported version */
+#define _WIN32_WINNT 0x500
+#define NTDDI_VERSION  _WIN32_WIN2K
+
 /* Default PHP / PEAR directories */
 #define PHP_CONFIG_FILE_PATH (getenv(SystemRoot))?getenv(SystemRoot):
 #define CONFIGURATION_FILE_PATH php.ini



-- 
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 flock_compat.h

2008-08-23 Thread Pierre-Alain Joye
pajoye  Sat Aug 23 20:21:08 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   flock_compat.h 
  Log:
  - keep inet_aton declaration on non windows (what inet_aton has to do with 
flock?)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/flock_compat.h?r1=1.20.2.1.2.1.2.2r2=1.20.2.1.2.1.2.3diff_format=u
Index: php-src/ext/standard/flock_compat.h
diff -u php-src/ext/standard/flock_compat.h:1.20.2.1.2.1.2.2 
php-src/ext/standard/flock_compat.h:1.20.2.1.2.1.2.3
--- php-src/ext/standard/flock_compat.h:1.20.2.1.2.1.2.2Sat Aug 23 
19:22:10 2008
+++ php-src/ext/standard/flock_compat.h Sat Aug 23 20:21:08 2008
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: flock_compat.h,v 1.20.2.1.2.1.2.2 2008/08/23 19:22:10 pajoye Exp $ */
+/* $Id: flock_compat.h,v 1.20.2.1.2.1.2.3 2008/08/23 20:21:08 pajoye Exp $ */
 
 #ifndef FLOCK_COMPAT_H
 #define FLOCK_COMPAT_H
@@ -49,6 +49,9 @@
 #include arpa/inet.h
 #endif
 
+#ifndef PHP_WIN32
+extern int inet_aton(const char *, struct in_addr *); 
+#endif
 #endif
 
 #endif /* FLOCK_COMPAT_H */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard flock_compat.c flock_compat.h /win32 inet.h

2008-08-23 Thread Pierre-Alain Joye
pajoye  Sat Aug 23 20:31:27 2008 UTC

  Modified files:  
/php-src/win32  inet.h 
/php-src/ext/standard   flock_compat.h flock_compat.c 
  Log:
  - more fixes for inet_* with vc9/xp
  
http://cvs.php.net/viewvc.cgi/php-src/win32/inet.h?r1=1.2r2=1.3diff_format=u
Index: php-src/win32/inet.h
diff -u php-src/win32/inet.h:1.2 php-src/win32/inet.h:1.3
--- php-src/win32/inet.h:1.2Sat Aug 23 19:55:44 2008
+++ php-src/win32/inet.hSat Aug 23 20:31:26 2008
@@ -1,7 +1,9 @@
+#include config.w32.h
 #if _MSC_VER = 1500
 # include In6addr.h
 #endif
 #include Ws2tcpip.h
+
 #if (_WIN32_WINNT  0x0600) /* Vita/2k8 have these functions */
 PHPAPI int inet_pton(int af, const char* src, void* dst);
 PHPAPI const char* inet_ntop(int af, const void* src, char* dst, size_t size);
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/flock_compat.h?r1=1.23r2=1.24diff_format=u
Index: php-src/ext/standard/flock_compat.h
diff -u php-src/ext/standard/flock_compat.h:1.23 
php-src/ext/standard/flock_compat.h:1.24
--- php-src/ext/standard/flock_compat.h:1.23Mon Dec 31 07:12:15 2007
+++ php-src/ext/standard/flock_compat.h Sat Aug 23 20:31:27 2008
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: flock_compat.h,v 1.23 2007/12/31 07:12:15 sebastian Exp $ */
+/* $Id: flock_compat.h,v 1.24 2008/08/23 20:31:27 pajoye Exp $ */
 
 #ifndef FLOCK_COMPAT_H
 #define FLOCK_COMPAT_H
@@ -49,7 +49,9 @@
 #include arpa/inet.h
 #endif
 
+#ifndef PHP_WIN32
 extern int inet_aton(const char *, struct in_addr *);
 #endif
+#endif
 
 #endif /* FLOCK_COMPAT_H */
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/flock_compat.c?r1=1.34r2=1.35diff_format=u
Index: php-src/ext/standard/flock_compat.c
diff -u php-src/ext/standard/flock_compat.c:1.34 
php-src/ext/standard/flock_compat.c:1.35
--- php-src/ext/standard/flock_compat.c:1.34Thu Aug 21 23:37:40 2008
+++ php-src/ext/standard/flock_compat.c Sat Aug 23 20:31:27 2008
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: flock_compat.c,v 1.34 2008/08/21 23:37:40 pajoye Exp $ */
+/* $Id: flock_compat.c,v 1.35 2008/08/23 20:31:27 pajoye Exp $ */
 
 #include php.h
 #include errno.h
@@ -163,6 +163,7 @@
 }
 #endif
 
+#ifndef PHP_WIN32
 #if !(HAVE_INET_ATON)
 /* {{{ inet_aton
  * Check whether cp is a valid ascii representation
@@ -226,7 +227,7 @@
 }
 /* }}} */
 #endif /* !HAVE_INET_ATON */
-
+#endif /* !PHP_WIN32 */
 /*
  * Local variables:
  * tab-width: 4



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/standard config.m4 crypt_freesec.c crypt_freesec.h

2008-08-23 Thread Arnaud Le Blanc
Hi,

On Saturday 23 August 2008 21:58:53 Pierre Joye wrote:
 On Sat, Aug 23, 2008 at 9:34 PM, Arnaud Le Blanc [EMAIL PROTECTED] wrote:
  Yes, but I was speaking about this line:
  typedef uint32_t u_int32_t;
 
 Right :)
 
 Do you have the time to give the inline a try? 

It works.

 It would be nice to standardize it in php_config and config.w32.h as it can 
 be 
used in other places as well.

Yes. IMO the best solution is to use AC_C_INLINE and an equivalent for Windows 
who defines inline so that we can always expect it to be defined.

 
 Cheers,
 -- 
 Pierre
 
 http://blog.thepimp.net | http://www.libgd.org
 

Regards,

Arnaud


-- 
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 crypt_freesec.c crypt_freesec.h

2008-08-23 Thread Pierre-Alain Joye
pajoye  Sat Aug 23 20:42:18 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   crypt_freesec.c crypt_freesec.h 
  Log:
  - MFB: fix build (common inline definition will be done later)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt_freesec.c?r1=1.1.2.4r2=1.1.2.5diff_format=u
Index: php-src/ext/standard/crypt_freesec.c
diff -u php-src/ext/standard/crypt_freesec.c:1.1.2.4 
php-src/ext/standard/crypt_freesec.c:1.1.2.5
--- php-src/ext/standard/crypt_freesec.c:1.1.2.4Sat Aug 23 13:57:19 2008
+++ php-src/ext/standard/crypt_freesec.cSat Aug 23 20:42:18 2008
@@ -1,5 +1,5 @@
 /*
-  $Id: crypt_freesec.c,v 1.1.2.4 2008/08/23 13:57:19 lbarnaud Exp $ 
+  $Id: crypt_freesec.c,v 1.1.2.5 2008/08/23 20:42:18 pajoye 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.4 2008/08/23 13:57:19 lbarnaud Exp $
+ * $Id: crypt_freesec.c,v 1.1.2.5 2008/08/23 20:42:18 pajoye Exp $
  *
  * This is an original implementation of the DES and the crypt(3) interfaces
  * by David Burren davidb at werj.com.au.
@@ -69,6 +69,20 @@
 #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 '_'
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt_freesec.h?r1=1.1.2.4r2=1.1.2.5diff_format=u
Index: php-src/ext/standard/crypt_freesec.h
diff -u php-src/ext/standard/crypt_freesec.h:1.1.2.4 
php-src/ext/standard/crypt_freesec.h:1.1.2.5
--- php-src/ext/standard/crypt_freesec.h:1.1.2.4Sat Aug 23 13:57:19 2008
+++ php-src/ext/standard/crypt_freesec.hSat Aug 23 20:42:18 2008
@@ -1,4 +1,4 @@
-/* $Id: crypt_freesec.h,v 1.1.2.4 2008/08/23 13:57:19 lbarnaud Exp $ */
+/* $Id: crypt_freesec.h,v 1.1.2.5 2008/08/23 20:42:18 pajoye Exp $ */
 #ifndef _CRYPT_FREESEC_H
 #define _CRYPT_FREESEC_H
 
@@ -6,8 +6,14 @@
 
 #if PHP_WIN32
 # include win32/php_stdint.h
-#elif HAVE_STDINT_H
+#else
+# include php_config.h
+# if HAVE_STDINT_H
 # include stdint.h
+# endif
+# ifndef HAVE_U_INT32_T
+   typedef uint32_t u_int32_t;
+# endif
 #endif
 #if !PHP_WIN32
 # ifndef HAVE_U_INT32_T



-- 
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 crypt_freesec.h

2008-08-23 Thread Pierre-Alain Joye
pajoye  Sat Aug 23 21:08:09 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   crypt_freesec.h 
  Log:
  - MFH: fix build
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt_freesec.h?r1=1.1.2.5r2=1.1.2.6diff_format=u
Index: php-src/ext/standard/crypt_freesec.h
diff -u php-src/ext/standard/crypt_freesec.h:1.1.2.5 
php-src/ext/standard/crypt_freesec.h:1.1.2.6
--- php-src/ext/standard/crypt_freesec.h:1.1.2.5Sat Aug 23 20:42:18 2008
+++ php-src/ext/standard/crypt_freesec.hSat Aug 23 21:08:09 2008
@@ -1,8 +1,7 @@
-/* $Id: crypt_freesec.h,v 1.1.2.5 2008/08/23 20:42:18 pajoye Exp $ */
+/* $Id: crypt_freesec.h,v 1.1.2.6 2008/08/23 21:08:09 pajoye Exp $ */
 #ifndef _CRYPT_FREESEC_H
 #define _CRYPT_FREESEC_H
 
-#include php_config.h
 
 #if PHP_WIN32
 # include win32/php_stdint.h
@@ -15,11 +14,6 @@
typedef uint32_t u_int32_t;
 # endif
 #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



[PHP-CVS] cvs: php-internals-win /script conf_tools.bat snapshot.bat snapshot_5_3.bat

2008-08-23 Thread Pierre-Alain Joye
pajoye  Sat Aug 23 23:55:40 2008 UTC

  Modified files:  
/php-internals-win/script   conf_tools.bat snapshot.bat 
snapshot_5_3.bat 
  Log:
  - add configure option as configuration
  - psdk path are now one single variable
  
http://cvs.php.net/viewvc.cgi/php-internals-win/script/conf_tools.bat?r1=1.2r2=1.3diff_format=u
Index: php-internals-win/script/conf_tools.bat
diff -u php-internals-win/script/conf_tools.bat:1.2 
php-internals-win/script/conf_tools.bat:1.3
--- php-internals-win/script/conf_tools.bat:1.2 Fri Aug 22 09:17:42 2008
+++ php-internals-win/script/conf_tools.bat Sat Aug 23 23:55:40 2008
@@ -1,12 +1,20 @@
 @ECHO OFF
-SET VC6_INCLUDE=C:\Program Files (x86)\Microsoft 
SDK\Include;C:\PROGRA~2\MICROS~2\VC98\ATL\INCLUDE;C:\PROGRA~2\MICROS~2\VC98\INCLUDE;C:\PROGRA~2\MICROS~2\VC98\MFC\INCLUDE
-SET VC6_LIB=C:\Program Files (x86)\Microsoft 
SDK\Lib;C:\PROGRA~2\MICROS~2\VC98\LIB;C:\PROGRA~2\MICROS~2\VC98\MFC\LIB
-SET VC6_PATH=c:\Program Files (x86)\Microsoft SDK\Bin;c:\Program Files 
(x86)\Microsoft 
SDK\Bin\WinNT;c:\PROGRA~2\MICROS~2\Common\msdev98\BIN;c:\PROGRA~2\MICROS~2\VC98\BIN;c:\PROGRA~2\MICROS~2\Common\TOOLS\WINNT;c:\PROGRA~2\MICROS~2\Common/TOOLS
 
-SET VC9_INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\INCLUDE;C:\Program Files\\Microsoft 
SDKs\Windows\v6.0A\include;C:\Program Files (x86)\Microsoft Visual Studio .NET 
2003\SDK\v1.1\include\
-SET VC9_LIB=C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\ATLMFC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\LIB;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib;C:\Program Files 
(x86)\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\
-SET VC9_PATH=C:\Program Files (x86)\Microsoft Visual Studio 
9.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio 
9.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program
 Files (x86)\Microsoft Visual Studio 9.0\VC\VCPackages;C:\Program 
Files\\Microsoft 
SDKs\Windows\v6.0A\bin;C:\Perl\site\bin;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
+SET PSDK_200302_DIR=C:\Program Files\Microsoft SDK
+SET VC6_DIR=C:\Program Files\Microsoft Visual Studio
 
+SET PSDK_61_DIR=C:\Program Files\Microsoft SDKs\Windows\v6.1
+SET VC9_DIR=C:\Program Files\Microsoft Visual Studio 9.0
+
+SET 
VC6_INCLUDE=%PSDK_200302_DIR%\Include;%VC6_DIR%\VC98\ATL\Include;%VC6_DIR%\VC98\Include;%VC6_DIR%\VC98\MFC\Include
+SET VC6_LIB=%PSDK_200302_DIR%\Lib;%VC6_DIR%\VC98\LIB;%VC6_DIR%\VC98\MFC\LIB
+SET 
VC6_PATH=%PSDK_200302_DIR%\Bin;%PSDK_200302_DIR%\Bin\WinNT;%VC6_DIR%\Common\msdev98\BIN;%VC6_DIR%\VC98\BIN;%VC6_DIR%\Common\TOOLS\WINNT;%VC6_DIR%\Common/TOOLS
+
+SET 
VC9_INCLUDE=%PSDK_61_DIR%\include;%VC9_DIR%\VC\ATLMFC\INCLUDE;%VC9_DIR%\VC\INCLUDE
+SET VC9_LIB=%PSDK_61_DIR%\lib;%VC9_DIR%\VC\ATLMFC\LIB;%VC9_DIR%\VC\LIB
+SET 
VC9_PATH=%VC9_DIR%\Common7\IDE;%VC9_DIR%\VC\BIN;%VC9_DIR%\Common7\Tools;%VC9_DIR%\VC\VCPackages;%PSDK_61_DIR%\bin;C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
+
+SET PHP_CVSROOT=-d :pserver:[EMAIL PROTECTED]:/repository
 SET PUTTYBASE=C:\Program Files (x86)\PUTTY\
 SET REMOTE_USER=edink
 SET [EMAIL PROTECTED]
http://cvs.php.net/viewvc.cgi/php-internals-win/script/snapshot.bat?r1=1.7r2=1.8diff_format=u
Index: php-internals-win/script/snapshot.bat
diff -u php-internals-win/script/snapshot.bat:1.7 
php-internals-win/script/snapshot.bat:1.8
--- php-internals-win/script/snapshot.bat:1.7   Fri Aug 22 09:17:42 2008
+++ php-internals-win/script/snapshot.bat   Sat Aug 23 23:55:40 2008
@@ -41,7 +41,9 @@
 
 :CVS
 
-cvs -d :pserver:[EMAIL PROTECTED]:/repository -z3 checkout -r %BRANCH% -d 
%DEST% php5  %START%\cvs.log 21
+REM cvs -d :pserver:[EMAIL PROTECTED]:/repository -z3 checkout -r %BRANCH% -d 
%DEST% php5  %START%\cvs.log 21
+echo checkout from  %PHP_CVSROOT% -z3 checkout -r %BRANCH% -d %DEST% php5
+cvs %PHP_CVSROOT% -z3 checkout -r %BRANCH% -d %DEST% php5  %START%\cvs.log 
21
 echo Testing %DEST%...
 IF EXIST %DEST% GOTO DEST_EXISTS 
 ECHO CVS ERROR 
@@ -51,7 +53,7 @@
 cd %DEST%
 
 call buildconf.bat  %START%\buildconf.log 21
-call configure.bat --enable-snapshot-build --enable-debug-pack 
--disable-fileinfo --with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared 
--with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared 
--with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared  
%START%\configure.log 21
+call configure.bat %CONFIGURE_ARGS%  %START%\configure.log 21
 
 nmake snap  %START%\compile.log 21
 
http://cvs.php.net/viewvc.cgi/php-internals-win/script/snapshot_5_3.bat?r1=1.1r2=1.2diff_format=u
Index: php-internals-win/script/snapshot_5_3.bat
diff -u php-internals-win/script/snapshot_5_3.bat:1.1 

[PHP-CVS] cvs: php-src /ext/xmlrpc xmlrpc-epi-php.c

2008-08-23 Thread Felipe Pena
felipe  Sun Aug 24 00:45:20 2008 UTC

  Modified files:  
/php-src/ext/xmlrpc xmlrpc-epi-php.c 
  Log:
  - MFB: New parameter parsing API
  - WS, Cosmetics
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/xmlrpc-epi-php.c?r1=1.60r2=1.61diff_format=u
Index: php-src/ext/xmlrpc/xmlrpc-epi-php.c
diff -u php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.60 
php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.61
--- php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.60Fri Aug 15 22:13:58 2008
+++ php-src/ext/xmlrpc/xmlrpc-epi-php.c Sun Aug 24 00:45:20 2008
@@ -51,7 +51,7 @@
+--+
  */
 
-/* $Id: xmlrpc-epi-php.c,v 1.60 2008/08/15 22:13:58 felipe Exp $ */
+/* $Id: xmlrpc-epi-php.c,v 1.61 2008/08/24 00:45:20 felipe Exp $ */
 
 /**
 * BUGS:   *
@@ -265,7 +265,7 @@
 XMLRPC_VALUE_TYPE get_zval_xmlrpc_type(zval* value, zval** newvalue);
 static void php_xmlrpc_introspection_callback(XMLRPC_SERVER server, void* 
data);
 int sset_zval_xmlrpc_type(zval* value, XMLRPC_VALUE_TYPE type);
-zval* decode_request_worker(zval* xml_in, zval* encoding_in, zval* 
method_name_out);
+zval* decode_request_worker(char *xml_in, int xml_in_len, char *encoding_in, 
zval* method_name_out);
 const char* xmlrpc_type_as_str(XMLRPC_VALUE_TYPE type, XMLRPC_VECTOR_TYPE 
vtype);
 XMLRPC_VALUE_TYPE xmlrpc_str_as_type(const char* str);
 XMLRPC_VECTOR_TYPE xmlrpc_str_as_vector_type(const char* str);
@@ -437,29 +437,29 @@
}
 
/* encoding code set */
-   if(zend_hash_find(Z_ARRVAL_P(output_opts), 
ENCODING_KEY, ENCODING_KEY_LEN + 1, (void**)val) == SUCCESS) {
-   if(Z_TYPE_PP(val) == IS_STRING) {
+   if (zend_hash_find(Z_ARRVAL_P(output_opts), 
ENCODING_KEY, ENCODING_KEY_LEN + 1, (void**)val) == SUCCESS) {
+   if (Z_TYPE_PP(val) == IS_STRING) {

options-xmlrpc_out.xml_elem_opts.encoding = estrdup(Z_STRVAL_PP(val));
}
}
 
/* escaping options */
-   if(zend_hash_find(Z_ARRVAL_P(output_opts), 
ESCAPING_KEY, ESCAPING_KEY_LEN + 1, (void**)val) == SUCCESS) {
+   if (zend_hash_find(Z_ARRVAL_P(output_opts), 
ESCAPING_KEY, ESCAPING_KEY_LEN + 1, (void**)val) == SUCCESS) {
/* multiple values allowed.  check if array */
-   if(Z_TYPE_PP(val) == IS_ARRAY) {
+   if (Z_TYPE_PP(val) == IS_ARRAY) {
zval** iter_val;

zend_hash_internal_pointer_reset(Z_ARRVAL_PP(val));

options-xmlrpc_out.xml_elem_opts.escaping = xml_elem_no_escaping;
-   while(1) {
-   
if(zend_hash_get_current_data(Z_ARRVAL_PP(val), (void**)iter_val) == SUCCESS) {
-   if(Z_TYPE_PP(iter_val) 
== IS_STRING  Z_STRVAL_PP(iter_val)) {
-   
if(!strcmp(Z_STRVAL_PP(iter_val), ESCAPING_VALUE_CDATA)) {
+   while (1) {
+   if 
(zend_hash_get_current_data(Z_ARRVAL_PP(val), (void**)iter_val) == SUCCESS) {
+   if (Z_TYPE_PP(iter_val) 
== IS_STRING  Z_STRVAL_PP(iter_val)) {
+   if 
(!strcmp(Z_STRVAL_PP(iter_val), ESCAPING_VALUE_CDATA)) {

options-xmlrpc_out.xml_elem_opts.escaping |= xml_elem_cdata_escaping;
-   } else 
if(!strcmp(Z_STRVAL_PP(iter_val), ESCAPING_VALUE_NON_ASCII)) {
+   } else if 
(!strcmp(Z_STRVAL_PP(iter_val), ESCAPING_VALUE_NON_ASCII)) {

options-xmlrpc_out.xml_elem_opts.escaping |= xml_elem_non_ascii_escaping;
-   } else 
if(!strcmp(Z_STRVAL_PP(iter_val), ESCAPING_VALUE_NON_PRINT)) {
+   } else if 
(!strcmp(Z_STRVAL_PP(iter_val), ESCAPING_VALUE_NON_PRINT)) {

options-xmlrpc_out.xml_elem_opts.escaping |= xml_elem_non_print_escaping;
-   } else 
if(!strcmp(Z_STRVAL_PP(iter_val), ESCAPING_VALUE_MARKUP)) {
+

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/xmlrpc xmlrpc-epi-php.c

2008-08-23 Thread Felipe Pena
felipe  Sun Aug 24 00:47:22 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/xmlrpc xmlrpc-epi-php.c 
  Log:
  - MFH: WS, Comestics
  - Folding
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/xmlrpc-epi-php.c?r1=1.39.2.5.2.6.2.12r2=1.39.2.5.2.6.2.13diff_format=u
Index: php-src/ext/xmlrpc/xmlrpc-epi-php.c
diff -u php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.6.2.12 
php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.6.2.13
--- php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.6.2.12   Fri Aug 15 
22:15:46 2008
+++ php-src/ext/xmlrpc/xmlrpc-epi-php.c Sun Aug 24 00:47:22 2008
@@ -51,7 +51,7 @@
+--+
  */
 
-/* $Id: xmlrpc-epi-php.c,v 1.39.2.5.2.6.2.12 2008/08/15 22:15:46 felipe Exp $ 
*/
+/* $Id: xmlrpc-epi-php.c,v 1.39.2.5.2.6.2.13 2008/08/24 00:47:22 felipe Exp $ 
*/
 
 /**
 * BUGS:   *
@@ -660,7 +660,7 @@
break;
case xmlrpc_base64:
pStr = XMLRPC_GetValueBase64(el);
-   if(pStr) {
+   if (pStr) {
Z_STRLEN_P(elem) = 
XMLRPC_GetValueStringLen(el);
Z_STRVAL_P(elem) = estrndup(pStr, 
Z_STRLEN_P(elem));
Z_TYPE_P(elem) = IS_STRING;
@@ -703,10 +703,10 @@
 
set_output_options(out, (ZEND_NUM_ARGS() == 3) ? out_opts : 0);
 
-   if(return_value_used) {
+   if (return_value_used) {
xRequest = XMLRPC_RequestNew();
 
-   if(xRequest) {
+   if (xRequest) {
XMLRPC_RequestSetOutputOptions(xRequest, 
out.xmlrpc_out);
if (Z_TYPE_PP(method) == IS_NULL) {
XMLRPC_RequestSetRequestType(xRequest, 
xmlrpc_request_response);
@@ -720,7 +720,7 @@
}
 
outBuf = XMLRPC_REQUEST_ToXML(xRequest, 0);
-   if(outBuf) {
+   if (outBuf) {
RETVAL_STRING(outBuf, 1);
free(outBuf);
}
@@ -746,15 +746,15 @@
return;
}
 
-   if( return_value_used ) {
+   if (return_value_used) {
/* convert native php type to xmlrpc type */
xOut = PHP_to_XMLRPC(*arg1 TSRMLS_CC);
 
/* generate raw xml from xmlrpc data */
outBuf = XMLRPC_VALUE_ToXML(xOut, 0);
 
-   if(xOut) {
-   if(outBuf) {
+   if (xOut) {
+   if (outBuf) {
RETVAL_STRING(outBuf, 1);
free(outBuf);
}
@@ -765,8 +765,7 @@
 }
 /* }}} */
 
-
-zval* decode_request_worker(char *xml_in, int xml_in_len, char *encoding_in, 
zval* method_name_out)
+zval* decode_request_worker(char *xml_in, int xml_in_len, char *encoding_in, 
zval* method_name_out) /* {{{ */
 {
zval* retval = NULL;
XMLRPC_REQUEST response;
@@ -793,6 +792,7 @@
}
return retval;
 }
+/* }}} */
 
 /* {{{ proto array xmlrpc_decode_request(string xml, string method [, string 
encoding])
Decodes XML into native PHP types */
@@ -808,9 +808,9 @@
 
convert_to_string_ex(method);
 
-   if(return_value_used) {
+   if (return_value_used) {
zval* retval = decode_request_worker(xml, xml_len, encoding_len 
? encoding : NULL, *method);
-   if(retval) {
+   if (retval) {
*return_value = *retval;
FREE_ZVAL(retval);
}
@@ -818,7 +818,6 @@
 }
 /* }}} */
 
-
 /* {{{ proto array xmlrpc_decode(string xml [, string encoding])
Decodes XML into native PHP types */
 PHP_FUNCTION(xmlrpc_decode)
@@ -830,9 +829,9 @@
return;
}
 
-   if(return_value_used) {
+   if (return_value_used) {
zval* retval = decode_request_worker(arg1, arg1_len, arg2_len ? 
arg2 : NULL, NULL);
-   if(retval) {
+   if (retval) {
*return_value = *retval;
FREE_ZVAL(retval);
}
@@ -840,7 +839,6 @@
 }
 /* }}} */
 
-
 /*
 * server related methods *
 */
@@ -853,7 +851,7 @@
return;
}
 
-   if(return_value_used) {
+   if (return_value_used) {
zval *method_map, *introspection_map;
xmlrpc_server_data *server = 
emalloc(sizeof(xmlrpc_server_data));
MAKE_STD_ZVAL(method_map);
@@ -890,7 +888,7 @@
server = zend_list_find(Z_LVAL_P(arg1), type);
 
if 

[PHP-CVS] cvs: php-src /ext/xml xml.c

2008-08-23 Thread Felipe Pena
felipe  Sun Aug 24 02:12:51 2008 UTC

  Modified files:  
/php-src/ext/xmlxml.c 
  Log:
  MFB:
  - New parameter parsing API
  - Fixed crash in xml_parse_into_struct
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/xml/xml.c?r1=1.180r2=1.181diff_format=u
Index: php-src/ext/xml/xml.c
diff -u php-src/ext/xml/xml.c:1.180 php-src/ext/xml/xml.c:1.181
--- php-src/ext/xml/xml.c:1.180 Thu Jul 17 11:40:55 2008
+++ php-src/ext/xml/xml.c   Sun Aug 24 02:12:51 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: xml.c,v 1.180 2008/07/17 11:40:55 tony2001 Exp $ */
+/* $Id: xml.c,v 1.181 2008/08/24 02:12:51 felipe Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -1340,19 +1340,13 @@
 PHP_FUNCTION(xml_set_object)
 {
xml_parser *parser;
-   zval **pind, **mythis;
+   zval *pind, *mythis;
 
-   if (ZEND_NUM_ARGS() != 2 ||
-   zend_get_parameters_ex(2, pind, mythis) == FAILURE) {
-   WRONG_PARAM_COUNT;
-   }
-
-   if (Z_TYPE_PP(mythis) != IS_OBJECT) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Argument 2 has 
wrong type);
-   RETURN_FALSE;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ro, pind, 
mythis) == FAILURE) {
+   return;
}
 
-   ZEND_FETCH_RESOURCE(parser,xml_parser *,pind, -1, XML Parser, 
le_xml_parser);
+   ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, XML Parser, 
le_xml_parser);
 
/* please leave this commented - or ask [EMAIL PROTECTED] before doing 
it (again) */
if (parser-object) {
@@ -1365,7 +1359,7 @@
 #endif */
 
ALLOC_ZVAL(parser-object);
-   *parser-object = **mythis;
+   *parser-object = *mythis;
zval_copy_ctor(parser-object);
INIT_PZVAL(parser-object);
 
@@ -1378,14 +1372,13 @@
 PHP_FUNCTION(xml_set_element_handler)
 {
xml_parser *parser;
-   zval **pind, **shdl, **ehdl;
+   zval *pind, **shdl, **ehdl;
 
-   if (ZEND_NUM_ARGS() != 3 ||
-   zend_get_parameters_ex(3, pind, shdl, ehdl) == FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rZZ, pind, 
shdl, ehdl) == FAILURE) {
+   return;
}
 
-   ZEND_FETCH_RESOURCE(parser,xml_parser *,pind, -1, XML Parser, 
le_xml_parser);
+   ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, XML Parser, 
le_xml_parser);
 
xml_set_handler(parser-startElementHandler, shdl TSRMLS_CC);
xml_set_handler(parser-endElementHandler, ehdl TSRMLS_CC);
@@ -1399,13 +1392,13 @@
 PHP_FUNCTION(xml_set_character_data_handler)
 {
xml_parser *parser;
-   zval **pind, **hdl;
+   zval *pind, **hdl;
 
-   if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, pind, hdl) == 
FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rZ, pind, hdl) 
== FAILURE) {
+   return;
}
 
-   ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, XML Parser, 
le_xml_parser);
+   ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, XML Parser, 
le_xml_parser);
 
xml_set_handler(parser-characterDataHandler, hdl TSRMLS_CC);
XML_SetCharacterDataHandler(parser-parser, _xml_characterDataHandler);
@@ -1418,13 +1411,13 @@
 PHP_FUNCTION(xml_set_processing_instruction_handler)
 {
xml_parser *parser;
-   zval **pind, **hdl;
+   zval *pind, **hdl;
 
-   if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, pind, hdl) == 
FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rZ, pind, hdl) 
== FAILURE) {
+   return;
}
 
-   ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, XML Parser, 
le_xml_parser);
+   ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, XML Parser, 
le_xml_parser);
 
xml_set_handler(parser-processingInstructionHandler, hdl TSRMLS_CC);
XML_SetProcessingInstructionHandler(parser-parser, 
_xml_processingInstructionHandler);
@@ -1437,12 +1430,12 @@
 PHP_FUNCTION(xml_set_default_handler)
 {
xml_parser *parser;
-   zval **pind, **hdl;
+   zval *pind, **hdl;
 
-   if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, pind, hdl) == 
FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rZ, pind, hdl) 
== FAILURE) {
+   return;
}
-   ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, XML Parser, 
le_xml_parser);
+   ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, XML Parser, 
le_xml_parser);
 
xml_set_handler(parser-defaultHandler, hdl TSRMLS_CC);
XML_SetDefaultHandler(parser-parser, _xml_defaultHandler);
@@ -1455,13 +1448,13 @@
 PHP_FUNCTION(xml_set_unparsed_entity_decl_handler)
 {
xml_parser *parser;
-   zval **pind, **hdl;
+   zval *pind, **hdl;
 
-   if 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/xml xml.c

2008-08-23 Thread Felipe Pena
felipe  Sun Aug 24 02:13:23 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/xmlxml.c 
  Log:
  - Removed unnecessary variable
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xml/xml.c?r1=1.157.2.4.2.5.2.10r2=1.157.2.4.2.5.2.11diff_format=u
Index: php-src/ext/xml/xml.c
diff -u php-src/ext/xml/xml.c:1.157.2.4.2.5.2.10 
php-src/ext/xml/xml.c:1.157.2.4.2.5.2.11
--- php-src/ext/xml/xml.c:1.157.2.4.2.5.2.10Thu Jul 17 10:24:51 2008
+++ php-src/ext/xml/xml.c   Sun Aug 24 02:13:23 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: xml.c,v 1.157.2.4.2.5.2.10 2008/07/17 10:24:51 tony2001 Exp $ */
+/* $Id: xml.c,v 1.157.2.4.2.5.2.11 2008/08/24 02:13:23 felipe Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -1478,12 +1478,10 @@
xml_parser *parser;
zval *pind;
char *data;
-   int data_len, argc, ret;
+   int data_len, ret;
long isFinal = 0;
 
-   argc = ZEND_NUM_ARGS();
-   
-   if (zend_parse_parameters(argc TSRMLS_CC, rs|l, pind, data, 
data_len, isFinal) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs|l, pind, 
data, data_len, isFinal) == FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, XML Parser, 
le_xml_parser);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/gd gd.c /ext/wddx wddx.c

2008-08-23 Thread Felipe Pena
felipe  Sun Aug 24 04:02:20 2008 UTC

  Modified files:  
/php-src/ext/gd gd.c 
/php-src/ext/wddx   wddx.c 
  Log:
  - MFB: New parameter parsing API
  - CS (wddx)
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.391r2=1.392diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.391 php-src/ext/gd/gd.c:1.392
--- php-src/ext/gd/gd.c:1.391   Mon Aug  4 18:22:02 2008
+++ php-src/ext/gd/gd.c Sun Aug 24 04:02:20 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.391 2008/08/04 18:22:02 felipe Exp $ */
+/* $Id: gd.c,v 1.392 2008/08/24 04:02:20 felipe Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -4143,44 +4143,36 @@
Return the bounding box needed by a string if rasterized */
 PHP_FUNCTION(imagepsbbox)
 {
-   zval **str, **fnt, **sz, **sp, **wd, **ang;
-   int i, space, add_width = 0, char_width, amount_kern;
+   zval *fnt;
+   long sz = 0, sp, wd;
+   char *str;
+   int i, space = 0, add_width = 0, char_width, amount_kern;
int cur_x, cur_y, dx, dy;
int x1, y1, x2, y2, x3, y3, x4, y4;
int *f_ind;
-   int per_char = 0;
+   int str_len, per_char = 0;
+   int argc = ZEND_NUM_ARGS();
double angle, sin_a = 0, cos_a = 0;
BBox char_bbox, str_bbox = {0, 0, 0, 0};
 
-   switch (ZEND_NUM_ARGS()) {
-   case 3:
-   if (zend_get_parameters_ex(3, str, fnt, sz) == 
FAILURE) {
-   RETURN_FALSE;
-   }
-   space = 0;
-   break;
-   case 6:
-   if (zend_get_parameters_ex(6, str, fnt, sz, sp, 
wd, ang) == FAILURE) {
-   RETURN_FALSE;
-   }
-   convert_to_long_ex(sp);
-   convert_to_long_ex(wd);
-   convert_to_double_ex(ang);
-   space = Z_LVAL_PP(sp);
-   add_width = Z_LVAL_PP(wd);
-   angle = Z_DVAL_PP(ang) * M_PI / 180;
-   sin_a = sin(angle);
-   cos_a = cos(angle);
-   per_char =  add_width || angle ? 1 : 0;
-   break;
-   default:
-   ZEND_WRONG_PARAM_COUNT();
+   if (argc != 3  argc != 6) {
+   ZEND_WRONG_PARAM_COUNT();
+   }
+   
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, srl|lld, str, 
str_len, fnt, sz, sp, wd, angle) == FAILURE) {
+   return;
+   }
+   
+   if (argc == 6) {
+   space = sp;
+   add_width = wd;
+   angle = angle * M_PI / 180;
+   sin_a = sin(angle);
+   cos_a = cos(angle);
+   per_char =  add_width || angle ? 1 : 0;
}
 
-   ZEND_FETCH_RESOURCE(f_ind, int *, fnt, -1, Type 1 font, le_ps_font);
-
-   convert_to_string_ex(str);
-   convert_to_long_ex(sz);
+   ZEND_FETCH_RESOURCE(f_ind, int *, fnt, -1, Type 1 font, le_ps_font);
 
 #define max(a, b) (a  b ? a : b)
 #define min(a, b) (a  b ? a : b)
@@ -4191,15 +4183,15 @@
space += T1_GetCharWidth(*f_ind, ' ');
cur_x = cur_y = 0;
 
-   for (i = 0; i  Z_STRLEN_PP(str); i++) {
-   if (Z_STRVAL_PP(str)[i] == ' ') {
+   for (i = 0; i  str_len; i++) {
+   if (str[i] == ' ') {
char_bbox.llx = char_bbox.lly = char_bbox.ury = 
0;
char_bbox.urx = char_width = space;
} else {
-   char_bbox = T1_GetCharBBox(*f_ind, 
Z_STRVAL_PP(str)[i]);
-   char_width = T1_GetCharWidth(*f_ind, 
Z_STRVAL_PP(str)[i]);
+   char_bbox = T1_GetCharBBox(*f_ind, str[i]);
+   char_width = T1_GetCharWidth(*f_ind, str[i]);
}
-   amount_kern = i ? T1_GetKerning(*f_ind, 
Z_STRVAL_PP(str)[i - 1], Z_STRVAL_PP(str)[i]) : 0;
+   amount_kern = i ? T1_GetKerning(*f_ind, str[i - 1], 
str[i]) : 0;
 
/* Transfer character bounding box to right place */
x1 = new_x(char_bbox.llx, char_bbox.lly) + cur_x;
@@ -4228,7 +4220,7 @@
}
 
} else {
-   str_bbox = T1_GetStringBBox(*f_ind, Z_STRVAL_PP(str), 
Z_STRLEN_PP(str), space, T1_KERNING);
+   str_bbox = T1_GetStringBBox(*f_ind, str, str_len, space, 
T1_KERNING);
}
 
if (T1_errno) {
http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/wddx.c?r1=1.152r2=1.153diff_format=u
Index: php-src/ext/wddx/wddx.c
diff -u php-src/ext/wddx/wddx.c:1.152 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/wddx wddx.c

2008-08-23 Thread Felipe Pena
felipe  Sun Aug 24 04:02:49 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/wddx   wddx.c 
  Log:
  - MFH: CS
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/wddx.c?r1=1.119.2.10.2.17.2.9r2=1.119.2.10.2.17.2.10diff_format=u
Index: php-src/ext/wddx/wddx.c
diff -u php-src/ext/wddx/wddx.c:1.119.2.10.2.17.2.9 
php-src/ext/wddx/wddx.c:1.119.2.10.2.17.2.10
--- php-src/ext/wddx/wddx.c:1.119.2.10.2.17.2.9 Tue Jul  1 11:26:10 2008
+++ php-src/ext/wddx/wddx.c Sun Aug 24 04:02:49 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: wddx.c,v 1.119.2.10.2.17.2.9 2008/07/01 11:26:10 felipe Exp $ */
+/* $Id: wddx.c,v 1.119.2.10.2.17.2.10 2008/08/24 04:02:49 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -238,12 +238,12 @@
 
if (stack-elements) {
for (i = 0; i  stack-top; i++) {
-   if (((st_entry *)stack-elements[i])-data)
-   {
+   if (((st_entry *)stack-elements[i])-data) {
zval_ptr_dtor(((st_entry 
*)stack-elements[i])-data);
}
-   if (((st_entry *)stack-elements[i])-varname)
+   if (((st_entry *)stack-elements[i])-varname) {
efree(((st_entry 
*)stack-elements[i])-varname);
+   }
efree(stack-elements[i]);
}   
efree(stack-elements);
@@ -286,8 +286,9 @@
*newstr = php_wddx_gather(packet);
php_wddx_destructor(packet);

-   if (newlen)
+   if (newlen) {
*newlen = strlen(*newstr);
+   }
 
return SUCCESS;
 }
@@ -306,8 +307,9 @@
int hash_type;
int ret;
 
-   if (vallen == 0) 
+   if (vallen == 0) {
return SUCCESS;
+   }

MAKE_STD_ZVAL(retval);
 
@@ -379,8 +381,9 @@
php_wddx_add_chunk_ex(packet, comment, comment_len);
php_wddx_add_chunk_static(packet, WDDX_COMMENT_E);
php_wddx_add_chunk_static(packet, WDDX_HEADER_E);
-   } else
+   } else {
php_wddx_add_chunk_static(packet, WDDX_HEADER);
+   }
php_wddx_add_chunk_static(packet, WDDX_DATA_S);
 }
 /* }}} */
@@ -525,8 +528,9 @@
for (zend_hash_internal_pointer_reset(HASH_OF(obj));
 zend_hash_get_current_data(HASH_OF(obj), (void**)ent) 
== SUCCESS;
 zend_hash_move_forward(HASH_OF(obj))) {
-   if (*ent == obj)
+   if (*ent == obj) {
continue;
+   }
 
if (zend_hash_get_current_key_ex(HASH_OF(obj), key, 
key_len, idx, 0, NULL) == HASH_KEY_IS_STRING) {
char *class_name, *prop_name;
@@ -596,8 +600,9 @@
for (zend_hash_internal_pointer_reset(target_hash);
 zend_hash_get_current_data(target_hash, (void**)ent) == 
SUCCESS;
 zend_hash_move_forward(target_hash)) {
-   if (*ent == arr)
+   if (*ent == arr) {
continue;
+   }
 
if (is_struct) {
ent_type = zend_hash_get_current_key_ex(target_hash, 
key, key_len, idx, 0, NULL);
@@ -608,8 +613,9 @@
key_len = slprintf(tmp_buf, sizeof(tmp_buf), 
%ld, idx);
php_wddx_serialize_var(packet, *ent, tmp_buf, 
key_len TSRMLS_CC);
}
-   } else
+   } else {
php_wddx_serialize_var(packet, *ent, NULL, 0 TSRMLS_CC);
+   }
}

if (is_struct) {
@@ -693,8 +699,7 @@
HashTable *target_hash;
TSRMLS_FETCH();

-   if (Z_TYPE_P(name_var) == IS_STRING)
-   {
+   if (Z_TYPE_P(name_var) == IS_STRING) {
if (!EG(active_symbol_table)) {
zend_rebuild_symbol_table(TSRMLS_C);
}
@@ -702,9 +707,7 @@
Z_STRLEN_P(name_var)+1, 
(void**)val) != FAILURE) {
php_wddx_serialize_var(packet, *val, 
Z_STRVAL_P(name_var), Z_STRLEN_P(name_var) TSRMLS_CC);
}   
-   }
-   else if (Z_TYPE_P(name_var) == IS_ARRAY || Z_TYPE_P(name_var) == 
IS_OBJECT)
-   {
+   } else if (Z_TYPE_P(name_var) == IS_ARRAY || Z_TYPE_P(name_var) == 
IS_OBJECT)   {
target_hash = HASH_OF(name_var);

zend_hash_internal_pointer_reset(target_hash);
@@ -919,8 +922,9 @@
TSRMLS_FETCH();
 
 /* OBJECTS_FIXME */
-   if (stack-top == 0)
+   if (stack-top == 0) {
return;
+   }
 
if (!strcmp(name, 

[PHP-CVS] cvs: php-src /ext/spl php_spl.c

2008-08-23 Thread Felipe Pena
felipe  Sun Aug 24 04:18:23 2008 UTC

  Modified files:  
/php-src/ext/splphp_spl.c 
  Log:
  - Removed unused variable
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.140r2=1.141diff_format=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.140 php-src/ext/spl/php_spl.c:1.141
--- php-src/ext/spl/php_spl.c:1.140 Thu Aug 14 10:06:39 2008
+++ php-src/ext/spl/php_spl.c   Sun Aug 24 04:18:22 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_spl.c,v 1.140 2008/08/14 10:06:39 helly Exp $ */
+/* $Id: php_spl.c,v 1.141 2008/08/24 04:18:22 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -373,7 +373,6 @@
ZVAL_ZSTRL(zclass_name, ZEND_STR_TYPE, class_name, class_name_len, 1);
if (SPL_G(autoload_functions)) {
int l_autoload_running = SPL_G(autoload_running);
-   zval *exception = NULL;
SPL_G(autoload_running) = 1;
lc_name = zend_u_str_tolower_dup(ZEND_STR_TYPE, class_name, 
class_name_len);
zend_hash_internal_pointer_reset_ex(SPL_G(autoload_functions), 
function_pos);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php