hyanantha Thu Oct 24 05:58:48 2002 EDT Modified files: (Branch: PHP_4_2_0) /php4/ext/session mod_files.c Log: NetWare related changes/modifications. Index: php4/ext/session/mod_files.c diff -u php4/ext/session/mod_files.c:1.72.2.3 php4/ext/session/mod_files.c:1.72.2.4 --- php4/ext/session/mod_files.c:1.72.2.3 Wed Sep 4 09:50:38 2002 +++ php4/ext/session/mod_files.c Thu Oct 24 05:58:47 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mod_files.c,v 1.72.2.3 2002/09/04 13:50:38 kalowsky Exp $ */ +/* $Id: mod_files.c,v 1.72.2.4 2002/10/24 09:58:47 hyanantha Exp $ */ #include "php.h" @@ -156,7 +156,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; @@ -190,7 +194,11 @@ buf[dirname_len + entry_len + 1] = '\0'; /* check whether its last access was more than maxlifet ago */ if (VCWD_STAT(buf, &sbuf) == 0 && - (now - sbuf.st_atime) > maxlifetime) { +#if (defined(NETWARE) && defined(NEW_LIBC)) + (now - sbuf.st_atime.tv_nsec) > +maxlifetime) { +#else + (now - sbuf.st_atime) > maxlifetime) { +#endif VCWD_UNLINK(buf); nrdels++; } @@ -242,14 +250,22 @@ 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); if (data->fd < 0) return FAILURE; +#if (defined(NETWARE) && defined(CLIB_STAT_PATCH)) + if (fstat(data->fd, ((struct stat*)&sbuf))) +#else if (fstat(data->fd, &sbuf)) +#endif return FAILURE; data->st_size = *vallen = sbuf.st_size;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php