hyanantha Fri Jan 3 09:24:07 2003 EDT
Modified files:
/php4/ext/session mod_files.c session.c
Log:
Modified for NetWare.
Index: php4/ext/session/mod_files.c
diff -u php4/ext/session/mod_files.c:1.85 php4/ext/session/mod_files.c:1.86
--- php4/ext/session/mod_files.c:1.85 Tue Dec 31 11:07:25 2002
+++ php4/ext/session/mod_files.c Fri Jan 3 09:24:07 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mod_files.c,v 1.85 2002/12/31 16:07:25 sebastian Exp $ */
+/* $Id: mod_files.c,v 1.86 2003/01/03 14:24:07 hyanantha Exp $ */
#include "php.h"
@@ -172,7 +172,11 @@
DIR *dir;
char dentry[sizeof(struct dirent) + MAXPATHLEN];
struct dirent *entry = (struct dirent *) &dentry;
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+ struct stat_libc sbuf;
+#else
struct stat sbuf;
+#endif
char buf[MAXPATHLEN];
time_t now;
int nrdels = 0;
@@ -206,7 +210,11 @@
buf[dirname_len + entry_len + 1] = '\0';
/* check whether its last access was more than
maxlifet ago */
if (VCWD_STAT(buf, &sbuf) == 0 &&
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+ (now - (sbuf.st_mtime).tv_sec) >
+maxlifetime) {
+#else
(now - sbuf.st_mtime) > maxlifetime) {
+#endif
VCWD_UNLINK(buf);
nrdels++;
}
@@ -258,7 +266,11 @@
PS_READ_FUNC(files)
{
long n;
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+ struct stat_libc sbuf;
+#else
struct stat sbuf;
+#endif
PS_FILES_DATA;
ps_files_open(data, key TSRMLS_CC);
Index: php4/ext/session/session.c
diff -u php4/ext/session/session.c:1.342 php4/ext/session/session.c:1.343
--- php4/ext/session/session.c:1.342 Tue Dec 31 11:07:26 2002
+++ php4/ext/session/session.c Fri Jan 3 09:24:07 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: session.c,v 1.342 2002/12/31 16:07:26 sebastian Exp $ */
+/* $Id: session.c,v 1.343 2003/01/03 14:24:07 hyanantha Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -729,7 +729,11 @@
static void last_modified(TSRMLS_D)
{
const char *path;
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+ struct stat_libc sb;
+#else
struct stat sb;
+#endif
char buf[MAX_STR + 1];
path = SG(request_info).path_translated;
@@ -740,7 +744,11 @@
#define LAST_MODIFIED "Last-Modified: "
memcpy(buf, LAST_MODIFIED, sizeof(LAST_MODIFIED) - 1);
+#ifdef NETWARE
+ strcpy_gmt(buf + sizeof(LAST_MODIFIED) - 1, &((sb.st_mtime).tv_sec));
+#else
strcpy_gmt(buf + sizeof(LAST_MODIFIED) - 1, &sb.st_mtime);
+#endif
ADD_COOKIE(buf);
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php