Anyone see the logical problem with this besides me?

#ifdef ZTS
static void file_globals_ctor(FLS_D) <--- THIS is defined if thread safe
        zend_hash_init(&FG(ht_fsock_keys), 0, NULL, NULL, 1);
        zend_hash_init(&FG(ht_fsock_socks), 0, NULL, (void (*)(void
*))php_msock_destroy, 1);
        FG(def_chunk_size) = PHP_FSOCK_CHUNK_SIZE;
        FG(phpsockbuf) = NULL;
        FG(fgetss_state) = 0;
        FG(pclose_ret) = 0;
static void file_globals_dtor(FLS_D)
        php_cleanup_sockbuf(1 FLS_CC);

        le_fopen = zend_register_list_destructors_ex(_file_fopen_dtor, NULL,
"file", module_number);
        le_popen = zend_register_list_destructors_ex(_file_popen_dtor, NULL,
"pipe", module_number);
        le_socket = zend_register_list_destructors_ex(_file_socket_dtor,
NULL, "socket", module_number);

#ifdef ZTS
        file_globals_id = ts_allocate_id(sizeof(php_file_globals),
(ts_allocate_ctor) file_globals_ctor, (ts_allocate_dtor) file_gl$
        file_globals_ctor(FLS_C); <--- BUT is called when not thread safe
(i.e. its not defined...

Errors happening:

.libs/libphp4.a(file.o): In function `php_minit_file':
/usr/cvs/php4/ext/standard/file.c:179: undefined reference to
.libs/libphp4.a(fsock.o): In function `php_mshutdown_fsock':
/usr/cvs/php4/ext/standard/fsock.c:726: undefined reference to
collect2: ld returned 1 exit status

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to