]> granicus.if.org Git - php/commitdiff
NetWare related changes/modifications
authorAnantha Kesari H Y <hyanantha@php.net>
Mon, 9 Sep 2002 12:03:36 +0000 (12:03 +0000)
committerAnantha Kesari H Y <hyanantha@php.net>
Mon, 9 Sep 2002 12:03:36 +0000 (12:03 +0000)
main/php_open_temporary_file.c
main/php_syslog.h

index 8ceb4be3062907409803919682e241965270bd47..9911a6923343e9abb0982a77766565fcc61ed006 100644 (file)
 #define O_RDONLY _O_RDONLY
 #include "win32/param.h"
 #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>
@@ -95,6 +108,9 @@ static FILE *php_do_open_temporary_file(const char *path, const char *pfx, char
 #ifndef PHP_WIN32
        int fd;
 #endif
+#ifdef NETWARE
+    char *file_path = NULL;
+#endif
 
        if (!path) {
                return NULL;
@@ -118,6 +134,14 @@ static FILE *php_do_open_temporary_file(const char *path, const char *pfx, char
        } else {
                fp = NULL;
        }
+#elif defined(NETWARE)
+       /* Using standard mktemp() implementation for NetWare */
+       file_path = mktemp(opened_path);
+       if (file_path) {
+               fp = VCWD_FOPEN(file_path, "wb");
+       } else {
+               fp = NULL;
+       }
 #elif defined(HAVE_MKSTEMP)
        fd = mkstemp(opened_path);
        if (fd==-1) {
index 279da71c9207a0640124fe453b411408fd473546..92b09800fb038e797087fb2f2995ea6b0a99ab48 100644 (file)
@@ -3,6 +3,11 @@
 
 #ifdef PHP_WIN32
 #include "win32/syslog.h"
+#elif defined(NETWARE)
+# include "config.nw.h"
+#ifdef HAVE_SYSLOG_H
+#include <syslog.h>
+#endif
 #else
 #include "php_config.h"
 #ifdef HAVE_SYSLOG_H