summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorJoe Watkins <krakjoe@php.net>2016-11-12 17:30:41 +0000
committerJoe Watkins <krakjoe@php.net>2016-11-12 17:30:41 +0000
commita2bc7cf9ca74c051bfd287c1b3d54c76945f10cc (patch)
treeb45a5d42d9d2ab47f9f06180e12ca973d289a3cc /Zend
parent6c0e1ca4fa31a860a363abecd6376d99edff8833 (diff)
parent2104bea5d756dfa40b605a4a2765a3bc4637a76c (diff)
downloadphp-git-a2bc7cf9ca74c051bfd287c1b3d54c76945f10cc.tar.gz
Merge branch 'master' of git.php.net:/php-src
Diffstat (limited to 'Zend')
-rw-r--r--Zend/configure.in13
-rw-r--r--Zend/zend_API.c2
-rw-r--r--Zend/zend_compile.c27
-rw-r--r--Zend/zend_portability.h5
-rw-r--r--Zend/zend_stream.c9
-rw-r--r--Zend/zend_virtual_cwd.c76
-rw-r--r--Zend/zend_virtual_cwd.h19
7 files changed, 11 insertions, 140 deletions
diff --git a/Zend/configure.in b/Zend/configure.in
index 29551d924c..3ebea4b8ed 100644
--- a/Zend/configure.in
+++ b/Zend/configure.in
@@ -62,13 +62,6 @@ int zend_sprintf(char *buffer, const char *format, ...);
#include <math.h>
-/* To enable the is_nan, is_infinite and is_finite PHP functions */
-#ifdef NETWARE
- #define HAVE_ISNAN 1
- #define HAVE_ISINF 1
- #define HAVE_ISFINITE 1
-#endif
-
#ifndef zend_isnan
#ifdef HAVE_ISNAN
#define zend_isnan(a) isnan(a)
@@ -102,12 +95,6 @@ int zend_sprintf(char *buffer, const char *format, ...);
#endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */
-#ifdef NETWARE
-#ifdef USE_WINSOCK
-#/*This detection against winsock is of no use*/ undef HAVE_SOCKLEN_T
-#/*This detection against winsock is of no use*/ undef HAVE_SYS_SOCKET_H
-#endif
-#endif
])
dnl We want this one before the checks, so the checks can modify CFLAGS.
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 2479cf0d32..277ec6ea6a 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2518,12 +2518,10 @@ void module_destructor(zend_module_entry *module) /* {{{ */
}
#if HAVE_LIBDL
-#if !(defined(NETWARE) && defined(APACHE_1_BUILD))
if (module->handle && !getenv("ZEND_DONT_UNLOAD_MODULES")) {
DL_UNLOAD(module->handle);
}
#endif
-#endif
}
/* }}} */
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 14e9a9c4ca..44ed339d4e 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -1879,22 +1879,6 @@ ZEND_API size_t zend_dirname(char *path, size_t len)
return len;
}
}
-#elif defined(NETWARE)
- /*
- * Find the first occurrence of : from the left
- * move the path pointer to the position just after :
- * increment the len_adjust to the length of path till colon character(inclusive)
- * If there is no character beyond : simple return len
- */
- char *colonpos = NULL;
- colonpos = strchr(path, ':');
- if (colonpos != NULL) {
- len_adjust = ((colonpos - path) + 1);
- path += len_adjust;
- if (len_adjust == len) {
- return len;
- }
- }
#endif
if (len == 0) {
@@ -1919,20 +1903,9 @@ ZEND_API size_t zend_dirname(char *path, size_t len)
}
if (end < path) {
/* No slash found, therefore return '.' */
-#ifdef NETWARE
- if (len_adjust == 0) {
- path[0] = '.';
- path[1] = '\0';
- return 1; /* only one character */
- } else {
- path[0] = '\0';
- return len_adjust;
- }
-#else
path[0] = '.';
path[1] = '\0';
return 1 + len_adjust;
-#endif
}
/* Strip slashes which came before the file name */
diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h
index ff12d93269..d2126d2755 100644
--- a/Zend/zend_portability.h
+++ b/Zend/zend_portability.h
@@ -38,9 +38,6 @@
#ifdef ZEND_WIN32
# include "zend_config.w32.h"
# define ZEND_PATHS_SEPARATOR ';'
-#elif defined(NETWARE)
-# include <zend_config.h>
-# define ZEND_PATHS_SEPARATOR ';'
#elif defined(__riscos__)
# include <zend_config.h>
# define ZEND_PATHS_SEPARATOR ';'
@@ -338,7 +335,7 @@ char *alloca();
#endif
-#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN)
+#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN)
# define ZEND_ALLOCA_MAX_SIZE (32 * 1024)
# define ALLOCA_FLAG(name) \
zend_bool name;
diff --git a/Zend/zend_stream.c b/Zend/zend_stream.c
index b3553bd3cc..680a50aea0 100644
--- a/Zend/zend_stream.c
+++ b/Zend/zend_stream.c
@@ -156,16 +156,7 @@ static size_t zend_stream_read(zend_file_handle *file_handle, char *buf, size_t
int c = '*';
size_t n;
-#ifdef NETWARE
- /*
- c != 4 check is there as fread of a character in NetWare LibC gives 4 upon ^D character.
- Ascii value 4 is actually EOT character which is not defined anywhere in the LibC
- or else we can use instead of hardcoded 4.
- */
- for (n = 0; n < len && (c = zend_stream_getc(file_handle)) != EOF && c != 4 && c != '\n'; ++n) {
-#else
for (n = 0; n < len && (c = zend_stream_getc(file_handle)) != EOF && c != '\n'; ++n) {
-#endif
buf[n] = (char)c;
}
if (c == '\n') {
diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c
index c623bf8d30..8192b424b4 100644
--- a/Zend/zend_virtual_cwd.c
+++ b/Zend/zend_virtual_cwd.c
@@ -53,10 +53,6 @@
# endif
#endif
-#ifdef NETWARE
-#include <fsio.h>
-#endif
-
#ifndef HAVE_REALPATH
#define realpath(x,y) strcpy(y,x)
#endif
@@ -65,8 +61,8 @@
#include "TSRM.h"
-/* Only need mutex for popen() in Windows and NetWare because it doesn't chdir() on UNIX */
-#if (defined(ZEND_WIN32) || defined(NETWARE)) && defined(ZTS)
+/* Only need mutex for popen() in Windows because it doesn't chdir() on UNIX */
+#if defined(ZEND_WIN32) && defined(ZTS)
MUTEX_T cwd_mutex;
#endif
@@ -407,23 +403,12 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
char cwd[MAXPATHLEN];
char *result;
-#ifdef NETWARE
- result = getcwdpath(cwd, NULL, 1);
- if(result)
- {
- char *c=cwd;
- while(c = strchr(c, '\\'))
- {
- *c='/';
- ++c;
- }
- }
-#else
+
#ifdef ZEND_WIN32
ZeroMemory(&cwd, sizeof(cwd));
#endif
result = getcwd(cwd, sizeof(cwd));
-#endif
+
if (!result) {
cwd[0] = '\0';
}
@@ -442,7 +427,7 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
cwd_globals_ctor(&cwd_globals);
#endif
-#if (defined(ZEND_WIN32) || defined(NETWARE)) && defined(ZTS)
+#if (defined(ZEND_WIN32)) && defined(ZTS)
cwd_mutex = tsrm_mutex_alloc();
#endif
}
@@ -453,7 +438,7 @@ CWD_API void virtual_cwd_shutdown(void) /* {{{ */
#ifndef ZTS
cwd_globals_dtor(&cwd_globals);
#endif
-#if (defined(ZEND_WIN32) || defined(NETWARE)) && defined(ZTS)
+#if (defined(ZEND_WIN32)) && defined(ZTS)
tsrm_mutex_free(cwd_mutex);
#endif
@@ -1054,11 +1039,6 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
return -1;
}
}
-
-#elif defined(NETWARE)
- save = 0;
- tmp = do_alloca(len+1, use_heap);
- memcpy(tmp, path, len+1);
#else
if (save && php_sys_lstat(path, &st) < 0) {
if (use_realpath == CWD_REALPATH) {
@@ -1296,18 +1276,6 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
resolved_path[2] = DEFAULT_SLASH;
start = 3;
}
-#elif defined(NETWARE)
- if (IS_ABSOLUTE_PATH(resolved_path, path_length)) {
- /* skip VOLUME name */
- start = 0;
- while (start != ':') {
- if (resolved_path[start] == 0) return -1;
- start++;
- }
- start++;
- if (!IS_SLASH(resolved_path[start])) return -1;
- resolved_path[start++] = DEFAULT_SLASH;
- }
#endif
add_slash = (use_realpath != CWD_REALPATH) && path_length > 0 && IS_SLASH(resolved_path[path_length-1]);
@@ -1595,7 +1563,7 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode) /* {{{ */
}
/* }}} */
-#if !defined(ZEND_WIN32) && !defined(NETWARE)
+#if !defined(ZEND_WIN32)
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int link) /* {{{ */
{
cwd_state new_state;
@@ -1842,36 +1810,6 @@ CWD_API FILE *virtual_popen(const char *command, const char *type) /* {{{ */
return popen_ex(command, type, CWDG(cwd).cwd, NULL);
}
/* }}} */
-#elif defined(NETWARE)
-/* On NetWare, the trick of prepending "cd cwd; " doesn't work so we need to perform
- a VCWD_CHDIR() and mutex it
- */
-CWD_API FILE *virtual_popen(const char *command, const char *type) /* {{{ */
-{
- char prev_cwd[MAXPATHLEN];
- char *getcwd_result;
- FILE *retval;
-
- getcwd_result = VCWD_GETCWD(prev_cwd, MAXPATHLEN);
- if (!getcwd_result) {
- return NULL;
- }
-
-#ifdef ZTS
- tsrm_mutex_lock(cwd_mutex);
-#endif
-
- VCWD_CHDIR(CWDG(cwd).cwd);
- retval = popen(command, type);
- VCWD_CHDIR(prev_cwd);
-
-#ifdef ZTS
- tsrm_mutex_unlock(cwd_mutex);
-#endif
-
- return retval;
-}
-/* }}} */
#else /* Unix */
CWD_API FILE *virtual_popen(const char *command, const char *type) /* {{{ */
{
diff --git a/Zend/zend_virtual_cwd.h b/Zend/zend_virtual_cwd.h
index 033f7d6ad0..1f927bb035 100644
--- a/Zend/zend_virtual_cwd.h
+++ b/Zend/zend_virtual_cwd.h
@@ -73,19 +73,6 @@ typedef unsigned short mode_t;
#define IS_ABSOLUTE_PATH(path, len) \
(len >= 2 && (/* is local */isalpha(path[0]) && path[1] == ':' || /* is UNC */IS_SLASH(path[0]) && IS_SLASH(path[1])))
-#elif defined(NETWARE)
-#ifdef HAVE_DIRENT_H
-#include <dirent.h>
-#endif
-
-#define DEFAULT_SLASH '/'
-#define DEFAULT_DIR_SEPARATOR ';'
-#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
-#define IS_SLASH_P(c) IS_SLASH(*(c))
-/* Colon indicates volume name, either first character should be forward slash or backward slash */
-#define IS_ABSOLUTE_PATH(path, len) \
- ((strchr(path, ':') != NULL) || ((len >= 1) && ((path[0] == '/') || (path[0] == '\\'))))
-
#else
#ifdef HAVE_DIRENT_H
#include <dirent.h>
@@ -193,7 +180,7 @@ CWD_API int virtual_access(const char *pathname, int mode);
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf);
#endif
CWD_API int virtual_chmod(const char *filename, mode_t mode);
-#if !defined(ZEND_WIN32) && !defined(NETWARE)
+#if !defined(ZEND_WIN32)
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int link);
#endif
@@ -281,7 +268,7 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(void);
#define VCWD_UTIME(path, time) virtual_utime(path, time)
#endif
#define VCWD_CHMOD(path, mode) virtual_chmod(path, mode)
-#if !defined(ZEND_WIN32) && !defined(NETWARE)
+#if !defined(ZEND_WIN32)
#define VCWD_CHOWN(path, owner, group) virtual_chown(path, owner, group, 0)
#if HAVE_LCHOWN
#define VCWD_LCHOWN(path, owner, group) virtual_chown(path, owner, group, 1)
@@ -336,7 +323,7 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(void);
# endif
#endif
-#if !defined(ZEND_WIN32) && !defined(NETWARE)
+#if !defined(ZEND_WIN32)
#define VCWD_CHOWN(path, owner, group) chown(path, owner, group)
#if HAVE_LCHOWN
#define VCWD_LCHOWN(path, owner, group) lchown(path, owner, group)