summaryrefslogtreecommitdiffstats
path: root/sys/sys/time.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-05-13 10:58:14 +0000
committerpeter <peter@FreeBSD.org>1997-05-13 10:58:14 +0000
commitc67b6ed92cf41abef3d58c2ab95aa585e2ee91cf (patch)
treede3dbc2a4fa5fafa403221434a25d967eb3c7088 /sys/sys/time.h
parentb0fdd73677eea5df875efc2599d480f7d29fa246 (diff)
downloadFreeBSD-src-c67b6ed92cf41abef3d58c2ab95aa585e2ee91cf.zip
FreeBSD-src-c67b6ed92cf41abef3d58c2ab95aa585e2ee91cf.tar.gz
struct timespec needs to be useable with just <time.h>, but needs to not
conflict with the kernel visible one. Make the new stuff not visible if _ANSI_SOURCE or _POSIX_SOURCE is defined (!) because the new things are not part of the base 1003.1-1990 standard or ansi (says Bruce). Reviewed by: bde
Diffstat (limited to 'sys/sys/time.h')
-rw-r--r--sys/sys/time.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/sys/time.h b/sys/sys/time.h
index f7c5260..27c2c19 100644
--- a/sys/sys/time.h
+++ b/sys/sys/time.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)time.h 8.5 (Berkeley) 5/4/95
- * $Id: time.h,v 1.12 1997/03/22 06:53:24 bde Exp $
+ * $Id: time.h,v 1.13 1997/05/08 13:48:47 peter Exp $
*/
#ifndef _SYS_TIME_H_
@@ -48,13 +48,13 @@ struct timeval {
long tv_usec; /* and microseconds */
};
-/*
- * Structure defined by POSIX.4 to be like a timeval.
- */
+#ifndef _TIMESPEC_DECLARED
+#define _TIMESPEC_DECLARED
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* and nanoseconds */
};
+#endif
#define TIMEVAL_TO_TIMESPEC(tv, ts) { \
(ts)->tv_sec = (tv)->tv_sec; \
OpenPOWER on IntegriCloud