]> granicus.if.org Git - php/commitdiff
main/php_compat.h
authorAnantha Kesari H Y <hyanantha@php.net>
Sat, 23 Jul 2005 11:45:28 +0000 (11:45 +0000)
committerAnantha Kesari H Y <hyanantha@php.net>
Sat, 23 Jul 2005 11:45:28 +0000 (11:45 +0000)
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
main/php_compat.h
main/php_open_temporary_file.c
main/reentrancy.c

index 7ee4ee00efc38c2318b6fbb71009ef3651228e70..eaa6317c84c972b2979dad6a40d3a42762ac5943 100644 (file)
@@ -64,11 +64,6 @@ static char sccsid[] = "@(#)merge.c  8.2 (Berkeley) 2/14/94";
 #include <winsock.h> /* Includes definition for u_char */
 #endif
 
-#if defined(NETWARE) && !defined(NEW_LIBC)
-/*#include <ws2nlm.h>*/
-#include <sys/socket.h>
-#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);
 
index 6725c4fdb8fa8b7a3d357081344512115465208a..06e8459f84b7c45ce91bf371c8293a2e55dc2eb2 100644 (file)
@@ -3,8 +3,6 @@
 
 #ifdef PHP_WIN32
 #include "config.w32.h"
-#elif defined(NETWARE)
-#include "config.nw.h"
 #else
 #include <php_config.h>
 #endif
index 523dc8a71be74733426545a20ede817151a0f900..816d9d277816104c2f362ca5055484c4ab5db9c8 100644 (file)
 #include "win32/winutil.h"
 #elif defined(NETWARE)
 #ifdef USE_WINSOCK
-/*#include <ws2nlm.h>*/
 #include <novsock2.h>
 #else
 #include <sys/socket.h>
 #endif
-#ifdef NEW_LIBC
 #include <sys/param.h>
 #else
-#include "netware/param.h"
-#endif
-#include "netware/mktemp.h"
-#else
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -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
index b2a4c8eb60f89621b9fc96b56ec529852172d038..814c287005e0277f91b3dc8b3b2422478b01aa22 100644 (file)
 #include "win32/readdir.h"
 #endif
 
-#if defined(NETWARE) && !(NEW_LIBC)
-/*#include <ws2nlm.h>*/
-#include <sys/socket.h>
-#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)