diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2011-03-12 20:34:10 +0100 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-06-15 14:00:21 +0200 |
commit | 095028ece7126ae09cf5276d8a6fbfa6af5f0fba (patch) | |
tree | 9c1a5df8e270e51057350110ba62c4a2162d72bd | |
parent | 42c814f424e34813126169d3bb39ee95fe5eb692 (diff) |
time.h: update and guard internals
guard internal constant with _LIBC
strftime_l is SuSv4
reorder a bit to ease syncing with glibc
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-rw-r--r-- | include/time.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/include/time.h b/include/time.h index 65071a908..bea562399 100644 --- a/include/time.h +++ b/include/time.h @@ -1,5 +1,4 @@ -/* Copyright (C) 1991-1999,2000,2001,2002,2003,2006 - Free Software Foundation, Inc. +/* Copyright (C) 1991-2003,2006,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -195,7 +194,9 @@ extern double difftime (time_t __time1, time_t __time0) __THROW __attribute__ ((__const__)); #endif /* __UCLIBC_HAS_FLOATS__ */ -#define CLOCK_IDFIELD_SIZE 3 +#ifdef _LIBC +# define CLOCK_IDFIELD_SIZE 3 +#endif /* Return the `time_t' representation of TP and normalize TP. */ extern time_t mktime (struct tm *__tp) __THROW; @@ -218,7 +219,7 @@ extern char *strptime (__const char *__restrict __s, # endif #ifdef __UCLIBC_HAS_XLOCALE__ -# ifdef __USE_GNU +# ifdef __USE_XOPEN2K8 /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ # include <xlocale.h> @@ -228,7 +229,9 @@ extern size_t strftime_l (char *__restrict __s, size_t __maxsize, __const struct tm *__restrict __tp, __locale_t __loc) __THROW; libc_hidden_proto(strftime_l) +# endif +# ifdef __USE_GNU extern char *strptime_l (__const char *__restrict __s, __const char *__restrict __fmt, struct tm *__tp, __locale_t __loc) __THROW; @@ -361,8 +364,9 @@ extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW; extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) __THROW; # endif /* __UCLIBC_HAS_REALTIME__ */ -# ifdef __UCLIBC_HAS_THREADS_NATIVE__ -# if defined __USE_XOPEN2K && defined __UCLIBC_HAS_ADVANCED_REALTIME__ + +# if defined __USE_XOPEN2K && defined __UCLIBC_HAS_ADVANCED_REALTIME__ +# ifdef __UCLIBC_HAS_THREADS_NATIVE__ /* High-resolution sleep with the specified clock. This function is a cancellation point and therefore not marked with @@ -373,8 +377,8 @@ extern int clock_nanosleep (clockid_t __clock_id, int __flags, /* Return clock ID for CPU-time clock. */ extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW; -# endif -# endif /* __UCLIBC_HAS_THREADS_NATIVE__ */ +# endif /* __UCLIBC_HAS_THREADS_NATIVE__ */ +# endif # if defined __UCLIBC_HAS_REALTIME__ /* Create new per-process timer using CLOCK_ID. */ |