Re: [PHP-CVS] cvs: php4 / TODO /ext/bz2 bz2.c /ext/sockets sockets.c
At 23:15 01.12.2002, Sterling Hughes wrote: sterlingSun Dec 1 17:15:41 2002 EDT Modified files: /php4 TODO /php4/ext/bz2 bz2.c /php4/ext/sockets sockets.c Log: TODO: Cleanup elements that have happened, or most likely won't happen. There is probably more that should be gone, but its still a move in the right direction. Other stuff is ws/formatting changes Index: php4/TODO diff -u php4/TODO:1.136 php4/TODO:1.137 --- php4/TODO:1.136 Wed Nov 13 04:11:19 2002 +++ php4/TODO Sun Dec 1 17:15:37 2002 @@ -3,9 +3,7 @@ Zend (...) -* Change PHP error messages, so that they point to pages or sections - in the PHP Manual. That is not only for all messages yet. See sockets.c in your commit down below. -* Activate all extensions by default that don't rely on external - dependencies. (eg ftp) (DONE?) So have we decided on that now? (...) Index: php4/ext/bz2/bz2.c diff -u php4/ext/bz2/bz2.c:1.61 php4/ext/bz2/bz2.c:1.62 --- php4/ext/bz2/bz2.c:1.61 Sat Oct 5 12:26:57 2002 +++ php4/ext/bz2/bz2.c Sun Dec 1 17:15:38 2002 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: bz2.c,v 1.61 2002/10/05 16:26:57 wez Exp $ */ +/* $Id: bz2.c,v 1.62 2002/12/01 22:15:38 sterling Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -538,6 +538,6 @@ * tab-width: 4 * c-basic-offset: 4 * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim600: noet sw=4 ts=4 + * vim600: fdm=marker + * vim: noet sw=4 ts=4 */ Index: php4/ext/sockets/sockets.c diff -u php4/ext/sockets/sockets.c:1.125 php4/ext/sockets/sockets.c:1.126 --- php4/ext/sockets/sockets.c:1.125Sun Oct 27 22:05:04 2002 +++ php4/ext/sockets/sockets.c Sun Dec 1 17:15:39 2002 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: sockets.c,v 1.125 2002/10/28 03:05:04 sterling Exp $ */ +/* $Id: sockets.c,v 1.126 2002/12/01 22:15:39 sterling Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -797,7 +797,7 @@ } tmpbuf = erealloc(tmpbuf, retval + 1); - tmpbuf[ retval ] = '\0' ; + tmpbuf[retval] = '\0' ; RETURN_STRINGL(tmpbuf, retval, 0); } @@ -1069,7 +1069,8 @@ } default: - php_error(E_WARNING, %s() unsupported socket type '%d', must be AF_UNIX or AF_INET, get_active_function_name(TSRMLS_C), php_sock-type); + php_error(E_WARNING, %s() unsupported socket type '%d', must be AF_UNIX or AF_INET, + get_active_function_name(TSRMLS_C), php_sock-type); RETURN_FALSE; } @@ -2025,6 +2026,6 @@ * tab-width: 4 * c-basic-offset: 4 * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim600: noet sw=4 ts=4 + * vim600: fdm=marker + * vim: noet sw=4 ts=4 */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/mbstring mbstring.dsp mbstring.h php mbregex.c=php unicode.c php unicode.h
Hi, First off all the way HAVE_MBSTRING and other static defines was defined in the project conflicted with the definitions in config.w32.h. Then when I fixed this I hade to move arround some include statements in order to make sure all defines was set before compiling each file. With all the defines in place I get thse 5 errors from the linker php_mbregex.obj : error LNK2001: unresolved external symbol _mbre_free_pattern php_mbregex.obj : error LNK2001: unresolved external symbol _mbre_free_registers php_mbregex.obj : error LNK2001: unresolved external symbol _mbre_search php_mbregex.obj : error LNK2001: unresolved external symbol _mbre_compile_pattern php_mbregex.obj : error LNK2001: unresolved external symbol _mbre_match These 5 functions are not defined anywhere in the php source three (they are all specified as extern) so I guess I have to disable the MBREGEX in order to compile until these functions are defined. If you can point me to where I can find these functions I'll be happy to implement them. - Frank What was going wrong with your build? And you don't have to have mbregex disabled here, It's made to be enabled by default with --enable-mbstring specified also. Please revert this. Moriyoshi Frank M. Kromann [EMAIL PROTECTED] wrote: fmk Mon Dec 2 13:19:18 2002 EDT Modified files: /php4/ext/mbstring mbstring.dsp mbstring.h php_mbregex.c php_unicode.c php_unicode.h Log: Fixing build on WIn32 MBREGEX is disabled for now. 5 mbre_* functions are undefined on WIn32 Index: php4/ext/mbstring/mbstring.dsp diff -u php4/ext/mbstring/mbstring.dsp:1.14 php4/ext/mbstring/mbstring.dsp:1.15 --- php4/ext/mbstring/mbstring.dsp:1.14 Sat Nov 23 17:59:24 2002 +++ php4/ext/mbstring/mbstring.dsp Mon Dec 2 13:19:17 2002 @@ -43,7 +43,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir # ADD BASE CPP /nologo /MD /W3 /GX /O2 /D WIN32 /D NDEBUG /D _WINDOWS /D _MBCS /D _USRDLL /D MBSTRING_EXPORTS /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I ..\.. /I ..\..\main /I ..\..\Zend /I ..\..\TSRM /D ZEND_DEBUG=0 /D _MBCS /D _USRDLL /D WIN32 /D NDEBUG /D _WINDOWS /D COMPILE_DL_MBSTRING /D ZTS=1 /D ZEND_WIN32 /D PHP_WIN32 /D MBSTRING_EXPORTS=1 /D HAVE_MBSTRING=1 /D HAVE_MBREGEX=1 /D HAVE_MBSTR_CN=1 /D HAVE_MBSTR_JA=1 /D HAVE_MBSTR_KR=1 /D HAVE_MBSTR_RU=1 /D HAVE_MBSTR_TW=1 /FR /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I ..\.. /I ..\..\main /I ..\..\Zend /I ..\..\TSRM /D ZEND_DEBUG=0 /D _MBCS /D _USRDLL /D WIN32 /D NDEBUG /D _WINDOWS /D COMPILE_DL_MBSTRING /D ZTS=1 /D ZEND_WIN32 /D PHP_WIN32 /D MBSTRING_EXPORTS=1 /FR /YX /FD /c # ADD BASE MTL /nologo /D NDEBUG /mktyplib203 /win32 # ADD MTL /nologo /D NDEBUG /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d NDEBUG @@ -69,7 +69,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D WIN32 /D _DEBUG /D _WINDOWS /D _MBCS /D _USRDLL /D MBSTRING_EXPORTS /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ..\.. /I ..\..\main /I ..\..\Zend /I ..\..\TSRM /D ZEND_DEBUG=1 /D MBSTRING_EXPORTS /D WIN32 /D NDEBUG /D _WINDOWS /D COMPILE_DL_MBSTRING /D ZTS=1 /D ZEND_WIN32 /D PHP_WIN32 /D MBSTRING_EXPORTS=1 /D HAVE_MBSTRING=1 /D HAVE_MBREGEX=1 /D HAVE_MBSTR_CN=1 /D HAVE_MBSTR_JA=1 /D HAVE_MBSTR_KR=1 /D HAVE_MBSTR_RU=1 /D HAVE_MBSTR_TW=1 /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ..\.. /I ..\..\main /I ..\..\Zend /I ..\..\TSRM /D ZEND_DEBUG=1 /D MBSTRING_EXPORTS /D WIN32 /D NDEBUG /D _WINDOWS /D COMPILE_DL_MBSTRING /D ZTS=1 /D ZEND_WIN32 /D PHP_WIN32 /D MBSTRING_EXPORTS=1 /YX /FD /GZ /c # ADD BASE MTL /nologo /D _DEBUG /mktyplib203 /win32 # ADD MTL /nologo /D _DEBUG /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d _DEBUG Index: php4/ext/mbstring/mbstring.h diff -u php4/ext/mbstring/mbstring.h:1.45 php4/ext/mbstring/mbstring.h:1.46 --- php4/ext/mbstring/mbstring.h:1.45 Sat Nov 23 15:14:33 2002 +++ php4/ext/mbstring/mbstring.hMon Dec 2 13:19:17 2002 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: mbstring.h,v 1.45 2002/11/23 20:14:33 moriyoshi Exp $ */ +/* $Id: mbstring.h,v 1.46 2002/12/02 18:19:17 fmk Exp $ */ /* * PHP4 Multibyte String module mbstring (currently only for Japanese) @@ -49,6 +49,20 @@ #ifdef COMPILE_DL_MBSTRING #undef HAVE_MBSTRING #define HAVE_MBSTRING 1 +#ifdef PHP_WIN32 +# undef HAVE_MBREGEX +# define HAVE_MBREGEX 0 +# undef HAVE_MBSTR_CN +# define HAVE_MBSTR_CN 1 +# undef HAVE_MBSTR_JA +# define HAVE_MBSTR_JA 1 +# undef HAVE_MBSTR_KR +# define HAVE_MBSTR_KR 1 +# undef HAVE_MBSTR_RU +# define HAVE_MBSTR_RU 1 +# undef HAVE_MBSTR_TW +# define HAVE_MBSTR_TW 1 +#endif #endif #ifdef PHP_WIN32 Index: php4/ext/mbstring/php_mbregex.c diff -u php4/ext/mbstring/php_mbregex.c:1.23
[PHP-CVS] cvs: php4 /ext/mbstring mbregex.c mbstring.h
fmk Mon Dec 2 14:18:23 2002 EDT Modified files: /php4/ext/mbstring mbregex.c mbstring.h Log: Fixing the Win32 compilation of mbstring with mbregex enabled. Index: php4/ext/mbstring/mbregex.c diff -u php4/ext/mbstring/mbregex.c:1.16 php4/ext/mbstring/mbregex.c:1.17 --- php4/ext/mbstring/mbregex.c:1.16Tue Nov 12 12:41:26 2002 +++ php4/ext/mbstring/mbregex.c Mon Dec 2 14:18:23 2002 @@ -22,6 +22,7 @@ /* UTF-8 extension added Jan 16 1999 by Yoshida Masato [EMAIL PROTECTED] */ #include php.h +#include mbstring.h #if HAVE_MBREGEX Index: php4/ext/mbstring/mbstring.h diff -u php4/ext/mbstring/mbstring.h:1.46 php4/ext/mbstring/mbstring.h:1.47 --- php4/ext/mbstring/mbstring.h:1.46 Mon Dec 2 13:19:17 2002 +++ php4/ext/mbstring/mbstring.hMon Dec 2 14:18:23 2002 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: mbstring.h,v 1.46 2002/12/02 18:19:17 fmk Exp $ */ +/* $Id: mbstring.h,v 1.47 2002/12/02 19:18:23 fmk Exp $ */ /* * PHP4 Multibyte String module mbstring (currently only for Japanese) @@ -51,7 +51,7 @@ #define HAVE_MBSTRING 1 #ifdef PHP_WIN32 # undef HAVE_MBREGEX -# define HAVE_MBREGEX 0 +# define HAVE_MBREGEX 1 # undef HAVE_MBSTR_CN # define HAVE_MBSTR_CN 1 # undef HAVE_MBSTR_JA -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /main config.w32.h.in
moriyoshi Mon Dec 2 15:12:00 2002 EDT Modified files: /php4/main config.w32.h.in Log: Reverted wrong part of the commit made in 1.24 Index: php4/main/config.w32.h.in diff -u php4/main/config.w32.h.in:1.24 php4/main/config.w32.h.in:1.25 --- php4/main/config.w32.h.in:1.24 Sun Dec 1 16:37:13 2002 +++ php4/main/config.w32.h.in Mon Dec 2 15:11:59 2002 @@ -2,7 +2,7 @@ Build Configuration for Win32. This has only been tested with MS VisualC++ 6 (and later). - $Id: config.w32.h.in,v 1.24 2002/12/01 21:37:13 shane Exp $ + $Id: config.w32.h.in,v 1.25 2002/12/02 20:11:59 moriyoshi Exp $ */ /* Default PHP / PEAR directories */ @@ -42,13 +42,13 @@ #define HAVE_FTP 1 /* Enable / Disable MBSTRING extension (default: disabled) */ -#define HAVE_MBSTRING 0 -#define HAVE_MBREGEX 0 -#define HAVE_MBSTR_CN 0 -#define HAVE_MBSTR_JA 0 -#define HAVE_MBSTR_KR 0 -#define HAVE_MBSTR_RU 0 -#define HAVE_MBSTR_TW 0 +/* #define HAVE_MBSTRING 0 */ +/* #define HAVE_MBREGEX 0 */ +/* #define HAVE_MBSTR_CN 0 */ +/* #define HAVE_MBSTR_JA 0 */ +/* #define HAVE_MBSTR_KR 0 */ +/* #define HAVE_MBSTR_RU 0 */ +/* #define HAVE_MBSTR_TW 0 */ /* Enable / Disable MySQL extension (default: enabled) */ #define HAVE_MYSQL 1 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mbstring mbregex.c mbstring.dsp mbstring.h php_mbregex.c php_unicode.c php_unicode.h
moriyoshi Mon Dec 2 16:10:38 2002 EDT Modified files: /php4/ext/mbstring mbregex.c mbstring.dsp mbstring.h php_mbregex.c php_unicode.c php_unicode.h Log: Reverted the changes because the problem was elsewhere. Index: php4/ext/mbstring/mbregex.c diff -u php4/ext/mbstring/mbregex.c:1.17 php4/ext/mbstring/mbregex.c:1.18 --- php4/ext/mbstring/mbregex.c:1.17Mon Dec 2 14:18:23 2002 +++ php4/ext/mbstring/mbregex.c Mon Dec 2 16:10:37 2002 @@ -22,7 +22,6 @@ /* UTF-8 extension added Jan 16 1999 by Yoshida Masato [EMAIL PROTECTED] */ #include php.h -#include mbstring.h #if HAVE_MBREGEX Index: php4/ext/mbstring/mbstring.dsp diff -u php4/ext/mbstring/mbstring.dsp:1.15 php4/ext/mbstring/mbstring.dsp:1.16 --- php4/ext/mbstring/mbstring.dsp:1.15 Mon Dec 2 13:19:17 2002 +++ php4/ext/mbstring/mbstring.dsp Mon Dec 2 16:10:37 2002 @@ -43,7 +43,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir # ADD BASE CPP /nologo /MD /W3 /GX /O2 /D WIN32 /D NDEBUG /D _WINDOWS /D _MBCS /D _USRDLL /D MBSTRING_EXPORTS /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I ..\.. /I ..\..\main /I ..\..\Zend /I ..\..\TSRM /D ZEND_DEBUG=0 /D _MBCS /D _USRDLL /D WIN32 /D NDEBUG /D _WINDOWS /D COMPILE_DL_MBSTRING /D ZTS=1 /D ZEND_WIN32 /D PHP_WIN32 /D MBSTRING_EXPORTS=1 /FR /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I ..\.. /I ..\..\main /I ..\..\Zend /I +..\..\TSRM /D ZEND_DEBUG=0 /D _MBCS /D _USRDLL /D WIN32 /D NDEBUG /D +_WINDOWS /D COMPILE_DL_MBSTRING /D ZTS=1 /D ZEND_WIN32 /D PHP_WIN32 /D +MBSTRING_EXPORTS=1 /D HAVE_MBSTRING=1 /D HAVE_MBREGEX=1 /D HAVE_MBSTR_CN=1 /D +HAVE_MBSTR_JA=1 /D HAVE_MBSTR_KR=1 /D HAVE_MBSTR_RU=1 /D HAVE_MBSTR_TW=1 /FR /YX /FD +/c # ADD BASE MTL /nologo /D NDEBUG /mktyplib203 /win32 # ADD MTL /nologo /D NDEBUG /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d NDEBUG @@ -69,7 +69,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D WIN32 /D _DEBUG /D _WINDOWS /D _MBCS /D _USRDLL /D MBSTRING_EXPORTS /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ..\.. /I ..\..\main /I ..\..\Zend /I ..\..\TSRM /D ZEND_DEBUG=1 /D MBSTRING_EXPORTS /D WIN32 /D NDEBUG /D _WINDOWS /D COMPILE_DL_MBSTRING /D ZTS=1 /D ZEND_WIN32 /D PHP_WIN32 /D MBSTRING_EXPORTS=1 /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ..\.. /I ..\..\main /I ..\..\Zend +/I ..\..\TSRM /D ZEND_DEBUG=1 /D MBSTRING_EXPORTS /D WIN32 /D NDEBUG /D +_WINDOWS /D COMPILE_DL_MBSTRING /D ZTS=1 /D ZEND_WIN32 /D PHP_WIN32 /D +MBSTRING_EXPORTS=1 /D HAVE_MBSTRING=1 /D HAVE_MBREGEX=1 /D HAVE_MBSTR_CN=1 /D +HAVE_MBSTR_JA=1 /D HAVE_MBSTR_KR=1 /D HAVE_MBSTR_RU=1 /D HAVE_MBSTR_TW=1 /YX /FD /GZ +/c # ADD BASE MTL /nologo /D _DEBUG /mktyplib203 /win32 # ADD MTL /nologo /D _DEBUG /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d _DEBUG Index: php4/ext/mbstring/mbstring.h diff -u php4/ext/mbstring/mbstring.h:1.47 php4/ext/mbstring/mbstring.h:1.48 --- php4/ext/mbstring/mbstring.h:1.47 Mon Dec 2 14:18:23 2002 +++ php4/ext/mbstring/mbstring.hMon Dec 2 16:10:37 2002 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: mbstring.h,v 1.47 2002/12/02 19:18:23 fmk Exp $ */ +/* $Id: mbstring.h,v 1.48 2002/12/02 21:10:37 moriyoshi Exp $ */ /* * PHP4 Multibyte String module mbstring (currently only for Japanese) @@ -49,20 +49,6 @@ #ifdef COMPILE_DL_MBSTRING #undef HAVE_MBSTRING #define HAVE_MBSTRING 1 -#ifdef PHP_WIN32 -# undef HAVE_MBREGEX -# define HAVE_MBREGEX 1 -# undef HAVE_MBSTR_CN -# define HAVE_MBSTR_CN 1 -# undef HAVE_MBSTR_JA -# define HAVE_MBSTR_JA 1 -# undef HAVE_MBSTR_KR -# define HAVE_MBSTR_KR 1 -# undef HAVE_MBSTR_RU -# define HAVE_MBSTR_RU 1 -# undef HAVE_MBSTR_TW -# define HAVE_MBSTR_TW 1 -#endif #endif #ifdef PHP_WIN32 Index: php4/ext/mbstring/php_mbregex.c diff -u php4/ext/mbstring/php_mbregex.c:1.24 php4/ext/mbstring/php_mbregex.c:1.25 --- php4/ext/mbstring/php_mbregex.c:1.24Mon Dec 2 13:19:17 2002 +++ php4/ext/mbstring/php_mbregex.c Mon Dec 2 16:10:37 2002 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mbregex.c,v 1.24 2002/12/02 18:19:17 fmk Exp $ */ +/* $Id: php_mbregex.c,v 1.25 2002/12/02 21:10:37 moriyoshi Exp $ */ #ifdef HAVE_CONFIG_H @@ -25,9 +25,9 @@ #include php.h #include php_ini.h -#include mbstring.h -#include mbregex.h #include php_mbregex.h +#include mbregex.h +#include mbstring.h #if HAVE_MBREGEX Index: php4/ext/mbstring/php_unicode.c diff -u php4/ext/mbstring/php_unicode.c:1.6 php4/ext/mbstring/php_unicode.c:1.7 --- php4/ext/mbstring/php_unicode.c:1.6 Mon Dec 2 13:19:17 2002 +++ php4/ext/mbstring/php_unicode.c Mon Dec 2 16:10:37 2002 @@ -36,7 +36,6 @@ #include php.h #include php_ini.h -#include mbstring.h #if HAVE_MBSTRING Index: php4/ext/mbstring/php_unicode.h diff -u
[PHP-CVS] cvs: php4(PHP_4_3) /ext/sockets php_sockets_win.c
jason Tue Dec 3 00:46:53 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/sockets php_sockets_win.c Log: MFH Index: php4/ext/sockets/php_sockets_win.c diff -u php4/ext/sockets/php_sockets_win.c:1.5 php4/ext/sockets/php_sockets_win.c:1.5.4.1 --- php4/ext/sockets/php_sockets_win.c:1.5 Sat Jun 15 12:04:59 2002 +++ php4/ext/sockets/php_sockets_win.c Tue Dec 3 00:46:53 2002 @@ -44,7 +44,7 @@ } retval = recv(sock, buffer, bytes, 0); - SleepEx(1, TRUE); + if(retval 0) { efree(buffer); return retval; @@ -175,4 +175,4 @@ va_end(va); return retval; } -#endif \ No newline at end of file +#endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mssql php_mssql.c
fmk Tue Dec 3 00:56:39 2002 EDT Modified files: /php4/ext/mssql php_mssql.c Log: Allocating enough memory to hold values. Fix crash when certan stored procedures was called. This caused the free_result function to free memory not yet allocated. Index: php4/ext/mssql/php_mssql.c diff -u php4/ext/mssql/php_mssql.c:1.86 php4/ext/mssql/php_mssql.c:1.87 --- php4/ext/mssql/php_mssql.c:1.86 Mon Oct 28 15:16:24 2002 +++ php4/ext/mssql/php_mssql.c Tue Dec 3 00:56:39 2002 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mssql.c,v 1.86 2002/10/28 20:16:24 sterling Exp $ */ +/* $Id: php_mssql.c,v 1.87 2002/12/03 05:56:39 fmk Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -376,7 +376,7 @@ case 0: /* defaults */ host=user=passwd=NULL; hashed_details_length=5+3; - hashed_details = (char *) emalloc(hashed_details_length); + hashed_details = (char *) emalloc(hashed_details_length+1); strcpy(hashed_details,mssql___); break; case 1: { @@ -389,7 +389,7 @@ host = Z_STRVAL_PP(yyhost); user=passwd=NULL; hashed_details_length = Z_STRLEN_PP(yyhost)+5+3; - hashed_details = (char *) emalloc(hashed_details_length); + hashed_details = (char *) +emalloc(hashed_details_length+1); sprintf(hashed_details,mssql_%s__,Z_STRVAL_PP(yyhost)); } break; @@ -405,7 +405,7 @@ user = Z_STRVAL_PP(yyuser); passwd=NULL; hashed_details_length = Z_STRLEN_PP(yyhost)+Z_STRLEN_PP(yyuser)+5+3; - hashed_details = (char *) emalloc(hashed_details_length); + hashed_details = (char *) +emalloc(hashed_details_length+1); sprintf(hashed_details,mssql_%s_%s_,Z_STRVAL_PP(yyhost),Z_STRVAL_PP(yyuser)); } break; @@ -422,7 +422,7 @@ user = Z_STRVAL_PP(yyuser); passwd = Z_STRVAL_PP(yypasswd); hashed_details_length = Z_STRLEN_PP(yyhost)+Z_STRLEN_PP(yyuser)+Z_STRLEN_PP(yypasswd)+5+3; - hashed_details = (char *) emalloc(hashed_details_length); + hashed_details = (char *) +emalloc(hashed_details_length+1); sprintf(hashed_details,mssql_%s_%s_%s,Z_STRVAL_PP(yyhost),Z_STRVAL_PP(yyuser),Z_STRVAL_PP(yypasswd)); /* SAFE */ } break; @@ -796,7 +796,7 @@ unsigned char *res_buf; int res_length = dbdatlen(mssql_ptr-link, offset); - res_buf = (unsigned char *) emalloc(res_length); + res_buf = (unsigned char *) emalloc(res_length+1); bin = ((DBBINARY *)dbdata(mssql_ptr-link, offset)); memcpy(res_buf,bin,res_length); res_buf[res_length] = '\0'; @@ -817,13 +817,13 @@ if (column_type == SQLDATETIM4) res_length += 14; if (column_type == SQLDATETIME) res_length += 10; - res_buf = (unsigned char *) emalloc(res_length); + res_buf = (unsigned char *) +emalloc(res_length+1); res_length = dbconvert(NULL,coltype(offset),dbdata(mssql_ptr-link,offset), res_length, SQLCHAR,res_buf,-1); } else { dbdatecrack(mssql_ptr-link, dateinfo, (DBDATETIME *) dbdata(mssql_ptr-link,offset)); res_length = 19; - res_buf = (unsigned char *) emalloc(res_length); + res_buf = (unsigned char *) +emalloc(res_length+1); sprintf(res_buf, %d-%02d-%02d %02d:%02d:%02d , dateinfo.year, dateinfo.month, dateinfo.day, dateinfo.hour, dateinfo.minute, dateinfo.second); } @@ -852,7 +852,7 @@ unsigned char *res_buf; int res_length = dbdatlen(mssql_ptr-link, offset); - res_buf = (unsigned char *) emalloc(res_length); + res_buf = (unsigned char *) emalloc(res_length+1);