[PHP-CVS] cvs: php4(PHP_4_3) /ext/informix ifx.ec
sniper Fri Feb 21 01:49:55 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/informix ifx.ec Log: ZTS build fixes, style and ws fixes Index: php4/ext/informix/ifx.ec diff -u php4/ext/informix/ifx.ec:1.69.2.7 php4/ext/informix/ifx.ec:1.69.2.8 --- php4/ext/informix/ifx.ec:1.69.2.7 Thu Feb 20 23:58:08 2003 +++ php4/ext/informix/ifx.ecFri Feb 21 01:49:55 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: ifx.ec,v 1.69.2.7 2003/02/21 04:58:08 sniper Exp $ */ +/* $Id: ifx.ec,v 1.69.2.8 2003/02/21 06:49:55 sniper Exp $ */ /* --- * if you want a function reference : "grep '^\*\*' ifx.ec" will give @@ -75,7 +75,7 @@ static long php_intifx_get_blob(long bid, HashTable *list, char** content TSRMLS_DC); static long php_intifx_update_blob(long bid, char* param, long len, HashTable *list TSRMLS_DC); static loc_t *php_intifx_get_blobloc(long bid, HashTable *list TSRMLS_DC); -static char* php_intifx_create_tmpfile(TSRMLS_DC); +static char* php_intifx_create_tmpfile(TSRMLS_D); static long php_intifx_copy_blob(long bid, HashTable *list TSRMLS_DC); static long php_intifx_alloc_ibind(IFX_RES *Ifx_Result, int items TSRMLS_DC); static long php_intifx_preparse(char *statement TSRMLS_DC); @@ -117,7 +117,7 @@ #include typedef char IFX[128]; -#define SAFE_STRING(s) ((s)?(s):"") +#define SAFE_STRING(s) ((s) ? (s) : "") #define PHP_IFX_CHECK_CONNECTION(ifx) \ { \ if (ifx_check() < 0) { \ @@ -264,7 +264,7 @@ } ifx_err_msg = emalloc(64); - sprintf(ifx_err_msg,"%c [SQLSTATE=%c%c %c%c%c SQLCODE=%d]", + sprintf(ifx_err_msg, "%c [SQLSTATE=%c%c %c%c%c SQLCODE=%d]", c, SQLSTATE[0], SQLSTATE[1], @@ -355,12 +355,12 @@ REGISTER_INI_ENTRIES(); - le_result = zend_register_list_destructors_ex(ifx_free_result,NULL, "informix result",module_number); - le_idresult = zend_register_list_destructors_ex(ifx_free_blob, NULL, "informix id result", module_number); - le_link = zend_register_list_destructors_ex(_close_ifx_link,NULL, "informix link", module_number); - le_plink= zend_register_list_destructors_ex(NULL,_close_ifx_plink,"informix persistent link", module_number); + le_result = zend_register_list_destructors_ex(ifx_free_result, NULL, +"informix result", module_number); + le_idresult = zend_register_list_destructors_ex(ifx_free_blob, NULL, +"informix id result", module_number); + le_link = zend_register_list_destructors_ex(_close_ifx_link, NULL, +"informix link",module_number); + le_plink= zend_register_list_destructors_ex(NULL, _close_ifx_plink, +"informix persistent link", module_number); ifx_module_entry.type = type; - + REGISTER_LONG_CONSTANT("IFX_SCROLL", IFX_SCROLL, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("IFX_HOLD",IFX_HOLD,CONST_CS | CONST_PERSISTENT); $ifdef HAVE_IFX_IUS; @@ -383,7 +383,7 @@ PHP_RINIT_FUNCTION(ifx) { - IFXG(default_link)=-1; + IFXG(default_link) = -1; IFXG(num_links) = IFXG(num_persistent); return SUCCESS; } @@ -423,7 +423,7 @@ ** -- */ -static void php_ifx_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) +static void php_ifx_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) { char *hashed_details; int hashed_details_length; @@ -434,14 +434,14 @@ EXEC SQL END DECLARE SECTION; if (PG(sql_safe_mode)) { - if (ZEND_NUM_ARGS()>0) { + if (ZEND_NUM_ARGS() > 0) { php_error_docref(NULL TSRMLS_CC, E_NOTICE, "SQL safe mode in effect - ignoring host/user/password information"); } host = passwd = NULL; user = php_get_current_user(); - hashed_details_length = strlen(user)+3+3; - hashed_details = (char *) emalloc(hashed_details_length+1); - sprintf(hashed_details,"ifx__%s_",user); + hashed_details_length = strlen(user) + 3 + 3; + hashed_details = (char *) emalloc(hashed_details_length + 1); + sprintf(hashed_details, "ifx__%s_", user); } else { int host_len = 0, user_len = 0, passwd_len = 0; host = user = passwd = NULL; @@ -465,28 +465,29 @@ } hashed_details_length = sizeof("ifx___") - 1 + host_len + user_len + passwd_len; - hashed_details = (char *) emalloc(hashed_details_length+1); - sprintf(hashed_details,"ifx_%s_%s_%s", SAFE_STRING(host), SAFE_STRING(user), SAFE_STRING(passwd)); +
[PHP-CVS] cvs: php4(PHP_4_3) /ext/informix config.m4
sniper Fri Feb 21 01:49:36 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/informix config.m4 Log: MFH Index: php4/ext/informix/config.m4 diff -u php4/ext/informix/config.m4:1.27.4.1 php4/ext/informix/config.m4:1.27.4.2 --- php4/ext/informix/config.m4:1.27.4.1Mon Jan 13 18:31:32 2003 +++ php4/ext/informix/config.m4 Fri Feb 21 01:49:35 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.27.4.1 2003/01/13 23:31:32 sniper Exp $ +dnl $Id: config.m4,v 1.27.4.2 2003/02/21 06:49:35 sniper Exp $ dnl PHP_ARG_WITH(informix,for Informix support, @@ -44,7 +44,7 @@ esac AC_MSG_CHECKING([Informix version]) - IFX_VERSION=[`$INFORMIXDIR/bin/esql -V | sed -ne '1 s/^.*Version \([0-9]\)\.\([0-9]*\).*$/\1\2/p'`] + IFX_VERSION=[`$INFORMIXDIR/bin/esql -V | grep "ESQL Version" | sed -ne '1 +s/\(.*\)ESQL Version \([0-9]\)\.\([0-9]*\).*/\2\3/p'`] AC_MSG_RESULT($IFX_VERSION) AC_DEFINE_UNQUOTED(IFX_VERSION, $IFX_VERSION, [ ]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/ingres_ii ii.c ii.h
sniper Fri Feb 21 01:46:28 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/ingres_ii ii.c ii.h Log: MFH: ZTS build fixes Index: php4/ext/ingres_ii/ii.c diff -u php4/ext/ingres_ii/ii.c:1.31.8.2 php4/ext/ingres_ii/ii.c:1.31.8.3 --- php4/ext/ingres_ii/ii.c:1.31.8.2Mon Feb 10 21:43:24 2003 +++ php4/ext/ingres_ii/ii.c Fri Feb 21 01:46:27 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: ii.c,v 1.31.8.2 2003/02/11 02:43:24 sniper Exp $ */ +/* $Id: ii.c,v 1.31.8.3 2003/02/21 06:46:27 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -948,7 +948,7 @@ switch (info_type) { case II_FIELD_INFO_NAME: - name = php_ii_field_name(ii_link, index); + name = php_ii_field_name(ii_link, index TSRMLS_CC); if (name == NULL) { RETURN_FALSE; } @@ -1037,7 +1037,7 @@ /* Return the name of a field in a query result */ -static char *php_ii_field_name(II_LINK *ii_link, int index) +static char *php_ii_field_name(II_LINK *ii_link, int index TSRMLS_DC) { if (index < 1 || index > ii_link->fieldCount) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Ingres II: php_ii_field_name() called with wrong index (%d)", index); @@ -1206,7 +1206,7 @@ add_index_null(return_value, i + k - 1); } if (result_type & II_ASSOC) { - add_assoc_null(return_value, php_ii_field_name(ii_link, i + k - 1)); + add_assoc_null(return_value, +php_ii_field_name(ii_link, i + k - 1 TSRMLS_CC)); } } else {/* non NULL value */ @@ -1241,7 +1241,7 @@ } if (result_type & II_ASSOC) { - add_assoc_double(return_value, php_ii_field_name(ii_link, i + k - 1), value_double); + +add_assoc_double(return_value, php_ii_field_name(ii_link, i + k - 1 TSRMLS_CC), +value_double); } break; @@ -1270,7 +1270,7 @@ } if (result_type & II_ASSOC) { - add_assoc_long(return_value, php_ii_field_name(ii_link, i + k - 1), value_long); + +add_assoc_long(return_value, php_ii_field_name(ii_link, i + k - 1 TSRMLS_CC), +value_long); } break; @@ -1311,7 +1311,7 @@ } if (result_type & II_ASSOC) { - add_assoc_stringl(return_value, php_ii_field_name (ii_link, i + k - 1), value_char_p, len, should_copy); + +add_assoc_stringl(return_value, php_ii_field_name(ii_link, i + k - 1 TSRMLS_CC), +value_char_p, len, should_copy); } /* eventualy restore data pointer state for Index: php4/ext/ingres_ii/ii.h diff -u php4/ext/ingres_ii/ii.h:1.11.8.1 php4/ext/ingres_ii/ii.h:1.11.8.2 --- php4/ext/ingres_ii/ii.h:1.11.8.1Tue Dec 31 11:34:45 2002 +++ php4/ext/ingres_ii/ii.h Fri Feb 21 01:46:27 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: ii.h,v 1.11.8.1 2002/12/31 16:34:45 sebastian Exp $ */ +/* $Id: ii.h,v 1.11.8.2 2003/02/21 06:46:27 sniper Exp $ */ #ifndef II_H #define II_H @@ -43,13 +43,13 @@ #define II_OK 1 #define II_NO_DATA 2 static int _close_statement(II_LINK *link); -static int _rollback_transaction(II_LINK *link); +static int _rollback_transaction(II_LINK *link TSRMLS_DC); static void _close_ii_link(II_LINK *link TSRMLS_DC); static void _close_ii_plink(zend_rsrc_list_entry *link TSRMLS_DC); static int php_ii_get_default_link(INTERNAL_FUNCTION_PARAMETERS); static void php_ii_set_de
[PHP-CVS] cvs: php4 /ext/ingres_ii ii.c ii.h
sniper Fri Feb 21 01:46:11 2003 EDT Modified files: /php4/ext/ingres_ii ii.c ii.h Log: ZTS fixes Index: php4/ext/ingres_ii/ii.c diff -u php4/ext/ingres_ii/ii.c:1.35 php4/ext/ingres_ii/ii.c:1.36 --- php4/ext/ingres_ii/ii.c:1.35Mon Feb 10 21:42:58 2003 +++ php4/ext/ingres_ii/ii.c Fri Feb 21 01:46:11 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: ii.c,v 1.35 2003/02/11 02:42:58 sniper Exp $ */ +/* $Id: ii.c,v 1.36 2003/02/21 06:46:11 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -948,7 +948,7 @@ switch (info_type) { case II_FIELD_INFO_NAME: - name = php_ii_field_name(ii_link, index); + name = php_ii_field_name(ii_link, index TSRMLS_CC); if (name == NULL) { RETURN_FALSE; } @@ -1037,7 +1037,7 @@ /* Return the name of a field in a query result */ -static char *php_ii_field_name(II_LINK *ii_link, int index) +static char *php_ii_field_name(II_LINK *ii_link, int index TSRMLS_DC) { if (index < 1 || index > ii_link->fieldCount) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Ingres II: php_ii_field_name() called with wrong index (%d)", index); @@ -1206,7 +1206,7 @@ add_index_null(return_value, i + k - 1); } if (result_type & II_ASSOC) { - add_assoc_null(return_value, php_ii_field_name(ii_link, i + k - 1)); + add_assoc_null(return_value, +php_ii_field_name(ii_link, i + k - 1 TSRMLS_CC)); } } else {/* non NULL value */ @@ -1241,7 +1241,7 @@ } if (result_type & II_ASSOC) { - add_assoc_double(return_value, php_ii_field_name(ii_link, i + k - 1), value_double); + +add_assoc_double(return_value, php_ii_field_name(ii_link, i + k - 1 TSRMLS_CC), +value_double); } break; @@ -1270,7 +1270,7 @@ } if (result_type & II_ASSOC) { - add_assoc_long(return_value, php_ii_field_name(ii_link, i + k - 1), value_long); + +add_assoc_long(return_value, php_ii_field_name(ii_link, i + k - 1 TSRMLS_CC), +value_long); } break; @@ -1311,7 +1311,7 @@ } if (result_type & II_ASSOC) { - add_assoc_stringl(return_value, php_ii_field_name (ii_link, i + k - 1), value_char_p, len, should_copy); + +add_assoc_stringl(return_value, php_ii_field_name(ii_link, i + k - 1 TSRMLS_CC), +value_char_p, len, should_copy); } /* eventualy restore data pointer state for Index: php4/ext/ingres_ii/ii.h diff -u php4/ext/ingres_ii/ii.h:1.12 php4/ext/ingres_ii/ii.h:1.13 --- php4/ext/ingres_ii/ii.h:1.12Tue Dec 31 11:06:48 2002 +++ php4/ext/ingres_ii/ii.h Fri Feb 21 01:46:11 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: ii.h,v 1.12 2002/12/31 16:06:48 sebastian Exp $ */ +/* $Id: ii.h,v 1.13 2003/02/21 06:46:11 sniper Exp $ */ #ifndef II_H #define II_H @@ -43,13 +43,13 @@ #define II_OK 1 #define II_NO_DATA 2 static int _close_statement(II_LINK *link); -static int _rollback_transaction(II_LINK *link); +static int _rollback_transaction(II_LINK *link TSRMLS_DC); static void _close_ii_link(II_LINK *link TSRMLS_DC); static void _close_ii_plink(zend_rsrc_list_entry *link TSRMLS_DC); static int php_ii_get_default_link(INTERNAL_FUNCTION_PARAMETERS); static void php_ii_set_default_link(int id TSRMLS_DC); static void php_ii_do_connect
[PHP-CVS] cvs: php4(PHP_4_3) /ext/informix ifx.ec
sniper Thu Feb 20 23:58:09 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/informix ifx.ec Log: Fix ZTS build Index: php4/ext/informix/ifx.ec diff -u php4/ext/informix/ifx.ec:1.69.2.6 php4/ext/informix/ifx.ec:1.69.2.7 --- php4/ext/informix/ifx.ec:1.69.2.6 Thu Feb 20 07:09:19 2003 +++ php4/ext/informix/ifx.ecThu Feb 20 23:58:08 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: ifx.ec,v 1.69.2.6 2003/02/20 12:09:19 nobbie Exp $ */ +/* $Id: ifx.ec,v 1.69.2.7 2003/02/21 04:58:08 sniper Exp $ */ /* --- * if you want a function reference : "grep '^\*\*' ifx.ec" will give @@ -320,11 +320,9 @@ static void ifx_free_blob(zend_rsrc_list_entry *rsrc TSRMLS_DC) { - IFX_IDRES *Ifx_blob = (IFX_IDRES *)rsrc->ptr; - - - php_intifx_release_blob(&Ifx_blob->BLOB.blob_data TSRMLS_C); + IFX_IDRES *Ifx_blob = (IFX_IDRES *)rsrc->ptr; + php_intifx_release_blob(&Ifx_blob->BLOB.blob_data TSRMLS_CC); efree(Ifx_blob); } @@ -785,7 +783,7 @@ affected_rows = sqlca.sqlerrd[0]; /* save estimated affected rows */ for (e = 0; e < 6; e++) sqlerrd[e] = sqlca.sqlerrd[e]; - num_params = php_intifx_preparse(statement); + num_params = php_intifx_preparse(statement TSRMLS_CC); Ifx_Result = (IFX_RES *) emalloc(sizeof(IFX_RES)); if (Ifx_Result == NULL) { @@ -808,7 +806,7 @@ Ifx_Result->res_id[i] = -1; } - if (!php_intifx_alloc_ibind(Ifx_Result, num_params)) { + if (!php_intifx_alloc_ibind(Ifx_Result, num_params TSRMLS_CC)) { IFXG(sv_sqlcode) = SQLCODE; EXEC SQL free :statemid; efree(Ifx_Result); @@ -816,8 +814,7 @@ RETURN_FALSE; } - - desc_count = php_intifx_count_descriptors(statemid); + desc_count = php_intifx_count_descriptors(statemid TSRMLS_CC); if (desc_count == 0) desc_count = 1; @@ -1190,7 +1187,7 @@ affected_rows = sqlca.sqlerrd[0]; /* save estimated affected rows */ for (e = 0; e < 6; e++) sqlerrd[e] = sqlca.sqlerrd[e]; - num_params = php_intifx_preparse(statement); + num_params = php_intifx_preparse(statement TSRMLS_CC); Ifx_Result = (IFX_RES *) emalloc(sizeof(IFX_RES)); if (Ifx_Result == NULL) { @@ -1214,7 +1211,7 @@ Ifx_Result->res_id[i] = -1; } - if (!php_intifx_alloc_ibind(Ifx_Result, num_params)) { + if (!php_intifx_alloc_ibind(Ifx_Result, num_params TSRMLS_CC)) { IFXG(sv_sqlcode) = SQLCODE; EXEC SQL free :statemid; efree(Ifx_Result); @@ -1222,7 +1219,7 @@ RETURN_FALSE; } - desc_count = php_intifx_count_descriptors(statemid); + desc_count = php_intifx_count_descriptors(statemid TSRMLS_CC); if (desc_count == 0) desc_count = 1; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /sapi/apache php4apache.dsp
dviner Thu Feb 20 19:14:33 2003 EDT Modified files: /php4/sapi/apache php4apache.dsp Log: this tiny change adds the location of apache includes and libraries that are installed when you use the Apache Windows Installer (C:\Program Files\Apache Group\Apache\*). With this patch, a windows developer who has used the Apache Windows Installer should be able to compile the Apache sapi module without any modifications to his/her installed tree. It should have no effect whatsoever on anyone else. --dviner Index: php4/sapi/apache/php4apache.dsp diff -u php4/sapi/apache/php4apache.dsp:1.15 php4/sapi/apache/php4apache.dsp:1.16 --- php4/sapi/apache/php4apache.dsp:1.15Sun Jan 5 10:09:11 2003 +++ php4/sapi/apache/php4apache.dsp Thu Feb 20 19:14:33 2003 @@ -44,7 +44,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "APACHEPHP4_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "...\..\include" /I "..\..\win32" /I "..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I "..\..\..\php_build\includes" /I "..\..\main" /I "..\..\TSRM" /I "..\..\regex" /D ZEND_DEBUG=0 /D "NDEBUG" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_USRDLL" /D "APACHEPHP4_EXPORTS" /D "WIN32" /D "_MBCS" /D "APACHE_READDIR_H" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "...\..\include" /I "..\..\win32" /I +"..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I "..\..\..\php_build\includes" /I +"..\..\main" /I "..\..\TSRM" /I "..\..\regex" /I "C:\Program Files\Apache +Group\Apache\include" /D ZEND_DEBUG=0 /D "NDEBUG" /D "ZTS" /D "ZEND_WIN32" /D +"PHP_WIN32" /D "_WINDOWS" /D "_USRDLL" /D "APACHEPHP4_EXPORTS" /D "WIN32" /D "_MBCS" +/D "APACHE_READDIR_H" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" @@ -54,7 +54,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 php4ts.lib ApacheCore.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x6000" /version:4.0 /dll /machine:I386 /libpath:"..\..\..\php_build\release" /libpath:"..\..\Release_TS" /libpath:"..\..\TSRM\Release_TS" /libpath:"..\..\Zend\Release_TS" +# ADD LINK32 php4ts.lib ApacheCore.lib kernel32.lib user32.lib gdi32.lib winspool.lib +comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib +odbccp32.lib /nologo /base:"0x6000" /version:4.0 /dll /machine:I386 +/libpath:"..\..\..\php_build\release" /libpath:"..\..\Release_TS" +/libpath:"..\..\TSRM\Release_TS" /libpath:"..\..\Zend\Release_TS" +/libpath:"C:\Program Files\Apache Group\Apache\libexec" !ELSEIF "$(CFG)" == "php4apache - Win32 Debug_TS" @@ -70,7 +70,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "APACHEPHP4_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "...\..\include" /I "..\..\win32" /I "..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I "..\..\..\php_build\includes" /I "..\..\main" /I "..\..\TSRM" /I "..\..\regex" /D "_DEBUG" /D ZEND_DEBUG=1 /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_USRDLL" /D "APACHEPHP4_EXPORTS" /D "WIN32" /D "_MBCS" /D "APACHE_READDIR_H" /FR /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "...\..\include" /I "..\..\win32" /I +"..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I "..\..\..\php_build\includes" /I +"..\..\main" /I "..\..\TSRM" /I "..\..\regex" /I "C:\Program Files\Apache +Group\Apache\include" /D "_DEBUG" /D ZEND_DEBUG=1 /D "ZTS" /D "ZEND_WIN32" /D +"PHP_WIN32" /D "_WINDOWS" /D "_USRDLL" /D "APACHEPHP4_EXPORTS" /D "WIN32" /D "_MBCS" +/D "APACHE_READDIR_H" /FR /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" @@ -80,7 +80,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 php4ts_debug.lib ApacheCore.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x6000" /version:4.0 /dll /incremental:yes /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\php_build\release" /libpath:"..\..\Debug_TS" /libpath:"..\..\TSRM\Debug_TS" /libpath:"..\..\Zend\Debug_TS" +# ADD LINK32 php4ts_debug
[PHP-CVS] cvs: php4 / README.input_filter /ext/mbstring mb_gpc.c /main SAPI.c SAPI.h php_variables.c rfc1867.c
rasmus Thu Feb 20 17:21:49 2003 EDT Modified files: /php4 README.input_filter /php4/ext/mbstring mb_gpc.c /php4/main SAPI.c SAPI.h php_variables.c rfc1867.c Log: An input filter might not simply strip stuff, it might also turn things into entities or use some other mechanism which causes the filtered data to be longer than the original data. Ergo, pass in the address of the buffer instead so the filter is free to reallocate it. Index: php4/README.input_filter diff -u php4/README.input_filter:1.1 php4/README.input_filter:1.2 --- php4/README.input_filter:1.1Wed Feb 19 14:41:06 2003 +++ php4/README.input_filterThu Feb 20 17:21:46 2003 @@ -85,18 +85,18 @@ { php_info_print_table_start(); php_info_print_table_row( 2, "My Input Filter Support", "enabled" ); -php_info_print_table_row( 2, "Revision", "$Revision: 1.1 $"); +php_info_print_table_row( 2, "Revision", "$Revision: 1.2 $"); php_info_print_table_end(); } -unsigned int my_sapi_input_filter(int arg, char *var, char *val, unsigned int val_len) +unsigned int my_sapi_input_filter(int arg, char *var, char **val, unsigned int +val_len) { zval new_var; zval *array_ptr = NULL; char *raw_var; int var_len; -assert(val != NULL); +assert(*val != NULL); switch(arg) { case PARSE_GET: @@ -125,7 +125,7 @@ break; } Z_STRLEN(new_var) = val_len; -Z_STRVAL(new_var) = estrndup(val, val_len); +Z_STRVAL(new_var) = estrndup(*val, val_len); Z_TYPE(new_var) = IS_STRING; var_len = strlen(var); @@ -135,9 +135,9 @@ php_register_variable_ex(raw_var, &new_var, array_ptr TSRMLS_DC); -php_strip_tags(val, val_len, NULL, NULL, 0); +php_strip_tags(*val, val_len, NULL, NULL, 0); -return strlen(val); +return strlen(*val); } PHP_FUNCTION(my_get_raw) Index: php4/ext/mbstring/mb_gpc.c diff -u php4/ext/mbstring/mb_gpc.c:1.5 php4/ext/mbstring/mb_gpc.c:1.6 --- php4/ext/mbstring/mb_gpc.c:1.5 Wed Feb 19 15:56:47 2003 +++ php4/ext/mbstring/mb_gpc.c Thu Feb 20 17:21:48 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mb_gpc.c,v 1.5 2003/02/19 20:56:47 rasmus Exp $ */ +/* $Id: mb_gpc.c,v 1.6 2003/02/20 22:21:48 rasmus Exp $ */ /* {{{ includes */ #ifdef HAVE_CONFIG_H @@ -342,7 +342,7 @@ val_len = len_list[n]; } n++; - val_len = sapi_module.input_filter(data_type, var, val, val_len TSRMLS_CC); + val_len = sapi_module.input_filter(data_type, var, &val, val_len +TSRMLS_CC); /* add variable to symbol table */ php_register_variable_safe(var, val, val_len, array_ptr TSRMLS_CC); if (convd != NULL){ Index: php4/main/SAPI.c diff -u php4/main/SAPI.c:1.172 php4/main/SAPI.c:1.173 --- php4/main/SAPI.c:1.172 Wed Feb 19 14:41:07 2003 +++ php4/main/SAPI.cThu Feb 20 17:21:48 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: SAPI.c,v 1.172 2003/02/19 19:41:07 rasmus Exp $ */ +/* $Id: SAPI.c,v 1.173 2003/02/20 22:21:48 rasmus Exp $ */ #include #include @@ -823,7 +823,7 @@ return SUCCESS; } -SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char *var, char *val, unsigned int val_len TSRMLS_DC)) +SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char +*var, char **val, unsigned int val_len TSRMLS_DC)) { sapi_module.input_filter = input_filter; return SUCCESS; Index: php4/main/SAPI.h diff -u php4/main/SAPI.h:1.99 php4/main/SAPI.h:1.100 --- php4/main/SAPI.h:1.99 Wed Feb 19 14:41:07 2003 +++ php4/main/SAPI.hThu Feb 20 17:21:48 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: SAPI.h,v 1.99 2003/02/19 19:41:07 rasmus Exp $ */ +/* $Id: SAPI.h,v 1.100 2003/02/20 22:21:48 rasmus Exp $ */ #ifndef SAPI_H #define SAPI_H @@ -178,7 +178,7 @@ SAPI_API void sapi_unregister_post_entry(sapi_post_entry *post_entry); SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(TSRMLS_D)); SAPI_API int sapi_register_treat_data(void (*treat_data)(int arg, char *str, zval *destArray TSRMLS_DC)); -SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char *var, char *val, unsigned int val_len TSRMLS_DC)); +SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char +*var, char **val, unsigned int val_len TSRMLS_DC)); SAPI_API int sapi_flush(TSRMLS_D); SAPI_API struct stat *sapi_get_stat(TSRMLS_D); @@ -240,7 +240,7 @@ int (*get_target_uid)(uid_t * TSRMLS_DC); int (*get_target_gid)(gid_t * TSRMLS_DC); - unsigned int (*input_filter)(int arg, char *var, char *val, unsigned int val_len T
[PHP-CVS] cvs: php4 /ext/pgsql pgsql.c
jerenkrantz Thu Feb 20 16:48:59 2003 EDT Modified files: /php4/ext/pgsql pgsql.c Log: Remove C++-style comment. (Breaks Sun Forte compiler.) Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.262 php4/ext/pgsql/pgsql.c:1.263 --- php4/ext/pgsql/pgsql.c:1.262Thu Feb 20 02:10:07 2003 +++ php4/ext/pgsql/pgsql.c Thu Feb 20 16:48:58 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.262 2003/02/20 07:10:07 sniper Exp $ */ +/* $Id: pgsql.c,v 1.263 2003/02/20 21:48:58 jerenkrantz Exp $ */ #include @@ -606,7 +606,7 @@ pgsql = (PGconn *) le->ptr; } ZEND_REGISTER_RESOURCE(return_value, pgsql, le_plink); - } else { // Non persistent connection + } else { /* Non persistent connection */ list_entry *index_ptr,new_index_ptr; /* first we check the hash for the hashed_details key. if it exists, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard php_fopen_wrapper.c
pollita Thu Feb 20 15:05:31 2003 EDT Modified files: /php4/ext/standard php_fopen_wrapper.c Log: Reduce unnecessary filter applications when stream is (read|write) only Index: php4/ext/standard/php_fopen_wrapper.c diff -u php4/ext/standard/php_fopen_wrapper.c:1.33 php4/ext/standard/php_fopen_wrapper.c:1.34 --- php4/ext/standard/php_fopen_wrapper.c:1.33 Tue Feb 18 01:10:14 2003 +++ php4/ext/standard/php_fopen_wrapper.c Thu Feb 20 15:05:31 2003 @@ -17,7 +17,7 @@ | Hartmut Holzgraefe <[EMAIL PROTECTED]> | +--+ */ -/* $Id: php_fopen_wrapper.c,v 1.33 2003/02/18 06:10:14 pollita Exp $ */ +/* $Id: php_fopen_wrapper.c,v 1.34 2003/02/20 20:05:31 pollita Exp $ */ #include #include @@ -150,6 +150,7 @@ php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, char *path, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC) { int fd = -1; + int mode_rw = 0; php_stream * stream = NULL; char *p, *token, *pathdup; @@ -179,6 +180,13 @@ } if (!strncasecmp(path, "filter/", 7)) { + /* Save time/memory when chain isn't specified */ + if (strchr(mode, 'r') || strchr(mode, '+')) { + mode_rw |= PHP_STREAM_FILTER_READ; + } + if (strchr(mode, 'w') || strchr(mode, '+') || strchr(mode, 'a')) { + mode_rw |= PHP_STREAM_FILTER_WRITE; + } pathdup = estrndup(path + 6, strlen(path + 6)); p = strstr(pathdup, "/resource="); if (!p) { @@ -200,7 +208,7 @@ } else if (!strncasecmp(p, "write=", 6)) { php_stream_apply_filter_list(stream, p + 6, 0, 1 TSRMLS_CC); } else { - php_stream_apply_filter_list(stream, p, 1, 1 TSRMLS_CC); + php_stream_apply_filter_list(stream, p, mode_rw & +PHP_STREAM_FILTER_READ, mode_rw & PHP_STREAM_FILTER_WRITE TSRMLS_CC); } p = php_strtok_r(NULL, "/", &token); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /sapi/apache2handler php_apache.h php_functions.c sapi_apache2.c
jerenkrantz Thu Feb 20 13:20:03 2003 EDT Modified files: /php4/sapi/apache2handler php_apache.h php_functions.c sapi_apache2.c Log: Clean up apache2handler SAPI. Key improvements: - Be streamy - Re-enable virtual() support - Set content_type correctly - Remove unnecessary code and reintroduce some missing code - Change signature from PhP to PHP Index: php4/sapi/apache2handler/php_apache.h diff -u php4/sapi/apache2handler/php_apache.h:1.1 php4/sapi/apache2handler/php_apache.h:1.2 --- php4/sapi/apache2handler/php_apache.h:1.1 Tue Feb 11 12:40:11 2003 +++ php4/sapi/apache2handler/php_apache.h Thu Feb 20 13:20:03 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_apache.h,v 1.1 2003/02/11 17:40:11 ianh Exp $ */ +/* $Id: php_apache.h,v 1.2 2003/02/20 18:20:03 jerenkrantz Exp $ */ #ifndef PHP_APACHE_H #define PHP_APACHE_H @@ -35,21 +35,13 @@ typedef struct php_struct { int state; request_rec *r; - conn_rec *c; - -apr_bucket_brigade *bb; - /* Length of post_data buffer */ - int post_len; - /* Index for reading from buffer */ - int post_idx; - /* stat structure of the current file */ + apr_bucket_brigade *brigade; + /* stat structure of the current file */ #if defined(NETWARE) && defined(CLIB_STAT_PATCH) struct stat_libc finfo; #else struct stat finfo; #endif - /* Buffer for request body filter */ - char *post_data; /* Whether or not we've processed PHP in the output filters yet. */ int request_processed; } php_struct; Index: php4/sapi/apache2handler/php_functions.c diff -u php4/sapi/apache2handler/php_functions.c:1.1 php4/sapi/apache2handler/php_functions.c:1.2 --- php4/sapi/apache2handler/php_functions.c:1.1Tue Feb 11 12:40:11 2003 +++ php4/sapi/apache2handler/php_functions.cThu Feb 20 13:20:03 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_functions.c,v 1.1 2003/02/11 17:40:11 ianh Exp $ */ +/* $Id: php_functions.c,v 1.2 2003/02/20 18:20:03 jerenkrantz Exp $ */ #include "php.h" #include "ext/standard/php_smart_str.h" @@ -65,39 +65,29 @@ convert_to_string_ex(filename); - php_error_docref(NULL TSRMLS_CC, E_ERROR, -"Virtual Function is not implemented in Apache2Handler '%s' " -"use SSI instead http://httpd.apache.org/docs-2.0/mod/mod_include.html";, -Z_STRVAL_PP(filename)); - ap_destroy_sub_req(rr); -RETURN_FALSE; -/* ### this function is unsafe until PHP becomes re-entrant - * as running virtual('foo.php') from inside another php script - * can cause bad things to happen. - * Workaround: - * Use instead, and add the INCLUDES filter - */ -#ifdef NEVER if (!(rr = php_apache_lookup_uri(Z_STRVAL_PP(filename) TSRMLS_CC))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to include '%s' - URI lookup failed", Z_STRVAL_PP(filename)); RETURN_FALSE; } - - if (rr->status == HTTP_OK) { - if (ap_run_sub_req(rr)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to include '%s' - request execution failed", Z_STRVAL_PP(filename)); - ap_destroy_sub_req(rr); - RETURN_FALSE; - } + + if (rr->status != HTTP_OK) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to include '%s' - +error finding URI", Z_STRVAL_PP(filename)); ap_destroy_sub_req(rr); - RETURN_TRUE; + RETURN_FALSE; + } + + /* Flush everything. */ + php_end_ob_buffers(1 TSRMLS_CC); + php_header(); + + if (ap_run_sub_req(rr)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to include '%s' - +request execution failed", Z_STRVAL_PP(filename)); + ap_destroy_sub_req(rr); + RETURN_FALSE; } - - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to include '%s' - error finding URI", Z_STRVAL_PP(filename)); ap_destroy_sub_req(rr); - RETURN_FALSE; -#endif + RETURN_TRUE; } /* */ Index: php4/sapi/apache2handler/sapi_apache2.c diff -u php4/sapi/apache2handler/sapi_apache2.c:1.1 php4/sapi/apache2handler/sapi_apache2.c:1.2 --- php4/sapi/apache2handler/sapi_apache2.c:1.1 Tue Feb 11 12:40:11 2003 +++ php4/sapi/apache2handler/sapi_apache2.c Thu Feb 20 13:20:03 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: sapi_apache2.c,v 1.1 2003/02/11 17:40:11 ianh Exp $ */ +/* $Id: sapi_apache2.c,v 1.2 2003/02/20 18:20:03 jerenkrantz Exp $ */ #include @@ -55,50 +55,57 @@ #undef shu
[PHP-CVS] cvs: php4(PHP_4_3) / NEWS
moriyoshi Thu Feb 20 12:57:55 2003 EDT Modified files: (Branch: PHP_4_3) /php4 NEWS Log: BFN Index: php4/NEWS diff -u php4/NEWS:1.1247.2.102 php4/NEWS:1.1247.2.103 --- php4/NEWS:1.1247.2.102 Thu Feb 20 02:14:23 2003 +++ php4/NEWS Thu Feb 20 12:57:54 2003 @@ -21,6 +21,8 @@ - Added improved JPEG 2000 support for getimagesize(). (Marcus, Adam Wright) - Added XBM and WBMP support for getimagesize(). (Marcus) - Fixed several errors in hwapi extension. Objects weren't handled properly. (Uwe) +- Fixed bug #22330 (overloaded strrpos() gives wrong results). + ([EMAIL PROTECTED], Moriyoshi) - Fixed bug #22308 (optimized passthru, code is now ~40 times faster). (Ilia) - Fixed bug #22306 (pg_lo_seek($h, 0, PGSQL_SEEK_SET) succeeds but returns false). (Jani) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/mbstring mbstring.c
moriyoshi Thu Feb 20 12:54:11 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mbstring mbstring.c Log: MFH(r1.165): Fixed bug #22330 (overloaded strrpos() weirdness) Index: php4/ext/mbstring/mbstring.c diff -u php4/ext/mbstring/mbstring.c:1.142.2.7 php4/ext/mbstring/mbstring.c:1.142.2.8 --- php4/ext/mbstring/mbstring.c:1.142.2.7 Mon Feb 3 11:54:38 2003 +++ php4/ext/mbstring/mbstring.cThu Feb 20 12:54:10 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.142.2.7 2003/02/03 16:54:38 moriyoshi Exp $ */ +/* $Id: mbstring.c,v 1.142.2.8 2003/02/20 17:54:10 moriyoshi Exp $ */ /* * PHP4 Multibyte String module "mbstring" @@ -166,7 +166,7 @@ static const struct mb_overload_def mb_ovld[] = { {MB_OVERLOAD_MAIL, "mail", "mb_send_mail", "mb_orig_mail"}, {MB_OVERLOAD_STRING, "strlen", "mb_strlen", "mb_orig_strlen"}, - {MB_OVERLOAD_STRING, "strpos", "mb_strpos", "mb_orig_strrpos"}, + {MB_OVERLOAD_STRING, "strpos", "mb_strpos", "mb_orig_strpos"}, {MB_OVERLOAD_STRING, "strrpos", "mb_strrpos", "mb_orig_strrpos"}, {MB_OVERLOAD_STRING, "substr", "mb_substr", "mb_orig_substr"}, {MB_OVERLOAD_STRING, "strtolower", "mb_strtolower", "mb_orig_strtolower"}, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mbstring mbstring.c
moriyoshi Thu Feb 20 12:52:42 2003 EDT Modified files: /php4/ext/mbstring mbstring.c Log: Fixed bug #22330 (overloaded strrpos() gives wrong results) Patch by david at santinoli dot com. Thanks! Index: php4/ext/mbstring/mbstring.c diff -u php4/ext/mbstring/mbstring.c:1.164 php4/ext/mbstring/mbstring.c:1.165 --- php4/ext/mbstring/mbstring.c:1.164 Wed Feb 19 14:41:07 2003 +++ php4/ext/mbstring/mbstring.cThu Feb 20 12:52:42 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.164 2003/02/19 19:41:07 rasmus Exp $ */ +/* $Id: mbstring.c,v 1.165 2003/02/20 17:52:42 moriyoshi Exp $ */ /* * PHP4 Multibyte String module "mbstring" @@ -154,7 +154,7 @@ static const struct mb_overload_def mb_ovld[] = { {MB_OVERLOAD_MAIL, "mail", "mb_send_mail", "mb_orig_mail"}, {MB_OVERLOAD_STRING, "strlen", "mb_strlen", "mb_orig_strlen"}, - {MB_OVERLOAD_STRING, "strpos", "mb_strpos", "mb_orig_strrpos"}, + {MB_OVERLOAD_STRING, "strpos", "mb_strpos", "mb_orig_strpos"}, {MB_OVERLOAD_STRING, "strrpos", "mb_strrpos", "mb_orig_strrpos"}, {MB_OVERLOAD_STRING, "substr", "mb_substr", "mb_orig_substr"}, {MB_OVERLOAD_STRING, "strtolower", "mb_strtolower", "mb_orig_strtolower"}, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/strings sha1.phpt sha1raw.phpt
derick Thu Feb 20 11:15:41 2003 EDT Modified files: /php4/ext/standard/tests/stringssha1.phpt sha1raw.phpt Log: - Fixed testcase... you can never trust on RFCs it seems Index: php4/ext/standard/tests/strings/sha1.phpt diff -u php4/ext/standard/tests/strings/sha1.phpt:1.1 php4/ext/standard/tests/strings/sha1.phpt:1.2 --- php4/ext/standard/tests/strings/sha1.phpt:1.1 Tue Feb 18 15:31:19 2003 +++ php4/ext/standard/tests/strings/sha1.phpt Thu Feb 20 11:15:41 2003 @@ -10,5 +10,5 @@ --EXPECT-- a9993e364706816aba3e25717850c26c9cd0d89d 84983e441c3bd26ebaae4aa1f95129e5e54670f1 -34aa973cd4c4daa4f61eeb2bdbad27316534016f -dea356a2cddd90c7a7ecedc5ebb563934f460452 +86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 +e0c094e867ef46c350ef54a7f59dd60bed92ae83 Index: php4/ext/standard/tests/strings/sha1raw.phpt diff -u php4/ext/standard/tests/strings/sha1raw.phpt:1.1 php4/ext/standard/tests/strings/sha1raw.phpt:1.2 --- php4/ext/standard/tests/strings/sha1raw.phpt:1.1Tue Feb 18 15:31:19 2003 +++ php4/ext/standard/tests/strings/sha1raw.phptThu Feb 20 11:15:41 2003 @@ -10,5 +10,5 @@ --EXPECT-- a9993e364706816aba3e25717850c26c9cd0d89d 84983e441c3bd26ebaae4aa1f95129e5e54670f1 -34aa973cd4c4daa4f61eeb2bdbad27316534016f -dea356a2cddd90c7a7ecedc5ebb563934f460452 +86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 +e0c094e867ef46c350ef54a7f59dd60bed92ae83 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /scripts/ext_skel_ng extension_parser.php
hholzgraThu Feb 20 10:19:14 2003 EDT Modified files: /php4/scripts/ext_skel_ng extension_parser.php Log: put constants into C output do not limit int constants to numbers, C #defines are ok as strings foobar(void) needs special treatment in code generation Index: php4/scripts/ext_skel_ng/extension_parser.php diff -u php4/scripts/ext_skel_ng/extension_parser.php:1.3 php4/scripts/ext_skel_ng/extension_parser.php:1.4 --- php4/scripts/ext_skel_ng/extension_parser.php:1.3 Wed Feb 19 11:02:45 2003 +++ php4/scripts/ext_skel_ng/extension_parser.php Thu Feb 20 10:19:14 2003 @@ -90,9 +90,7 @@ switch($type) { case "int": case "integer": - if (!is_numeric($value)) $this->error("invalid value for integer constant: '$value'"); - if ((int)$value != $value) $this->error("invalid value for integer constant: '$value'"); - $this->constants[] = &new php_constant($name, (int)$value, "integer", trim($this->cdata)); + $this->constants[] = &new php_constant($name, $value, +"integer", trim($this->cdata)); break; case "float": @@ -223,7 +221,7 @@ $fp = fopen("$docdir/reference.xml", "w"); fputs($fp, " - + {$this->summary} {$this->name} @@ -501,6 +499,12 @@ $code .= "\tREGISTER_INI_ENTRIES();\n"; } + if(count($this->constants)) { + foreach($this->constants as $constant) { + $code .= $constant->c_code(); + } + } + if(isset($this->internal_functions['MINIT'])) { if(count($this->globals) || count($this->phpini)) $code .= "\n\t{\n"; $code .= $this->internal_functions['MINIT']->code; @@ -634,8 +638,10 @@ foreach ($func->params as $key => $param) { if (!empty($param['optional'])) $code.=" ["; if ($key) $code.=", "; - $code .= $param['type']." "; - $code .= isset($param['name']) ? $param['name'] : "par_$key"; + $code .= $param['type']; + if($param['type'] != "void") { + $code .= isset($param['name']) ? +$param['name'] : "par_$key"; + } } } for ($n=$func->optional; $n>0; $n--) { @@ -647,7 +653,6 @@ $code .= "PHP_FUNCTION({$func->name})\n"; $code .= "{\n"; - $code .= "\tint argc = ZEND_NUM_ARGS();\n\n"; if (isset($func->params)) { $arg_string=""; @@ -715,11 +720,14 @@ break; } } + } + if(strlen($arg_string)) { + $code .= "\tint argc = ZEND_NUM_ARGS();\n\n"; $code .= "\n\tif (zend_parse_parameters(argc TSRMLS_CC, \"$arg_string\", ".join(", ",$arg_pointers).") == FAILURE) return;\n"; if($res_fetch) $code.="\n$res_fetch\n"; } else { - $code .= "\tif(argc>0) { WRONG_PARAM_COUNT; }\n"; + $code .= "\tif(ZEND_NUM_ARGS()>0) { WRONG_PARAM_COUNT; +}\n"; } $code .= "\n"; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4(PHP_4_3) /ext/informix php_informix_includes.h
Thanks for the help, will do it right next time =) Corne' Jani Taskinen wrote: You should always first commit to HEAD (in the current situation, that is the php5 module HEAD). And if you're going to MFH, then you don't use the @- foo in your commit message, but manually add the message to NEWS file. (as I hope you don't have access elsewhere but ext/informix, you can mention the need for such addition in the commit message when you MFH.) MFH = Merge From HEAD --Jani ps. This was about both of these commits and to prevent causing extra work to me in the future.. I will do the MFB for you, so you don't have to worry about that now. On Thu, 20 Feb 2003, Corne' Cornelius wrote: nobbie Thu Feb 20 06:57:28 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/informix php_informix_includes.h Log: #- Changed sizes of char[] in IFX_RES: connecid, cursorid, descrpid, statemid from 16 to 32 to prevents possible overflow Index: php4/ext/informix/php_informix_includes.h diff -u php4/ext/informix/php_informix_includes.h:1.1.4.1 php4/ext/informix/php_informix_includes.h:1.1.4.2 --- php4/ext/informix/php_informix_includes.h:1.1.4.1 Tue Dec 31 11:34:44 2002 +++ php4/ext/informix/php_informix_includes.h Thu Feb 20 06:57:28 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: php_informix_includes.h,v 1.1.4.1 2002/12/31 16:34:44 sebastian Exp $ */ +/* $Id: php_informix_includes.h,v 1.1.4.2 2003/02/20 11:57:28 nobbie Exp $ */ #ifndef PHP_INFORMIX_INCLUDES_H #define PHP_INFORMIX_INCLUDES_H @@ -37,10 +37,10 @@ /* query result set data */ typedef struct ifx_res { - char connecid[16]; - char cursorid[16]; - char descrpid[16]; - char statemid[16]; + char connecid[32]; + char cursorid[32]; + char descrpid[32]; + char statemid[32]; int isscroll; int ishold; int iscursory; =Disclaimer and Confidentiality=== This message contains information intended for the perusal, and/or use (if so stated), by the stated addressee(s) only. The information is confidential and privileged. If you are not an intended recipient, do not peruse, use, disseminate, distribute, copy or in any manner rely upon he information contained in this message (directly or indirectly). The sender and/or the entity represented by the sender shall not be held accountable in the event that this prohibition is disregarded. If you receive this message in error, notify the sender immediately by e-mail, fax or telephone representations contained in this message, whether express or implied, are those of the sender only, unless that sender expressly states them to be the views or representations of an entity or person, who shall be named by the sender and who the sender shall state to represent. No liability shall otherwise attach to any other entity or person. ==
Re: [PHP-CVS] cvs: php4(PHP_4_3) /ext/informix php_informix_includes.h
You should always first commit to HEAD (in the current situation, that is the php5 module HEAD). And if you're going to MFH, then you don't use the @- foo in your commit message, but manually add the message to NEWS file. (as I hope you don't have access elsewhere but ext/informix, you can mention the need for such addition in the commit message when you MFH.) MFH = Merge From HEAD --Jani ps. This was about both of these commits and to prevent causing extra work to me in the future.. I will do the MFB for you, so you don't have to worry about that now. On Thu, 20 Feb 2003, Corne' Cornelius wrote: >nobbie Thu Feb 20 06:57:28 2003 EDT > > Modified files: (Branch: PHP_4_3) >/php4/ext/informix php_informix_includes.h > Log: > > #- Changed sizes of char[] in IFX_RES: connecid, cursorid, descrpid, statemid > from 16 to 32 to prevents possible overflow > > >Index: php4/ext/informix/php_informix_includes.h >diff -u php4/ext/informix/php_informix_includes.h:1.1.4.1 >php4/ext/informix/php_informix_includes.h:1.1.4.2 >--- php4/ext/informix/php_informix_includes.h:1.1.4.1 Tue Dec 31 11:34:44 2002 >+++ php4/ext/informix/php_informix_includes.h Thu Feb 20 06:57:28 2003 >@@ -19,7 +19,7 @@ >+--+ > */ > >-/* $Id: php_informix_includes.h,v 1.1.4.1 2002/12/31 16:34:44 sebastian Exp $ */ >+/* $Id: php_informix_includes.h,v 1.1.4.2 2003/02/20 11:57:28 nobbie Exp $ */ > > #ifndef PHP_INFORMIX_INCLUDES_H > #define PHP_INFORMIX_INCLUDES_H >@@ -37,10 +37,10 @@ > > /* query result set data */ > typedef struct ifx_res { >- char connecid[16]; >- char cursorid[16]; >- char descrpid[16]; >- char statemid[16]; >+ char connecid[32]; >+ char cursorid[32]; >+ char descrpid[32]; >+ char statemid[32]; > int isscroll; > int ishold; > int iscursory; > > > > -- <- For Sale! -> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / NEWS
sniper Thu Feb 20 08:42:29 2003 EDT Modified files: /php4 NEWS Log: style Index: php4/NEWS diff -u php4/NEWS:1.1353 php4/NEWS:1.1354 --- php4/NEWS:1.1353Thu Feb 20 05:32:33 2003 +++ php4/NEWS Thu Feb 20 08:42:29 2003 @@ -1,7 +1,6 @@ PHP 4 NEWS ||| ? ? ??? 200?, Version 5.0.0 -- Added session.hash_function and session.hash_bits_per_character. (Sascha) - Input Filter support added. See README.input_filter. (Rasmus) - Updated IFX_VERSION entry to work with new Version output of ESQL/C (Corne') - Moved extensions to PECL (http://pear.php.net/): (James, Tal) @@ -17,12 +16,12 @@ - Changed array_search() to accept also objects as a needle. (Moriyoshi) - Changed ext/mcrypt to require libmcrypt version 2.5.6 or greater. (Derick) - Changed uniqid() parameters to be optional and allow any prefix length. (Marcus) +- Added session.hash_function and session.hash_bits_per_character. (Sascha) - Added lightweight streaming input abstraction to the Zend Engine scanners that provides uniform support for include()'ing data from PHP streams across all platforms (Wez, Zend Engine). - Added optional parameter to sha1(), sha1_file(), md5() and md5_file() which - makes them return the digest as binary data. (Michael Bretterklieber - <[EMAIL PROTECTED]>, Derick) + makes them return the digest as binary data. (Michael Bretterklieber, Derick) - Added proc_nice() function. Changes priority of the current process. (Ilia) - Added pcntl_getpriority() and pcntl_setpriority() functions. (Ilia) - Added idate(), date_sunrise() and date_sunset() functions. (Moshe Doron) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4(PHP_4_3) /ext/informix ifx.ec php_informix_includes.h
nobbie Thu Feb 20 07:09:22 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/informix ifx.ec php_informix_includes.h Log: @- Added Input Descriptor Binding to Informix driver. (Corne') erm, you just added new functions to the PHP_4_3 branch, I thought I explained that this was only for bugfixes? Derick The new functions are to fix a bug which causes php_4_3 to segfault. i see i forgot to put that in the message, shyte, sorry bout that - Corne' =Disclaimer and Confidentiality=== This message contains information intended for the perusal, and/or use (if so stated), by the stated addressee(s) only. The information is confidential and privileged. If you are not an intended recipient, do not peruse, use, disseminate, distribute, copy or in any manner rely upon he information contained in this message (directly or indirectly). The sender and/or the entity represented by the sender shall not be held accountable in the event that this prohibition is disregarded. If you receive this message in error, notify the sender immediately by e-mail, fax or telephone representations contained in this message, whether express or implied, are those of the sender only, unless that sender expressly states them to be the views or representations of an entity or person, who shall be named by the sender and who the sender shall state to represent. No liability shall otherwise attach to any other entity or person. ==
Re: [PHP-CVS] cvs: php4(PHP_4_3) /ext/informix ifx.ec php_informix_includes.h
On Thu, 20 Feb 2003, Corne' Cornelius wrote: > nobbieThu Feb 20 07:09:22 2003 EDT > > Modified files: (Branch: PHP_4_3) > /php4/ext/informixifx.ec php_informix_includes.h > Log: > @- Added Input Descriptor Binding to Informix driver. (Corne') erm, you just added new functions to the PHP_4_3 branch, I thought I explained that this was only for bugfixes? Derick -- Stop mad cowboy disease! - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/informix ifx.ec php_informix_includes.h
nobbie Thu Feb 20 07:09:22 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/informix ifx.ec php_informix_includes.h Log: @- Added Input Descriptor Binding to Informix driver. (Corne') - Added Input Descriptor Binding . (php_intifx_init_blob) Added . (php_intifx_init_blob_inmem) Added . (php_intifx_init_blob_infile) Added . (php_intifx_release_blob) Added . (php_intifx2_free_blob) Removed . (php_intifx_create_tmpfile) Removed bid parameter . (php_intifx_alloc_ibind) Added . (php_intifx_preparse) Added . (php_intifx_count_descriptors) Added . (ifx_free_blob) Added as le_idresult resource destructor . (php_intifx_create_blob) Changed: added call to php_intifx_init_blob() and removed blob initilisation in function . (php_intifx_copy_blob) Changed: added call to php_intifx_init_blob() and removed blob initilisation in function . (php_intifx_update_blob) Changed mempy() to use lob_bufsize instead of loc_size Changed filename to be memcpy() instead of creating new file . (PHP ifx_query) Changed: added input descriptor binding . (PHP ifx_prepare) Changed: added input descriptor binding . (PHP ifx_do) Chagned: added input descriptor binding . (PHP ifx_fetch_row) Changed the way blobs are accessed/init'd from Ifx_Result->res_id[] Index: php4/ext/informix/ifx.ec diff -u php4/ext/informix/ifx.ec:1.69.2.5 php4/ext/informix/ifx.ec:1.69.2.6 --- php4/ext/informix/ifx.ec:1.69.2.5 Thu Jan 30 14:30:33 2003 +++ php4/ext/informix/ifx.ecThu Feb 20 07:09:19 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: ifx.ec,v 1.69.2.5 2003/01/30 19:30:33 sniper Exp $ */ +/* $Id: ifx.ec,v 1.69.2.6 2003/02/20 12:09:19 nobbie Exp $ */ /* --- * if you want a function reference : "grep '^\*\*' ifx.ec" will give @@ -67,13 +67,19 @@ static void php_ifx_set_default_link(int id TSRMLS_DC); static long php_intifx_getType(long id, HashTable *list TSRMLS_DC); static long php_intifx_create_blob(long type, long mode, char* param, long len, HashTable *list TSRMLS_DC); +static long php_intifx_init_blob(loc_t *blob, long mode, long new TSRMLS_DC); +static long php_intifx_init_blob_inmem(loc_t *blob, long new TSRMLS_DC); +static long php_intifx_init_blob_infile(loc_t *blob, long new TSRMLS_DC); +static void php_intifx_release_blob(loc_t *blob TSRMLS_DC); static long php_intifx_free_blob(long id, HashTable *list TSRMLS_DC); -static long php_intifx2_free_blob(long id, HashTable *list TSRMLS_DC); static long php_intifx_get_blob(long bid, HashTable *list, char** content TSRMLS_DC); static long php_intifx_update_blob(long bid, char* param, long len, HashTable *list TSRMLS_DC); static loc_t *php_intifx_get_blobloc(long bid, HashTable *list TSRMLS_DC); -static char* php_intifx_create_tmpfile(long bid TSRMLS_DC); +static char* php_intifx_create_tmpfile(TSRMLS_DC); static long php_intifx_copy_blob(long bid, HashTable *list TSRMLS_DC); +static long php_intifx_alloc_ibind(IFX_RES *Ifx_Result, int items TSRMLS_DC); +static long php_intifx_preparse(char *statement TSRMLS_DC); +static long php_intifx_count_descriptors(char *p_statemid TSRMLS_DC); static char* php_intifx_null(TSRMLS_D); static long php_intifx_create_char(char* param, long len, HashTable *list TSRMLS_DC); static long php_intifx_free_char(long id, HashTable *list TSRMLS_DC); @@ -116,7 +122,7 @@ { \ if (ifx_check() < 0) { \ IFXG(sv_sqlcode) = SQLCODE; \ -php_error(E_WARNING, "%s(): Set connection %s fails (%s)", get_active_function_name(TSRMLS_C), ifx, ifx_error(ifx)); \ +php_error_docref(NULL TSRMLS_CC, E_WARNING, "Set connection %s fails +(%s)", ifx, ifx_error(ifx)); \ RETURN_FALSE; \ } \ } @@ -312,6 +318,16 @@ efree(Ifx_Result); } +static void ifx_free_blob(zend_rsrc_list_entry *rsrc TSRMLS_DC) +{ + IFX_IDRES *Ifx_blob = (IFX_IDRES *)rsrc->ptr; + + + php_intifx_release_blob(&Ifx_blob->BLOB.blob_data TSRMLS_C); + + efree(Ifx_blob); +} + PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN("ifx.allow_persistent", "1", PHP_INI_SYSTEM, OnUpdateInt, allow_persistent, zend_ifx_globals, ifx_globals) STD_PHP_INI_ENTRY_EX("ifx.max_persistent", "-1", PHP_INI_SYSTEM, OnUpdateInt, max_persistent, zend_ifx_globals, ifx_globals, display_link_numbers) @@ -342,7 +358,7 @@ REGISTER_INI_ENTRIES(); le_result = zend_register_list_destructors_ex(ifx_free_result,NULL, "informix result",module_number); - le_idresult = zend_register_l
[PHP-CVS] cvs: php4(PHP_4_3) /ext/informix php_informix_includes.h
nobbie Thu Feb 20 06:57:28 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/informix php_informix_includes.h Log: #- Changed sizes of char[] in IFX_RES: connecid, cursorid, descrpid, statemid from 16 to 32 to prevents possible overflow Index: php4/ext/informix/php_informix_includes.h diff -u php4/ext/informix/php_informix_includes.h:1.1.4.1 php4/ext/informix/php_informix_includes.h:1.1.4.2 --- php4/ext/informix/php_informix_includes.h:1.1.4.1 Tue Dec 31 11:34:44 2002 +++ php4/ext/informix/php_informix_includes.h Thu Feb 20 06:57:28 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: php_informix_includes.h,v 1.1.4.1 2002/12/31 16:34:44 sebastian Exp $ */ +/* $Id: php_informix_includes.h,v 1.1.4.2 2003/02/20 11:57:28 nobbie Exp $ */ #ifndef PHP_INFORMIX_INCLUDES_H #define PHP_INFORMIX_INCLUDES_H @@ -37,10 +37,10 @@ /* query result set data */ typedef struct ifx_res { - char connecid[16]; - char cursorid[16]; - char descrpid[16]; - char statemid[16]; + char connecid[32]; + char cursorid[32]; + char descrpid[32]; + char statemid[32]; int isscroll; int ishold; int iscursory; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/com variant.h
phanto Thu Feb 20 06:34:27 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/com variant.h Log: fixing bugs #22295, #22218 and #22162 (duplicates) Index: php4/ext/com/variant.h diff -u php4/ext/com/variant.h:1.4.4.1 php4/ext/com/variant.h:1.4.4.2 --- php4/ext/com/variant.h:1.4.4.1 Tue Jan 28 19:10:01 2003 +++ php4/ext/com/variant.h Thu Feb 20 06:34:26 2003 @@ -12,15 +12,19 @@ #define IS_VARIANT php_VARIANT_get_le_variant() -#define ZVAL_VARIANT(z, v) if (V_VT(v) == VT_DISPATCH) { \ - comval *obj; \ - ALLOC_COM(obj); \ - php_COM_set(obj, &V_DISPATCH(v), TRUE TSRMLS_CC); \ - ZVAL_COM((z), obj); \ - efree(v); \ - } else { \ - php_variant_to_pval((v), (z), codepage TSRMLS_CC); \ - FREE_VARIANT(v); \ +#define ZVAL_VARIANT(z, v) if (V_VT(v) == VT_DISPATCH) { \ + if +(V_DISPATCH(v)) { \ + comval +*obj; \ + +ALLOC_COM(obj); \ + +php_COM_set(obj, &V_DISPATCH(v), TRUE TSRMLS_CC); \ + +ZVAL_COM((z), obj); \ + +efree(v); \ + } else { \ + +ZVAL_NULL(z); \ + } \ + } else { \ + +php_variant_to_pval((v), (z), codepage TSRMLS_CC); \ + +FREE_VARIANT(v); \ } #define RETVAL_VARIANT(v) ZVAL_VARIANT(return_value, (v)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard md5.c
derick Thu Feb 20 05:33:56 2003 EDT Modified files: /php4/ext/standard md5.c Log: - Fixed copy and paste bug Index: php4/ext/standard/md5.c diff -u php4/ext/standard/md5.c:1.32 php4/ext/standard/md5.c:1.33 --- php4/ext/standard/md5.c:1.32Thu Feb 20 05:32:35 2003 +++ php4/ext/standard/md5.c Thu Feb 20 05:33:55 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: md5.c,v 1.32 2003/02/20 10:32:35 derick Exp $ */ +/* $Id: md5.c,v 1.33 2003/02/20 10:33:55 derick Exp $ */ /* * md5.c - Copyright 1997 Lachlan Roche @@ -116,7 +116,7 @@ fclose(fp); if (raw_output) { - RETURN_STRINGL(digest, 20, 1); + RETURN_STRINGL(digest, 16, 1); } else { make_digest(md5str, digest); RETVAL_STRING(md5str, 1); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / NEWS /ext/standard md5.c sha1.c
derick Thu Feb 20 05:32:35 2003 EDT Modified files: /php4 NEWS /php4/ext/standard md5.c sha1.c Log: - Also add the optional raw output parameter to md5_file and sha1_file. Index: php4/NEWS diff -u php4/NEWS:1.1352 php4/NEWS:1.1353 --- php4/NEWS:1.1352Thu Feb 20 02:13:59 2003 +++ php4/NEWS Thu Feb 20 05:32:33 2003 @@ -20,8 +20,9 @@ - Added lightweight streaming input abstraction to the Zend Engine scanners that provides uniform support for include()'ing data from PHP streams across all platforms (Wez, Zend Engine). -- Added optional parameter to sha1() and md5() which makes them return - the digest as binary data. (Michael Bretterklieber <[EMAIL PROTECTED]>, Derick) +- Added optional parameter to sha1(), sha1_file(), md5() and md5_file() which + makes them return the digest as binary data. (Michael Bretterklieber + <[EMAIL PROTECTED]>, Derick) - Added proc_nice() function. Changes priority of the current process. (Ilia) - Added pcntl_getpriority() and pcntl_setpriority() functions. (Ilia) - Added idate(), date_sunrise() and date_sunset() functions. (Moshe Doron) Index: php4/ext/standard/md5.c diff -u php4/ext/standard/md5.c:1.31 php4/ext/standard/md5.c:1.32 --- php4/ext/standard/md5.c:1.31Thu Feb 20 01:56:37 2003 +++ php4/ext/standard/md5.c Thu Feb 20 05:32:35 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: md5.c,v 1.31 2003/02/20 06:56:37 derick Exp $ */ +/* $Id: md5.c,v 1.32 2003/02/20 10:32:35 derick Exp $ */ /* * md5.c - Copyright 1997 Lachlan Roche @@ -69,11 +69,13 @@ } /* }}} */ -/* {{{ proto string md5_file(string filename) +/* {{{ proto string md5_file(string filename [, bool raw_output]) Calculate the md5 hash of given filename */ PHP_NAMED_FUNCTION(php_if_md5_file) { - zval **arg; + char *arg; + int arg_len; + zend_bool raw_output = 0; char md5str[33]; unsigned char buf[1024]; unsigned char digest[16]; @@ -81,21 +83,19 @@ int n; FILE *fp; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &arg, &arg_len, +&raw_output) == FAILURE) { + return; } - convert_to_string_ex(arg); - - if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(arg), NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + if (PG(safe_mode) && (!php_checkuid(arg, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { RETURN_FALSE; } - if (php_check_open_basedir(Z_STRVAL_PP(arg) TSRMLS_CC)) { + if (php_check_open_basedir(arg TSRMLS_CC)) { RETURN_FALSE; } - if ((fp = VCWD_FOPEN(Z_STRVAL_PP(arg), "rb")) == NULL) { + if ((fp = VCWD_FOPEN(arg, "rb")) == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open file"); RETURN_FALSE; } @@ -115,9 +115,12 @@ fclose(fp); - make_digest(md5str, digest); - - RETVAL_STRING(md5str, 1); + if (raw_output) { + RETURN_STRINGL(digest, 20, 1); + } else { + make_digest(md5str, digest); + RETVAL_STRING(md5str, 1); + } } /* }}} */ Index: php4/ext/standard/sha1.c diff -u php4/ext/standard/sha1.c:1.6 php4/ext/standard/sha1.c:1.7 --- php4/ext/standard/sha1.c:1.6Thu Feb 20 01:56:37 2003 +++ php4/ext/standard/sha1.cThu Feb 20 05:32:35 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sha1.c,v 1.6 2003/02/20 06:56:37 derick Exp $ */ +/* $Id: sha1.c,v 1.7 2003/02/20 10:32:35 derick Exp $ */ #include #include "php.h" @@ -67,11 +67,13 @@ /* }}} */ -/* {{{ proto string sha1_file(string filename) +/* {{{ proto string sha1_file(string filename [, bool raw_output]) Calculate the sha1 hash of given filename */ PHP_FUNCTION(sha1_file) { - zval **arg; + char *arg; + int arg_len; + zend_bool raw_output = 0; char sha1str[41]; unsigned char buf[1024]; unsigned char digest[20]; @@ -79,21 +81,19 @@ int n; FILE *fp; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &arg, &arg_len, +&raw_output) == FAILURE) { + return; } - convert_to_string_ex(arg); - - if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(arg), NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + if (PG(safe_mode) && (!php_checkuid(arg, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { RETURN_FALSE; } - if (php_check_open_basedir(Z_STRV
[PHP-CVS] cvs: php4(PHP_4_3) /ext/session session.c
sas Thu Feb 20 03:32:41 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/session session.c Log: merge minor differences from head Index: php4/ext/session/session.c diff -u php4/ext/session/session.c:1.336.2.7 php4/ext/session/session.c:1.336.2.8 --- php4/ext/session/session.c:1.336.2.7Thu Feb 20 01:24:08 2003 +++ php4/ext/session/session.c Thu Feb 20 03:32:41 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: session.c,v 1.336.2.7 2003/02/20 06:24:08 sas Exp $ */ +/* $Id: session.c,v 1.336.2.8 2003/02/20 08:32:41 sas Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1127,10 +1127,7 @@ WRONG_PARAM_COUNT; } - if (array_init(return_value) == FAILURE) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Cannot initialize return value from session_get_cookie_parameters"); - RETURN_FALSE; - } + array_init(return_value); add_assoc_long(return_value, "lifetime", PS(cookie_lifetime)); add_assoc_string(return_value, "path", PS(cookie_path), 1); @@ -1470,7 +1467,7 @@ convert_to_string_ex(str); php_session_decode(Z_STRVAL_PP(str), Z_STRLEN_PP(str) TSRMLS_CC); - + RETURN_TRUE; } /* }}} */ @@ -1622,6 +1619,7 @@ PS(module_number) = module_number; /* if we really need this var we need to init it in zts mode as well! */ + PS(session_status) = php_session_none; REGISTER_INI_ENTRIES(); #ifdef HAVE_LIBMM -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php