diff options
-rw-r--r-- | ext/standard/math.c | 6 | ||||
-rw-r--r-- | ext/standard/microtime.c | 6 | ||||
-rw-r--r-- | ext/standard/pack.c | 14 | ||||
-rw-r--r-- | ext/standard/pageinfo.c | 13 | ||||
-rw-r--r-- | ext/standard/rand.c | 4 |
5 files changed, 41 insertions, 2 deletions
diff --git a/ext/standard/math.c b/ext/standard/math.c index 5b6c10962f..6e9dfe07c4 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -314,7 +314,8 @@ PHP_FUNCTION(tanh) /* }}} */ -#ifndef PHP_WIN32 +/*#ifndef PHP_WIN32*/ +#if !defined(PHP_WIN32) && !defined(NETWARE) /* {{{ proto float asinh(float number) Returns the inverse hyperbolic sine of the number, i.e. the value whose hyperbolic sine is number */ @@ -471,7 +472,8 @@ PHP_FUNCTION(exp) /* }}} */ -#ifndef PHP_WIN32 +/*#ifndef PHP_WIN32*/ +#if !defined(PHP_WIN32) && !defined(NETWARE) /* {{{ proto float expm1(float number) Returns exp(number) - 1, computed in a way that accurate even when the value of number is close to zero */ diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c index 17a4a98328..f5b1ab1578 100644 --- a/ext/standard/microtime.c +++ b/ext/standard/microtime.c @@ -25,6 +25,12 @@ #endif #ifdef PHP_WIN32 #include "win32/time.h" +#elif defined(NETWARE) +#ifdef NEW_LIBC +#include <sys/timeval.h> +#else +#include "netware/time_nw.h" +#endif #else #include <sys/time.h> #endif diff --git a/ext/standard/pack.c b/ext/standard/pack.c index 3d47e0609c..cd5b7eb8d4 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -30,6 +30,18 @@ #include <winsock.h> #define O_RDONLY _O_RDONLY #include "win32/param.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 #else #include <sys/param.h> #endif @@ -40,6 +52,8 @@ #if HAVE_PWD_H #ifdef PHP_WIN32 #include "win32/pwd.h" +#elif defined(NETWARE) +#include "netware/pwd.h" #else #include <pwd.h> #endif diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c index e080e23233..0cfd948544 100644 --- a/ext/standard/pageinfo.c +++ b/ext/standard/pageinfo.c @@ -27,6 +27,11 @@ #if HAVE_PWD_H #ifdef PHP_WIN32 #include "win32/pwd.h" +#elif defined(NETWARE) +#ifdef ZTS +extern int basic_globals_id; +#endif +#include "netware/pwd.h" #else #include <pwd.h> #endif @@ -59,7 +64,11 @@ */ PHPAPI void php_statpage(TSRMLS_D) { +#if defined(NETWARE) && defined(CLIB_STAT_PATCH) + struct stat_libc *pstat; +#else struct stat *pstat; +#endif pstat = sapi_get_stat(TSRMLS_C); @@ -68,7 +77,11 @@ PHPAPI void php_statpage(TSRMLS_D) BG(page_uid) = pstat->st_uid; BG(page_gid) = pstat->st_gid; BG(page_inode) = pstat->st_ino; +#if defined(NETWARE) && defined(NEW_LIBC) + BG(page_mtime) = (pstat->st_mtime).tv_nsec; +#else BG(page_mtime) = pstat->st_mtime; +#endif } else { /* handler for situations where there is no source file, ex. php -r */ BG(page_uid) = getuid(); BG(page_gid) = getgid(); diff --git a/ext/standard/rand.c b/ext/standard/rand.c index fee002a048..dbb26a9e8a 100644 --- a/ext/standard/rand.c +++ b/ext/standard/rand.c @@ -31,6 +31,10 @@ # include <windows.h> #endif +#if defined(NETWARE) && !defined(NEW_LIBC) /* For getpid() used below */ +#include "netware/pwd.h" +#endif + #include "php.h" #include "php_math.h" #include "php_rand.h" |