NetWare related changes/modifications

This commit is contained in:
Anantha Kesari H Y 2002-09-06 07:44:30 +00:00
parent 15bf7382c2
commit 338332c799
5 changed files with 41 additions and 2 deletions

View 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 */

View File

@ -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

View File

@ -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

View File

@ -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();

View File

@ -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"