Skip to content

Commit 3313593

Browse files
author
Anantha Kesari H Y
committed
NetWare related changes/modifications
1 parent 3798528 commit 3313593

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

Diff for: main/php_open_temporary_file.c

+24
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@
2929
#define O_RDONLY _O_RDONLY
3030
#include "win32/param.h"
3131
#include "win32/winutil.h"
32+
#elif defined(NETWARE)
33+
#ifdef USE_WINSOCK
34+
/*#include <ws2nlm.h>*/
35+
#include <novsock2.h>
36+
#else
37+
#include <sys/socket.h>
38+
#endif
39+
#ifdef NEW_LIBC
40+
#include <sys/param.h>
41+
#else
42+
#include "netware/param.h"
43+
#endif
44+
#include "netware/mktemp.h"
3245
#else
3346
#include <sys/param.h>
3447
#include <sys/socket.h>
@@ -95,6 +108,9 @@ static FILE *php_do_open_temporary_file(const char *path, const char *pfx, char
95108
#ifndef PHP_WIN32
96109
int fd;
97110
#endif
111+
#ifdef NETWARE
112+
char *file_path = NULL;
113+
#endif
98114

99115
if (!path) {
100116
return NULL;
@@ -118,6 +134,14 @@ static FILE *php_do_open_temporary_file(const char *path, const char *pfx, char
118134
} else {
119135
fp = NULL;
120136
}
137+
#elif defined(NETWARE)
138+
/* Using standard mktemp() implementation for NetWare */
139+
file_path = mktemp(opened_path);
140+
if (file_path) {
141+
fp = VCWD_FOPEN(file_path, "wb");
142+
} else {
143+
fp = NULL;
144+
}
121145
#elif defined(HAVE_MKSTEMP)
122146
fd = mkstemp(opened_path);
123147
if (fd==-1) {

Diff for: main/php_syslog.h

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33

44
#ifdef PHP_WIN32
55
#include "win32/syslog.h"
6+
#elif defined(NETWARE)
7+
# include "config.nw.h"
8+
#ifdef HAVE_SYSLOG_H
9+
#include <syslog.h>
10+
#endif
611
#else
712
#include "php_config.h"
813
#ifdef HAVE_SYSLOG_H

0 commit comments

Comments
 (0)