From 2abccacfa5ef35b0cc78f0fd7353788577dbe7f6 Mon Sep 17 00:00:00 2001 From: Anantha Kesari H Y Date: Sat, 23 Jul 2005 11:45:28 +0000 Subject: [PATCH] main/php_compat.h NetWare can make use of Autoconf based build. main/php_open_temporary_file.c NetWare LibC SDK has sys/param.h so removing the redundant NEW_LIBC checks. NetWare LibC has mkstemp implementation main/mergesort.c Removing redundant sys/socket.h includes main/reentrant.c Removing the redundant rentrant time function wrappers of NetWare --Kamesh --- main/mergesort.c | 5 ---- main/php_compat.h | 2 -- main/php_open_temporary_file.c | 16 ----------- main/reentrancy.c | 50 ---------------------------------- 4 files changed, 73 deletions(-) diff --git a/main/mergesort.c b/main/mergesort.c index 7ee4ee00ef..eaa6317c84 100644 --- a/main/mergesort.c +++ b/main/mergesort.c @@ -64,11 +64,6 @@ static char sccsid[] = "@(#)merge.c 8.2 (Berkeley) 2/14/94"; #include /* Includes definition for u_char */ #endif -#if defined(NETWARE) && !defined(NEW_LIBC) -/*#include */ -#include -#endif - static void setup(u_char *list1, u_char *list2, size_t n, size_t size, int (*cmp)(const void *, const void * TSRMLS_DC) TSRMLS_DC); static void insertionsort(u_char *a, size_t n, size_t size, int (*cmp)(const void *, const void * TSRMLS_DC) TSRMLS_DC); diff --git a/main/php_compat.h b/main/php_compat.h index 6725c4fdb8..06e8459f84 100644 --- a/main/php_compat.h +++ b/main/php_compat.h @@ -3,8 +3,6 @@ #ifdef PHP_WIN32 #include "config.w32.h" -#elif defined(NETWARE) -#include "config.nw.h" #else #include #endif diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c index 523dc8a71b..816d9d2778 100644 --- a/main/php_open_temporary_file.c +++ b/main/php_open_temporary_file.c @@ -33,18 +33,12 @@ #include "win32/winutil.h" #elif defined(NETWARE) #ifdef USE_WINSOCK -/*#include */ #include #else #include #endif -#ifdef NEW_LIBC #include #else -#include "netware/param.h" -#endif -#include "netware/mktemp.h" -#else #include #include #include @@ -115,10 +109,6 @@ static int php_do_open_temporary_file(const char *path, const char *pfx, char ** #endif ; #endif -#ifdef NETWARE - char *file_path = NULL; -#endif - if (!path) { return -1; } @@ -144,12 +134,6 @@ static int php_do_open_temporary_file(const char *path, const char *pfx, char ** VCWD_CHMOD(opened_path, 0600); fd = VCWD_OPEN_MODE(opened_path, open_flags, 0600); } -#elif defined(NETWARE) - /* Using standard mktemp() implementation for NetWare */ - file_path = mktemp(opened_path); - if (file_path) { - fd = VCWD_OPEN(file_path, open_flags); - } #elif defined(HAVE_MKSTEMP) fd = mkstemp(opened_path); #else diff --git a/main/reentrancy.c b/main/reentrancy.c index b2a4c8eb60..814c287005 100644 --- a/main/reentrancy.c +++ b/main/reentrancy.c @@ -28,11 +28,6 @@ #include "win32/readdir.h" #endif -#if defined(NETWARE) && !(NEW_LIBC) -/*#include */ -#include -#endif - #include "php_reentrancy.h" #include "ext/standard/php_rand.h" /* for PHP_RAND_MAX */ @@ -119,51 +114,6 @@ PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm) #endif -#if defined(NETWARE) -/* - Re-entrant versions of functions seem to be better for loading NLMs in different address space. - Since we have them now in LibC, we might as well make use of them. -*/ - -#define HAVE_LOCALTIME_R 1 -#define HAVE_CTIME_R 1 -#define HAVE_ASCTIME_R 1 -#define HAVE_GMTIME_R 1 - -PHPAPI struct tm *php_localtime_r(const time_t *const timep, struct tm *p_tm) -{ - /* Modified according to LibC definition */ - if (localtime_r(timep, p_tm) != NULL) - return (p_tm); - return (NULL); -} - -PHPAPI char *php_ctime_r(const time_t *clock, char *buf) -{ - /* Modified according to LibC definition */ - if (ctime_r(clock, buf) != NULL) - return (buf); - return (NULL); -} - -PHPAPI char *php_asctime_r(const struct tm *tm, char *buf) -{ - /* Modified according to LibC definition */ - if (asctime_r(tm, buf) != NULL) - return (buf); - return (NULL); -} - -PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm) -{ - /* Modified according to LibC definition */ - if (gmtime_r(timep, p_tm) != NULL) - return (p_tm); - return (NULL); -} - -#endif /* NETWARE */ - #if defined(__BEOS__) PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm) -- 2.50.1