4.0.4 Win32 compilation issues

From: Date: Wed, 03 Jan 2001 10:51:14 +0000
Subject: 4.0.4 Win32 compilation issues
Groups: php.dev 
Request: Send a blank email to php-dev+get-42791@lists.php.net to get a copy of this message
Hi! I've downloaded the 4.0.4 source from the site, did all the stuff* to get it to compile (with a lot of warnings (see below) about 'inconsistent dll linkage. dllexport assumed' and others, how do I get rid of those without altering the warnings switch?) under WinNT4 using VC6 (with all the default projects), and it all seems to work ok, except for the debug version, which hangs somewhere opening the php.ini-file... here's the code that leads to the error... php_module_startup ... line 877 + 5 bytes php_config_ini_startup ... line 710 + 5 bytes php_init_config ... line 206 + 23 bytes php_fopen_with_path ... line 410 + 20 bytes php_fopen_and_set_opened_path ... line 235 + 11 bytes expand_filepath ... line 519 + 17 bytes --> CWD_API char *virtual_getcwd(char *buf, size_t size) { size_t length; char *cwd; cwd = virtual_getcwd_ex(&length); if (buf == NULL) { return cwd; } if (length > size-1) { free(cwd); errno = ERANGE; /* Is this OK? */ return NULL; } memcpy(buf, cwd, length+1); free(cwd); return buf; } It hangs on the 'free(cwd);' line just before the end, reporting an assertion failure on _BLOCK_TYPE_IS_VALID(pHead->nBlockUse); I can't see anything wrong with the code, and it works OK in the release-version, where there are no assertions for the heap. Anyone got any comments on this to help me get started with actual development? Cheerio, Marc. * I had to modify the lines for the bison parser in the MSVC projects because they complained about the -S option, they now look like: bison -o zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y warnings: Configuration: ZendTS - Win32 Debug_TS: zend_ini_scanner.cpp(737) : warning C4102: 'find_rule' : unreferenced label zend_language_scanner.cpp(5306) : warning C4273: 'isatty' : inconsistent dll linkage. dllexport assumed. Configuration: libmysql - Win32 Debug_TS f:\home\marc\src\php-4.0.4\ext\mysql\libmysql\m_string.h(180) : warning C4273: 'strpbrk' : inconsistent dll linkage. dllexport assumed. f:\home\marc\src\php-4.0.4\ext\mysql\libmysql\m_string.h(183) : warning C4273: 'strstr' : inconsistent dll linkage. dllexport assumed. Configuration: php4dllts - Win32 Debug_TS f:\usr\local\win32build\include\arpa\inet.h(74) : warning C4005: 'FD_SETSIZE' : macro redefinition d:\msvs\vc98\include\winsock.h(46) : see previous definition of 'FD_SETSIZE' f:\usr\local\win32build\include\portability.h(382) : warning C4273: 'getenv' : inconsistent dll linkage. dllexport assumed. f:\usr\local\win32build\include\portability.h(745) : warning C4273: 'strdup' : inconsistent dll linkage. dllexport assumed. f:\home\marc\src\php-4.0.4\ext\standard\url_scanner_ex.c(198) : warning C4018: '<' : signed/unsigned mismatch f:\home\marc\src\php-4.0.4\ext\standard\url_scanner_ex.c(617) : warning C4102: 'yy65' : unreferenced label ... plus lots more with other yyXX labels F:\home\Marc\src\php-4.0.4\ext\calendar\jewish.c(270) : warning C4005: 'SDN_OFFSET' : macro redefinition f:\home\marc\src\php-4.0.4\ext\calendar\gregor.c(0) : see previous definition of 'SDN_OFFSET'

« previous php.dev (#42791) next »