[newlib-cygwin/main] libc: Added timespec_get() to time.h
Corinna Vinschen
corinna@sourceware.org
Tue Jun 24 08:20:42 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a297e7de0957014c08be70aab777fe65d270066d
commit a297e7de0957014c08be70aab777fe65d270066d
Author: Mazen Adel Elmessady <mez3n1151@gmail.com>
AuthorDate: Mon Jun 23 18:24:00 2025 +0300
Commit: Corinna Vinschen <corinna@vinschen.de>
CommitDate: Tue Jun 24 10:13:57 2025 +0200
libc: Added timespec_get() to time.h
Added timespec_get() prototype to libc/include/time.h
and removed the prototype from winsup/cygwin/include/cygwin/time.h
Diff:
---
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 ab3491341ecd..a2df4f7fd87d 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 9b63e9aeb6ce..d7f9d3f75b15 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
More information about the Newlib-cvs
mailing list