summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnantha Kesari H Y <hyanantha@php.net>2003-01-03 15:59:02 +0000
committerAnantha Kesari H Y <hyanantha@php.net>2003-01-03 15:59:02 +0000
commitc1498d7a1505c6bc6a6ec21390a846b245c1dbd9 (patch)
tree3cc76af56989b1932ecde01eb0f5e7a1e33ada61
parent38a319e3c60942a32a224dfe768aefb6fdee2579 (diff)
downloadphp-git-c1498d7a1505c6bc6a6ec21390a846b245c1dbd9.tar.gz
Modifications for NetWare.
-rw-r--r--sapi/apache2filter/php_apache.h4
-rw-r--r--sapi/apache2filter/sapi_apache2.c15
2 files changed, 19 insertions, 0 deletions
diff --git a/sapi/apache2filter/php_apache.h b/sapi/apache2filter/php_apache.h
index a13f0b4142..1e3c5695a0 100644
--- a/sapi/apache2filter/php_apache.h
+++ b/sapi/apache2filter/php_apache.h
@@ -41,7 +41,11 @@ typedef struct php_struct {
/* Index for reading from buffer */
int post_idx;
/* stat structure of the current file */
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+ struct stat_libc finfo;
+#else
struct stat finfo;
+#endif
/* Buffer for request body filter */
char *post_data;
/* Whether or not we've processed PHP in the output filters yet. */
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c
index 878172e43f..b193d852b1 100644
--- a/sapi/apache2filter/sapi_apache2.c
+++ b/sapi/apache2filter/sapi_apache2.c
@@ -29,7 +29,11 @@
#include "SAPI.h"
#include "ext/standard/php_smart_str.h"
+#ifndef NETWARE
#include "ext/standard/php_standard.h"
+#else
+#include "ext/standard/basic_functions.h"
+#endif
#include "apr_strings.h"
#include "ap_config.h"
@@ -47,6 +51,10 @@
#include "php_apache.h"
+#ifdef NETWARE
+#undef shutdown /* To avoid Winsock confusion */
+#endif
+
/* A way to specify the location of the php.ini dir in an apache directive */
char *apache2_php_ini_path_override = NULL;
@@ -160,9 +168,16 @@ php_apache_sapi_get_stat(TSRMLS_D)
ctx->finfo.st_uid = ctx->r->finfo.user;
ctx->finfo.st_gid = ctx->r->finfo.group;
ctx->finfo.st_ino = ctx->r->finfo.inode;
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+ ctx->finfo.st_atime.tv_sec = ctx->r->finfo.atime/1000000;
+ ctx->finfo.st_mtime.tv_sec = ctx->r->finfo.mtime/1000000;
+ ctx->finfo.st_ctime.tv_sec = ctx->r->finfo.ctime/1000000;
+#else
ctx->finfo.st_atime = ctx->r->finfo.atime/1000000;
ctx->finfo.st_mtime = ctx->r->finfo.mtime/1000000;
ctx->finfo.st_ctime = ctx->r->finfo.ctime/1000000;
+#endif
+
ctx->finfo.st_size = ctx->r->finfo.size;
ctx->finfo.st_nlink = ctx->r->finfo.nlink;