diff options
-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. */ |