There is a
#ifdef _UTIMBUF_DEFINED struct _utimbuf b; #else struct utimbuf b; #endif
in system.c, but I don't see anything that could define _UTIMBUF_DEFINED.
Martin Nilsson (Opera Mini - AFK!) @ Pike (-) developers forum wrote:
There is a
#ifdef _UTIMBUF_DEFINED struct _utimbuf b; #else struct utimbuf b; #endif
in system.c, but I don't see anything that could define _UTIMBUF_DEFINED.
Git history shows that the following is all that referenced that define:
From: hubbe <hubbe> Date: Mon, 17 Jan 2000 02:34:04 +0000 Subject: utime may now work on NT
--- src/modules/system/configure.in | 2 +- src/modules/system/system.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/src/modules/system/configure.in b/src/modules/system/configure.in index 432be7b..746dd66 100644 --- a/src/modules/system/configure.in +++ b/src/modules/system/configure.in @@ -11,7 +11,7 @@ AC_CHECK_LIB(nsl, gethostbyname) AC_HAVE_HEADERS(syslog.h sys/syslog.h sys/types.h errno.h unistd.h pwd.h \ sys/conf.h sys/socket.h netinet/in.h arpa/inet.h netdb.h stdarg.h \ sys/utsname.h pwd.h passwd.h shadow.h grp.h sys/stat.h winsock.h \ - sys/systeminfo.h windows.h sys/param.h utime.h) + sys/systeminfo.h windows.h sys/param.h utime.h sys/utime.h)
AC_HAVE_FUNCS(syslog link symlink readlink resolvepath chown \ initgroups setgroups getgroups seteuid setresuid setegid setresgid \ diff --git a/src/modules/system/system.c b/src/modules/system/system.c index e5d596a..313cb77 100644 --- a/src/modules/system/system.c +++ b/src/modules/system/system.c @@ -83,6 +83,10 @@ RCSID("$Id$"); #include <utime.h> #endif
+#ifdef HAVE_SYS_UTIME_H +#include <sys/utime.h> +#endif + #include "dmalloc.h"
#ifndef NGROUPS_MAX @@ -404,7 +408,12 @@ void f_utime(INT32 args) char *path; INT32 atime, mtime; int err; + /*&#()&@(*#&$ NT ()*&#)(&*@$#*/ +#ifdef _UTIMBUF_DEFINED + struct _utimbuf b; +#else struct utimbuf b; +#endif
#ifdef PIKE_SECURITY if(!CHECK_SECURITY(SECURITY_BIT_SECURITY)) -- 1.5.4.3
Well: http://source.winehq.org/source/include/msvcrt/sys/utime.h
40 #ifndef _UTIMBUF_DEFINED 41 #define _UTIMBUF_DEFINED
So seems like a define that exists on Windows.
Which is just another sign that it really should have been a config test.
pike-devel@lists.lysator.liu.se