cvs: php4 /main php_open_temporary_file.c
| From: | Anantha Kesari H Y | Date: | Mon, 09 Sep 2002 12:01:25 +0000 |
| Subject: | cvs: php4 /main php_open_temporary_file.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-13971@lists.php.net to get a copy of this message | ||
hyanantha Mon Sep 9 08:01:25 2002 EDT
Modified files:
/php4/main php_open_temporary_file.c
Log:
NetWare related changes/modifications
Index: php4/main/php_open_temporary_file.c
diff -u php4/main/php_open_temporary_file.c:1.17 php4/main/php_open_temporary_file.c:1.18
--- php4/main/php_open_temporary_file.c:1.17 Thu May 9 18:03:19 2002
+++ php4/main/php_open_temporary_file.c Mon Sep 9 08:01:21 2002
@@ -29,6 +29,19 @@
#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 @@
#ifndef PHP_WIN32
int fd;
#endif
+#ifdef NETWARE
+ char *file_path = NULL;
+#endif
if (!path) {
return NULL;
@@ -115,6 +131,14 @@
#ifdef PHP_WIN32
if (GetTempFileName(path, pfx, 0, opened_path)) {
fp = VCWD_FOPEN(opened_path, "wb");
+ } 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;
}