summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/fopen_wrappers.c14
-rw-r--r--main/main.c15
-rw-r--r--main/network.c18
-rw-r--r--main/php.h6
-rw-r--r--main/php_getopt.h8
-rw-r--r--main/php_open_temporary_file.c7
-rw-r--r--main/php_scandir.c2
-rw-r--r--main/streams/glob_wrapper.c4
-rw-r--r--main/streams/memory.c8
-rw-r--r--main/streams/plain_wrapper.c8
-rw-r--r--main/streams/streams.c2
-rw-r--r--main/streams/userspace.c6
-rw-r--r--main/streams/xp_socket.c2
13 files changed, 22 insertions, 78 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c
index b554c38039..93dad84746 100644
--- a/main/fopen_wrappers.c
+++ b/main/fopen_wrappers.c
@@ -55,8 +55,6 @@
#ifdef PHP_WIN32
#include <winsock2.h>
-#elif defined(NETWARE) && defined(USE_WINSOCK)
-#include <novsock2.h>
#else
#include <netinet/in.h>
#include <netdb.h>
@@ -65,7 +63,7 @@
#endif
#endif
-#if defined(PHP_WIN32) || defined(__riscos__) || defined(NETWARE)
+#if defined(PHP_WIN32) || defined(__riscos__)
#undef AF_UNIX
#endif
@@ -184,7 +182,7 @@ PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path
}
#endif
-#if defined(PHP_WIN32) || defined(NETWARE)
+#ifdef PHP_WIN32
path_file = strrchr(path_tmp, DEFAULT_SLASH);
if (!path_file) {
path_file = strrchr(path_tmp, '/');
@@ -197,7 +195,7 @@ PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path
return -1;
} else {
path_len = path_file - path_tmp + 1;
-#if defined(PHP_WIN32) || defined(NETWARE)
+#ifdef PHP_WIN32
if (path_len > 1 && path_tmp[path_len - 2] == ':') {
if (path_len != 3) {
return -1;
@@ -219,7 +217,7 @@ PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path
int basedir_len = (int)strlen(basedir);
/* Handler for basedirs that end with a / */
resolved_basedir_len = (int)strlen(resolved_basedir);
-#if defined(PHP_WIN32) || defined(NETWARE)
+#ifdef PHP_WIN32
if (basedir[basedir_len - 1] == PHP_DIR_SEPARATOR || basedir[basedir_len - 1] == '/') {
#else
if (basedir[basedir_len - 1] == PHP_DIR_SEPARATOR) {
@@ -242,7 +240,7 @@ PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path
}
/* Check the path */
-#if defined(PHP_WIN32) || defined(NETWARE)
+#ifdef PHP_WIN32
if (strncasecmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) {
#else
if (strncmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) {
@@ -257,7 +255,7 @@ PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path
} else {
/* /openbasedir/ and /openbasedir are the same directory */
if (resolved_basedir_len == (resolved_name_len + 1) && resolved_basedir[resolved_basedir_len - 1] == PHP_DIR_SEPARATOR) {
-#if defined(PHP_WIN32) || defined(NETWARE)
+#ifdef PHP_WIN32
if (strncasecmp(resolved_basedir, resolved_name, resolved_name_len) == 0) {
#else
if (strncmp(resolved_basedir, resolved_name, resolved_name_len) == 0) {
diff --git a/main/main.c b/main/main.c
index b9e4a1083e..20d0c264ee 100644
--- a/main/main.c
+++ b/main/main.c
@@ -34,11 +34,6 @@
#include "win32/php_win32_globals.h"
#include "win32/winutil.h"
#include <process.h>
-#elif defined(NETWARE)
-#include <sys/timeval.h>
-#ifdef USE_WINSOCK
-#include <novsock2.h>
-#endif
#endif
#if HAVE_SYS_TIME_H
#include <sys/time.h>
@@ -505,8 +500,8 @@ PHP_INI_MH(OnChangeBrowscap);
* PHP_INCLUDE_PATH
*/
- /* Windows and Netware use the internal mail */
-#if defined(PHP_WIN32) || defined(NETWARE)
+ /* Windows use the internal mail */
+#if defined(PHP_WIN32)
# define DEFAULT_SENDMAIL_PATH NULL
#elif defined(PHP_PROG_SENDMAIL)
# define DEFAULT_SENDMAIL_PATH PHP_PROG_SENDMAIL " -t -i "
@@ -2055,7 +2050,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
char *php_os;
zend_module_entry *module;
-#if defined(PHP_WIN32) || (defined(NETWARE) && defined(USE_WINSOCK))
+#ifdef PHP_WIN32
WORD wVersionRequested = MAKEWORD(2, 0);
WSADATA wsaData;
#endif
@@ -2130,7 +2125,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
tzset();
#endif
-#if defined(PHP_WIN32) || (defined(NETWARE) && defined(USE_WINSOCK))
+#ifdef PHP_WIN32
/* start up winsock services */
if (WSAStartup(wVersionRequested, &wsaData) != 0) {
php_printf("\nwinsock.dll unusable. %d\n", WSAGetLastError());
@@ -2398,7 +2393,7 @@ void php_module_shutdown(void)
zend_shutdown();
-#if defined(PHP_WIN32) || (defined(NETWARE) && defined(USE_WINSOCK))
+#ifdef PHP_WIN32
/*close winsock */
WSACleanup();
#endif
diff --git a/main/network.c b/main/network.c
index aedff7e207..f2143b1600 100644
--- a/main/network.c
+++ b/main/network.c
@@ -32,9 +32,6 @@
# include "win32/inet.h"
# define O_RDONLY _O_RDONLY
# include "win32/param.h"
-#elif defined(NETWARE)
-#include <sys/timeval.h>
-#include <sys/param.h>
#else
#include <sys/param.h>
#endif
@@ -55,17 +52,8 @@
#include <sys/poll.h>
#endif
-#if defined(NETWARE)
-#ifdef USE_WINSOCK
-#include <novsock2.h>
-#else
-#include <arpa/inet.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <sys/select.h>
-#include <sys/socket.h>
-#endif
-#elif !defined(PHP_WIN32)
+
+#ifndef PHP_WIN32
#include <netinet/in.h>
#include <netdb.h>
#if HAVE_ARPA_INET_H
@@ -79,7 +67,7 @@ int inet_aton(const char *, struct in_addr *);
#include "php_network.h"
-#if defined(PHP_WIN32) || defined(__riscos__) || defined(NETWARE)
+#if defined(PHP_WIN32) || defined(__riscos__)
#undef AF_UNIX
#endif
diff --git a/main/php.h b/main/php.h
index 32ab59386f..4ed2b9d881 100644
--- a/main/php.h
+++ b/main/php.h
@@ -66,12 +66,6 @@
# define PHP_EOL "\n"
#endif
-#ifdef NETWARE
-/* For php_get_uname() function */
-#define PHP_UNAME "NetWare"
-#define PHP_OS PHP_UNAME
-#endif
-
#if HAVE_ASSERT_H
#if PHP_DEBUG
#undef NDEBUG
diff --git a/main/php_getopt.h b/main/php_getopt.h
index d84ba18ed9..4ee29224e7 100644
--- a/main/php_getopt.h
+++ b/main/php_getopt.h
@@ -23,14 +23,6 @@
#include "php.h"
-#ifdef NETWARE
-/*
-As NetWare LibC has optind and optarg macros defined in unistd.h our local variables were getting mistakenly preprocessed so undeffing optind and optarg
-*/
-#undef optarg
-#undef optind
-#endif
-
/* Define structure for one recognized option (both single char and long name).
* If short_open is '-' this is the last option. */
typedef struct _opt_struct {
diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c
index 7b0f88762d..7cc4e5fa6b 100644
--- a/main/php_open_temporary_file.c
+++ b/main/php_open_temporary_file.c
@@ -30,13 +30,6 @@
#define O_RDONLY _O_RDONLY
#include "win32/param.h"
#include "win32/winutil.h"
-#elif defined(NETWARE)
-#ifdef USE_WINSOCK
-#include <novsock2.h>
-#else
-#include <sys/socket.h>
-#endif
-#include <sys/param.h>
#else
#include <sys/param.h>
#include <sys/socket.h>
diff --git a/main/php_scandir.c b/main/php_scandir.c
index 50f6de82bf..90f9e63e81 100644
--- a/main/php_scandir.c
+++ b/main/php_scandir.c
@@ -38,9 +38,7 @@
#endif
#include <stdlib.h>
-#ifndef NETWARE
#include <search.h>
-#endif
#endif /* HAVE_SCANDIR */
diff --git a/main/streams/glob_wrapper.c b/main/streams/glob_wrapper.c
index d542e336e3..bae22dd6ab 100644
--- a/main/streams/glob_wrapper.c
+++ b/main/streams/glob_wrapper.c
@@ -116,7 +116,7 @@ static void php_glob_stream_path_split(glob_s_t *pglob, const char *path, int ge
if ((pos = strrchr(path, '/')) != NULL) {
path = pos+1;
}
-#if defined(PHP_WIN32) || defined(NETWARE)
+#ifdef PHP_WIN32
if ((pos = strrchr(path, '\\')) != NULL) {
path = pos+1;
}
@@ -240,7 +240,7 @@ static php_stream *php_glob_stream_opener(php_stream_wrapper *wrapper, const cha
if ((tmp = strrchr(pos, '/')) != NULL) {
pos = tmp+1;
}
-#if defined(PHP_WIN32) || defined(NETWARE)
+#ifdef PHP_WIN32
if ((tmp = strrchr(pos, '\\')) != NULL) {
pos = tmp+1;
}
diff --git a/main/streams/memory.c b/main/streams/memory.c
index a1af61e3f0..39ae8eb603 100644
--- a/main/streams/memory.c
+++ b/main/streams/memory.c
@@ -214,17 +214,9 @@ static int php_stream_memory_stat(php_stream *stream, php_stream_statbuf *ssb) /
ssb->sb.st_size = ms->fsize;
ssb->sb.st_mode |= S_IFREG; /* regular file */
-
-#ifdef NETWARE
- ssb->sb.st_mtime.tv_sec = timestamp;
- ssb->sb.st_atime.tv_sec = timestamp;
- ssb->sb.st_ctime.tv_sec = timestamp;
-#else
ssb->sb.st_mtime = timestamp;
ssb->sb.st_atime = timestamp;
ssb->sb.st_ctime = timestamp;
-#endif
-
ssb->sb.st_nlink = 1;
ssb->sb.st_rdev = -1;
/* this is only for APC, so use /dev/null device - no chance of conflict there! */
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c
index 69dd25acc5..7b7d9c0dd9 100644
--- a/main/streams/plain_wrapper.c
+++ b/main/streams/plain_wrapper.c
@@ -51,7 +51,7 @@
#define php_stream_fopen_from_file_int(file, mode) _php_stream_fopen_from_file_int((file), (mode) STREAMS_CC)
#define php_stream_fopen_from_file_int_rel(file, mode) _php_stream_fopen_from_file_int((file), (mode) STREAMS_REL_CC)
-#if !defined(WINDOWS) && !defined(NETWARE)
+#ifndef PHP_WIN32
extern int php_get_uid_by_name(const char *name, uid_t *uid);
extern int php_get_gid_by_name(const char *name, gid_t *gid);
#endif
@@ -1164,7 +1164,7 @@ static int php_plain_files_rename(php_stream_wrapper *wrapper, const char *url_f
zend_stat_t sb;
if (php_copy_file(url_from, url_to) == SUCCESS) {
if (VCWD_STAT(url_from, &sb) == 0) {
-# if !defined(TSRM_WIN32) && !defined(NETWARE)
+# ifndef TSRM_WIN32
if (VCWD_CHMOD(url_to, sb.st_mode)) {
if (errno == EPERM) {
php_error_docref2(NULL, url_from, url_to, E_WARNING, "%s", strerror(errno));
@@ -1325,7 +1325,7 @@ static int php_plain_files_rmdir(php_stream_wrapper *wrapper, const char *url, i
static int php_plain_files_metadata(php_stream_wrapper *wrapper, const char *url, int option, void *value, php_stream_context *context)
{
struct utimbuf *newtime;
-#if !defined(WINDOWS) && !defined(NETWARE)
+#ifndef PHP_WIN32
uid_t uid;
gid_t gid;
#endif
@@ -1364,7 +1364,7 @@ static int php_plain_files_metadata(php_stream_wrapper *wrapper, const char *url
ret = VCWD_UTIME(url, newtime);
break;
-#if !defined(WINDOWS) && !defined(NETWARE)
+#ifndef PHP_WIN32
case PHP_STREAM_META_OWNER_NAME:
case PHP_STREAM_META_OWNER:
if(option == PHP_STREAM_META_OWNER_NAME) {
diff --git a/main/streams/streams.c b/main/streams/streams.c
index 936f9990ab..5049026e80 100644
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -1661,7 +1661,7 @@ int php_init_stream_wrappers(int module_number)
return (php_stream_xport_register("tcp", php_stream_generic_socket_factory) == SUCCESS
&&
php_stream_xport_register("udp", php_stream_generic_socket_factory) == SUCCESS
-#if defined(AF_UNIX) && !(defined(PHP_WIN32) || defined(__riscos__) || defined(NETWARE))
+#if defined(AF_UNIX) && !(defined(PHP_WIN32) || defined(__riscos__))
&&
php_stream_xport_register("unix", php_stream_generic_socket_factory) == SUCCESS
&&
diff --git a/main/streams/userspace.c b/main/streams/userspace.c
index 6afa3b095c..8fe4086213 100644
--- a/main/streams/userspace.c
+++ b/main/streams/userspace.c
@@ -859,15 +859,9 @@ static int statbuf_from_array(zval *array, php_stream_statbuf *ssb)
STAT_PROP_ENTRY(rdev);
#endif
STAT_PROP_ENTRY(size);
-#ifdef NETWARE
- STAT_PROP_ENTRY_EX(atime, atime.tv_sec);
- STAT_PROP_ENTRY_EX(mtime, mtime.tv_sec);
- STAT_PROP_ENTRY_EX(ctime, ctime.tv_sec);
-#else
STAT_PROP_ENTRY(atime);
STAT_PROP_ENTRY(mtime);
STAT_PROP_ENTRY(ctime);
-#endif
#ifdef HAVE_ST_BLKSIZE
STAT_PROP_ENTRY(blksize);
#endif
diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c
index fa08a11752..95383ec8e3 100644
--- a/main/streams/xp_socket.c
+++ b/main/streams/xp_socket.c
@@ -23,7 +23,7 @@
#include "streams/php_streams_int.h"
#include "php_network.h"
-#if defined(PHP_WIN32) || defined(__riscos__) || defined(NETWARE)
+#if defined(PHP_WIN32) || defined(__riscos__)
# undef AF_UNIX
#endif