]> granicus.if.org Git - php/commitdiff
NetWare related changes/modifications
authorAnantha Kesari H Y <hyanantha@php.net>
Fri, 6 Sep 2002 07:44:30 +0000 (07:44 +0000)
committerAnantha Kesari H Y <hyanantha@php.net>
Fri, 6 Sep 2002 07:44:30 +0000 (07:44 +0000)
ext/standard/math.c
ext/standard/microtime.c
ext/standard/pack.c
ext/standard/pageinfo.c
ext/standard/rand.c

index 5b6c10962f3201a5dff057dd23e56ee802ccb9c7..6e9dfe07c48405eba72f8f2fb0d65f28d2f2d72a 100644 (file)
@@ -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 */
 
index 17a4a98328577da063a39e3799ac24d8be3af5e0..f5b1ab157832cf1529c88dc1f818d1eb8b10c863 100644 (file)
 #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
index 3d47e0609cb18086eab7525252687cad27042418..cd5b7eb8d46f8f067dd7741400c5a7713a89f75f 100644 (file)
 #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
index e080e23233c0f08675532a562ffeabe7346877ba..0cfd94854442ecc4dee5d7d7ca4e6e44c33ff484 100644 (file)
 #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
  */
 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();
index fee002a048ced1ed428b3e2b3245f06ce6fde44b..dbb26a9e8a97373c0f280db9349dc565960e00bb 100644 (file)
 # 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"