#define O_RDONLY _O_RDONLY
#include "win32/param.h"
#include "win32/winutil.h"
-#elif defined(NETWARE) && !defined(NEW_LIBC)
-/*#include <ws2nlm.h>*/
-#include <sys/socket.h>
-#include "netware/param.h"
#else
#include <sys/param.h>
+#if HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
#if defined(NETWARE) && defined(USE_WINSOCK)
#include <novsock2.h>
#else
#if HAVE_PWD_H
#ifdef PHP_WIN32
#include "win32/pwd.h"
-#elif defined(NETWARE)
-#include "netware/pwd.h"
#else
#include <pwd.h>
#endif
MAKE_LONG_ZVAL_INCREF(stat_rdev, -1);
#endif
MAKE_LONG_ZVAL_INCREF(stat_size, stat_ssb.sb.st_size);
+#ifdef NETWARE
+ MAKE_LONG_ZVAL_INCREF(stat_atime, stat_ssb.sb.st_atime.tv_sec);
+ MAKE_LONG_ZVAL_INCREF(stat_mtime, stat_ssb.sb.st_mtime.tv_sec);
+ MAKE_LONG_ZVAL_INCREF(stat_ctime, stat_ssb.sb.st_ctime.tv_sec);
+#else
MAKE_LONG_ZVAL_INCREF(stat_atime, stat_ssb.sb.st_atime);
MAKE_LONG_ZVAL_INCREF(stat_mtime, stat_ssb.sb.st_mtime);
MAKE_LONG_ZVAL_INCREF(stat_ctime, stat_ssb.sb.st_ctime);
+#endif
#ifdef HAVE_ST_BLKSIZE
MAKE_LONG_ZVAL_INCREF(stat_blksize, stat_ssb.sb.st_blksize);
#else
#if HAVE_PWD_H
# ifdef PHP_WIN32
# include "win32/pwd.h"
-# elif defined(NETWARE)
-# include "netware/pwd.h"
# else
# include <pwd.h>
# endif
}
#elif (defined(HAVE_SYS_STATFS_H) || defined(HAVE_SYS_MOUNT_H)) && defined(HAVE_STATFS)
if (statfs(Z_STRVAL_PP(path), &buf)) RETURN_FALSE;
+#ifdef NETWARE
+ bytesfree = (((double)buf.f_bsize) * ((double)buf.f_bfree));
+#else
bytesfree = (((double)buf.f_bsize) * ((double)buf.f_bavail));
#endif
+#endif
#endif /* WINDOWS */
RETURN_DOUBLE(bytesfree);
{
pval **filename, **filetime, **fileatime;
int ret;
-#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
- struct stat_libc sb;
-#else
struct stat sb;
-#endif
FILE *file;
struct utimbuf newtimebuf;
struct utimbuf *newtime = NULL;
{
zval *stat_dev, *stat_ino, *stat_mode, *stat_nlink, *stat_uid, *stat_gid, *stat_rdev,
*stat_size, *stat_atime, *stat_mtime, *stat_ctime, *stat_blksize, *stat_blocks;
-#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
- struct stat_libc *stat_sb;
-#else
struct stat *stat_sb;
-#endif
int rmask=S_IROTH, wmask=S_IWOTH, xmask=S_IXOTH; /* access rights defaults to other */
char *stat_sb_names[13]={"dev", "ino", "mode", "nlink", "uid", "gid", "rdev",
"size", "atime", "mtime", "ctime", "blksize", "blocks"};
case FS_GROUP:
RETURN_LONG((long)BG(sb).st_gid);
case FS_ATIME:
-#if defined(NETWARE) && defined(NEW_LIBC)
+#ifdef NETWARE
RETURN_LONG((long)(BG(sb).st_atime).tv_nsec);
#else
RETURN_LONG((long)BG(sb).st_atime);
#endif
case FS_MTIME:
-#if defined(NETWARE) && defined(NEW_LIBC)
+#ifdef NETWARE
RETURN_LONG((long)(BG(sb).st_mtime).tv_nsec);
#else
RETURN_LONG((long)BG(sb).st_mtime);
#endif
case FS_CTIME:
-#if defined(NETWARE) && defined(NEW_LIBC)
+#ifdef NETWARE
RETURN_LONG((long)(BG(sb).st_ctime).tv_nsec);
#else
RETURN_LONG((long)BG(sb).st_ctime);
MAKE_LONG_ZVAL_INCREF(stat_rdev, -1);
#endif
MAKE_LONG_ZVAL_INCREF(stat_size, stat_sb->st_size);
-#if defined(NETWARE) && defined(NEW_LIBC)
+#ifdef NETWARE
MAKE_LONG_ZVAL_INCREF(stat_atime, (stat_sb->st_atime).tv_nsec);
MAKE_LONG_ZVAL_INCREF(stat_mtime, (stat_sb->st_mtime).tv_nsec);
MAKE_LONG_ZVAL_INCREF(stat_ctime, (stat_sb->st_ctime).tv_nsec);