[PATCH v4 1/5] libc: Added timespec_get() to time.h
Mazen Adel Elmessady <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
Added timespec_get() prototype to libc/include/time.h and removed the prototype from winsup/cygwin/include/cygwin/time.h --- newlib/libc/include/time.h | 5 +++++ winsup/cygwin/include/cygwin/time.h | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/newlib/libc/include/time.h b/newlib/libc/include/time.h index ab3491341..a2df4f7fd 100644 --- a/newlib/libc/include/time.h +++ b/newlib/libc/include/time.h @@ -57,6 +57,11 @@ clock_t clock (void); double difftime (time_t _time2, time_t _time1); time_t mktime (struct tm *_timeptr); time_t time (time_t *_timer); +#if (__ISO_C_VISIBLE >= 2011 || __POSIX_VISIBLE >= 202405) +#define TIME_UTC 1 + +int timespec_get(struct timespec *ts, int base); +#endif #ifndef _REENT_ONLY char *asctime (const struct tm *_tblock); char *ctime (const time_t *_time); diff --git a/winsup/cygwin/include/cygwin/time.h b/winsup/cygwin/include/cygwin/time.h index 9b63e9aeb..d7f9d3f75 100644 --- a/winsup/cygwin/include/cygwin/time.h +++ b/winsup/cygwin/include/cygwin/time.h @@ -35,12 +35,6 @@ extern long timezone __asm__ (_SYMSTR (_timezone)); #endif /* __SVID_VISIBLE || __XSI_VISIBLE */ -#if __ISO_C_VISIBLE >= 2011 -#define TIME_UTC 1 - -extern int timespec_get (struct timespec *, int); -#endif - #ifdef __cplusplus } #endif -- 2.48.1