hyanantha Thu Sep 30 10:23:51 2004 EDT Modified files: /php-src/ext/session mod_files.c Log: handled NetWare F_SETFD and stat differences http://cvs.php.net/diff.php/php-src/ext/session/mod_files.c?r1=1.96&r2=1.97&ty=u Index: php-src/ext/session/mod_files.c diff -u php-src/ext/session/mod_files.c:1.96 php-src/ext/session/mod_files.c:1.97 --- php-src/ext/session/mod_files.c:1.96 Mon Aug 2 04:27:24 2004 +++ php-src/ext/session/mod_files.c Thu Sep 30 10:23:51 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mod_files.c,v 1.96 2004/08/02 08:27:24 sas Exp $ */ +/* $Id: mod_files.c,v 1.97 2004/09/30 14:23:51 hyanantha Exp $ */ #include "php.h" @@ -166,7 +166,12 @@ flock(data->fd, LOCK_EX); #ifdef F_SETFD +#ifdef NETWARE + /* NetWare LibC returns -1 upon error and upon success it returns non-zero unlike zero in other OSes*/ + if (fcntl(data->fd, F_SETFD, 1) == -1) { +#else if (fcntl(data->fd, F_SETFD, 1)) { +#endif php_error_docref(NULL TSRMLS_CC, E_WARNING, "fcntl(%d, F_SETFD, 1) failed: %s (%d)", data->fd, strerror(errno), errno); } #endif @@ -216,7 +221,11 @@ buf[dirname_len + entry_len + 1] = '\0'; /* check whether its last access was more than maxlifet ago */ if (VCWD_STAT(buf, &sbuf) == 0 && +#ifdef NETWARE + (now - sbuf.st_mtime.tv_sec) > maxlifetime) { +#else (now - sbuf.st_mtime) > maxlifetime) { +#endif VCWD_UNLINK(buf); nrdels++; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php