summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys/stat.h
diff options
context:
space:
mode:
authorRoger A. Faulkner <Roger.Faulkner@Sun.COM>2009-09-01 15:37:22 -0700
committerRoger A. Faulkner <Roger.Faulkner@Sun.COM>2009-09-01 15:37:22 -0700
commit3b862e9a9ce59d5dbf0177b9eb293109fde6bf36 (patch)
tree4617754c72826e2339efba871c5b849158c3f689 /usr/src/uts/common/sys/stat.h
parente8c4ecbb29dd0267f81ae8a6169b404fe10a111a (diff)
downloadillumos-joyent-3b862e9a9ce59d5dbf0177b9eb293109fde6bf36.tar.gz
PSARC 2009/453 futimens, utimensat
6815302 Implement futimens, utimensat(POSIX.1-2008) -set file modification times with nanosecond granularity 6539657 touch(1) does not set the nanosecond timestamp of a file correctly
Diffstat (limited to 'usr/src/uts/common/sys/stat.h')
-rw-r--r--usr/src/uts/common/sys/stat.h32
1 files changed, 26 insertions, 6 deletions
diff --git a/usr/src/uts/common/sys/stat.h b/usr/src/uts/common/sys/stat.h
index 1b8155b649..81fb9e4ab8 100644
--- a/usr/src/uts/common/sys/stat.h
+++ b/usr/src/uts/common/sys/stat.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,8 +31,6 @@
#ifndef _SYS_STAT_H
#define _SYS_STAT_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/feature_tests.h>
#include <sys/types.h>
@@ -473,6 +471,14 @@ struct stat64_32 {
#endif /* __i386 || (__i386_COMPAT && _KERNEL) */
+#if defined(__EXTENSIONS__) || \
+ (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
+ /* || defined(_XPG7) */
+/* for use with futimens() and utimensat() */
+#define UTIME_NOW -1L
+#define UTIME_OMIT -2L
+#endif /* defined(__EXTENSIONS__) ... */
+
#if !defined(_KERNEL) || defined(_BOOT)
#if defined(__STDC__)
@@ -499,6 +505,13 @@ extern int fstatat64(int, const char *, struct stat64 *, int);
#endif /* defined (_ATFILE_SOURCE) */
#endif
+#if defined(__EXTENSIONS__) || \
+ (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
+ /* || defined(_XPG7) */
+extern int futimens(int, const struct timespec[2]);
+extern int utimensat(int, const char *, const struct timespec[2], int);
+#endif /* defined(__EXTENSIONS__) ... */
+
#else /* !__STDC__ */
#if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2) || \
@@ -523,6 +536,13 @@ extern int fstatat64();
#endif /* defined (_ATFILE_SOURCE) */
#endif
+#if defined(__EXTENSIONS__) || \
+ (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
+ /* || defined(_XPG7) */
+extern int futimens();
+extern int utimensat();
+#endif /* defined(__EXTENSIONS__) ... */
+
#endif /* defined(__STDC__) */
#include <sys/stat_impl.h>