From: Anantha Kesari H Y Date: Mon, 25 Jul 2005 13:08:32 +0000 (+0000) Subject: ext/standard/dl.c X-Git-Tag: php-4.4.1RC1~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a29f16dc23100a2ef868341849d134f7a2acd8b0;p=php ext/standard/dl.c NetWare LibC dlsym works perfectly only thing that each of the extension need to export a symbol with FULL capital prefix. ext/standard/fsock.h Removing redundant inclusion of headers for NetWare ext/standard/lcg.c NetWare LibC SDK sys/time.h implicitly includes sys/timval.h so nothing special needed for NetWare here. ext/standard/link.c NetWare LibC SDK has pwd.h. ext/standard/microtime.c Removing redundant NEW_LIBC checks and nothing special about NetWare here. including sys/time.h will do the needful. --Kamesh --- diff --git a/ext/standard/dl.c b/ext/standard/dl.c index 07352e35a3..293b1e2003 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -143,7 +143,6 @@ void php_dl(pval *file, int type, pval *return_value TSRMLS_DC) efree(libpath); -#ifndef NETWARE get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, "get_module"); /* @@ -154,23 +153,6 @@ void php_dl(pval *file, int type, pval *return_value TSRMLS_DC) if (!get_module) get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, "_get_module"); -#else - /* NetWare doesn't support two NLMs exporting same symbol */ - { - char symbol_name[64] = "\0"; - int module_name_length = Z_STRLEN_P(file) - 4; /* '.nlm' is 4 characters; knock it off */ - - /* Take the module name (e.g.: 'php_ldap') and append '@get_module' to it */ - strncpy(symbol_name, Z_STRVAL_P(file), module_name_length); - symbol_name[module_name_length] = '\0'; - strcat(symbol_name, "@"); - strcat(symbol_name, "get_module"); - - get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, symbol_name); - } - /* NetWare doesn't prepend '_' to symbol names; so the corresponding portion of code is also - not required for NetWare */ -#endif if (!get_module) { DL_UNLOAD(handle); diff --git a/ext/standard/fsock.h b/ext/standard/fsock.h index 966fc1ecec..00d0df6639 100644 --- a/ext/standard/fsock.h +++ b/ext/standard/fsock.h @@ -25,14 +25,6 @@ #ifndef FSOCK_H #define FSOCK_H -#ifdef NETWARE -#ifdef NEW_LIBC -#include "sys/timeval.h" -#else -#include "netware/time_nw.h" /* For 'timeval' */ -#endif -#endif - #include "file.h" #include "php_network.h" diff --git a/ext/standard/lcg.c b/ext/standard/lcg.c index 2d9f5ba82c..215954644f 100644 --- a/ext/standard/lcg.c +++ b/ext/standard/lcg.c @@ -27,8 +27,6 @@ #ifdef PHP_WIN32 #include "win32/time.h" -#elif defined(NETWARE) -#include #else #include #endif diff --git a/ext/standard/link.c b/ext/standard/link.c index 5dde068b67..cb6ef2a7c0 100644 --- a/ext/standard/link.c +++ b/ext/standard/link.c @@ -33,8 +33,6 @@ #if HAVE_PWD_H #ifdef PHP_WIN32 #include "win32/pwd.h" -#elif defined(NETWARE) -#include "netware/pwd.h" #else #include #endif @@ -91,11 +89,7 @@ PHP_FUNCTION(readlink) PHP_FUNCTION(linkinfo) { zval **filename; -#if defined(NETWARE) && defined(CLIB_STAT_PATCH) - struct stat_libc sb; -#else struct stat sb; -#endif int ret; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) { diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c index 46f5babf79..7ee73a8439 100644 --- a/ext/standard/microtime.c +++ b/ext/standard/microtime.c @@ -25,12 +25,6 @@ #endif #ifdef PHP_WIN32 #include "win32/time.h" -#elif defined(NETWARE) -#ifdef NEW_LIBC -#include -#else -#include "netware/time_nw.h" -#endif #else #include #endif