diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2002-09-03 19:40:36 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2002-09-03 19:40:36 +0000 |
commit | 3db40db7d83ca924a935680b1c210dd11f1f660d (patch) | |
tree | 23107e83a2372c0eac6bc5831e818d07679240ff /newlib/libc/sys/linux/include/time.h | |
parent | 20fb0cc51373af49a4f89759ceb16c5933dfb989 (diff) | |
download | cygnal-3db40db7d83ca924a935680b1c210dd11f1f660d.tar.gz cygnal-3db40db7d83ca924a935680b1c210dd11f1f660d.tar.bz2 cygnal-3db40db7d83ca924a935680b1c210dd11f1f660d.zip |
2002-09-03 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/_types.h (_flock_t): Added.
* libc/include/sys/lock.h (__lock_try_acquire): New interface.
(__lock_try_acquire_recursive): Ditto.
* libc/include/sys/reent.h (__sFILE, __sFILE64): Add new
_lock field.
* libc/stdio/findfp.c (std)[!__SINGLE_THREAD__]: Initialize _lock
field.
* libc/stdio/fopen.c (_fopen_r)[!__SINGLE_THREAD__]: Ditto.
* libc/stdio64/fopen64.c (_fopen64_r)[!__SINGLE_THREAD__]: Ditto.
* libc/sys/linux/include/time.h (struct timespec): Moved from
<sys/types.h> and added check for __need_timespec flag so type
can be defined by itself.
* libc/sys/linux/sys/_types.h (_flock_t): New type.
* libc/sys/linux/sys/types.h (struct timespec): Moved to
<time.h>.
Diffstat (limited to 'newlib/libc/sys/linux/include/time.h')
-rw-r--r-- | newlib/libc/sys/linux/include/time.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/newlib/libc/sys/linux/include/time.h b/newlib/libc/sys/linux/include/time.h index 2db33242e..8b4b28460 100644 --- a/newlib/libc/sys/linux/include/time.h +++ b/newlib/libc/sys/linux/include/time.h @@ -5,7 +5,6 @@ */ #ifndef _TIME_H_ -#define _TIME_H_ #include "_ansi.h" #include <sys/reent.h> @@ -21,6 +20,20 @@ extern "C" { /* Get _CLOCKS_PER_SEC_ */ #include <machine/time.h> +#include <sys/types.h> + +/* Time Value Specification Structures, P1003.1b-1993, p. 261 */ +#ifndef _STRUCT_TIMESPEC +#define _STRUCT_TIMESPEC +struct timespec { + time_t tv_sec; /* Seconds */ + long tv_nsec; /* Nanoseconds */ +}; +#endif /* !_STRUCT_TIMESPEC */ + +#ifndef __need_timespec + +#define _TIME_H_ 1 #ifndef _CLOCKS_PER_SEC_ #define _CLOCKS_PER_SEC_ 1000 @@ -31,8 +44,6 @@ extern "C" { #define __need_size_t #include <stddef.h> -#include <sys/types.h> - struct tm { int tm_sec; @@ -208,5 +219,10 @@ int _EXFUN(clock_getenable_attr, (clockid_t clock_id, int *attr)); #ifdef __cplusplus } #endif + +#endif /* ! __need_timespec */ + +#undef __need_timespec + #endif /* _TIME_H_ */ |