OSDN Git Service

* libc/include/sys/stat.h (UTIME_NOW): Define for Cygwin.
authorcorinna <corinna>
Thu, 24 Apr 2008 09:39:20 +0000 (09:39 +0000)
committercorinna <corinna>
Thu, 24 Apr 2008 09:39:20 +0000 (09:39 +0000)
(UTIME_OMIT): Ditto.
(utimensat): Declare for Cygwin.
(futimens): Ditto.

newlib/ChangeLog
newlib/libc/include/sys/stat.h

index 48bb2e1..abf8929 100644 (file)
@@ -1,3 +1,10 @@
+2008-04-24  Corinna Vinschen  <corinna@vinschen.de>
+
+       * libc/include/sys/stat.h (UTIME_NOW): Define for Cygwin.
+       (UTIME_OMIT): Ditto.
+       (utimensat): Declare for Cygwin.
+       (futimens): Ditto.
+
 2008-04-23  Ken Werner  <ken.werner@de.ibm.com>
 
        * libc/include/_ansi.h: _LONG_LONG renamed to _LONG_LONG_TYPE.
index 949508d..8b8aa65 100644 (file)
@@ -115,6 +115,11 @@ struct     stat
 #define        S_ISLNK(m)      (((m)&_IFMT) == _IFLNK)
 #define        S_ISSOCK(m)     (((m)&_IFMT) == _IFSOCK)
 
+#if defined(__CYGWIN__)
+/* Special tv_nsec values for futimens(2) and utimensat(2). */
+#define UTIME_NOW      -2L
+#define UTIME_OMIT     -1L
+#endif
 
 int    _EXFUN(chmod,( const char *__path, mode_t __mode ));
 int     _EXFUN(fchmod,(int __fd, mode_t __mode));
@@ -135,6 +140,8 @@ int _EXFUN(fstatat, (int, const char *, struct __stat64 *, int));
 int    _EXFUN(mkdirat, (int, const char *, mode_t));
 int    _EXFUN(mkfifoat, (int, const char *, mode_t));
 int    _EXFUN(mknodat, (int, const char *, mode_t, dev_t));
+int    _EXFUN(utimensat, (int, const char *, const struct timespec *, int));
+int    _EXFUN(futimens, (int, const struct timespec *));
 #endif
 
 /* Provide prototypes for most of the _<systemcall> names that are