diff options
author | Po Lu <luangruo@yahoo.com> | 2023-03-11 09:55:05 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2023-03-11 09:55:05 +0800 |
commit | f573ce3f66daefbb26dec079581eb7cc755a9b3c (patch) | |
tree | df88bcbaffe1f0bc1ee38209e8d7cffc6e0fad7b /lib | |
parent | 248b34596159c460a4afd152035e226c44cf31fd (diff) | |
parent | c6bfffa9fe1af7f4f806e5533ba5f3c33476cf9a (diff) | |
download | emacs-f573ce3f66daefbb26dec079581eb7cc755a9b3c.tar.gz |
Merge remote-tracking branch 'origin/master' into feature/android
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gnulib.mk.in | 12 | ||||
-rw-r--r-- | lib/stdio.in.h | 11 | ||||
-rw-r--r-- | lib/time.in.h | 14 |
3 files changed, 33 insertions, 4 deletions
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index a5be32427b6..ca4df18458c 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in @@ -159,7 +159,7 @@ # sys_stat \ # sys_time \ # tempname \ -# time \ +# time-h \ # time_r \ # time_rz \ # timegm \ @@ -722,6 +722,7 @@ GL_GNULIB_SYSTEM_POSIX = @GL_GNULIB_SYSTEM_POSIX@ GL_GNULIB_TANF = @GL_GNULIB_TANF@ GL_GNULIB_TANHF = @GL_GNULIB_TANHF@ GL_GNULIB_TANL = @GL_GNULIB_TANL@ +GL_GNULIB_TIME = @GL_GNULIB_TIME@ GL_GNULIB_TIMEGM = @GL_GNULIB_TIMEGM@ GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@ GL_GNULIB_TIMESPEC_GETRES = @GL_GNULIB_TIMESPEC_GETRES@ @@ -1535,6 +1536,7 @@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TANF = @REPLACE_TANF@ REPLACE_TANHF = @REPLACE_TANHF@ +REPLACE_TIME = @REPLACE_TIME@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TIMESPEC_GET = @REPLACE_TIMESPEC_GET@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ @@ -4574,8 +4576,8 @@ EXTRA_DIST += tempname.h endif ## end gnulib module tempname -## begin gnulib module time -ifeq (,$(OMIT_GNULIB_MODULE_time)) +## begin gnulib module time-h +ifeq (,$(OMIT_GNULIB_MODULE_time-h)) BUILT_SOURCES += time.h @@ -4594,6 +4596,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's/@''GNULIB_NANOSLEEP''@/$(GL_GNULIB_NANOSLEEP)/g' \ -e 's/@''GNULIB_STRFTIME''@/$(GL_GNULIB_STRFTIME)/g' \ -e 's/@''GNULIB_STRPTIME''@/$(GL_GNULIB_STRPTIME)/g' \ + -e 's/@''GNULIB_TIME''@/$(GL_GNULIB_TIME)/g' \ -e 's/@''GNULIB_TIMEGM''@/$(GL_GNULIB_TIMEGM)/g' \ -e 's/@''GNULIB_TIMESPEC_GET''@/$(GL_GNULIB_TIMESPEC_GET)/g' \ -e 's/@''GNULIB_TIMESPEC_GETRES''@/$(GL_GNULIB_TIMESPEC_GETRES)/g' \ @@ -4615,6 +4618,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \ + -e 's|@''REPLACE_TIME''@|$(REPLACE_TIME)|g' \ -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -e 's|@''REPLACE_TIMESPEC_GET''@|$(REPLACE_TIMESPEC_GET)|g' \ -e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \ @@ -4633,7 +4637,7 @@ MOSTLYCLEANFILES += time.h time.h-t EXTRA_DIST += time.in.h endif -## end gnulib module time +## end gnulib module time-h ## begin gnulib module time_r ifeq (,$(OMIT_GNULIB_MODULE_time_r)) diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 3f8ea985335..098f841738c 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -36,6 +36,12 @@ #ifndef _@GUARD_PREFIX@_STDIO_H +/* Suppress macOS deprecation warnings for sprintf and vsprintf. */ +#if (defined __APPLE__ && defined __MACH__) && !defined _POSIX_C_SOURCE +# define _POSIX_C_SOURCE 200809L +# define _GL_DEFINED__POSIX_C_SOURCE +#endif + #define _GL_ALREADY_INCLUDING_STDIO_H /* The include_next requires a split double-inclusion guard. */ @@ -43,6 +49,11 @@ #undef _GL_ALREADY_INCLUDING_STDIO_H +#ifdef _GL_DEFINED__POSIX_C_SOURCE +# undef _GL_DEFINED__POSIX_C_SOURCE +# undef _POSIX_C_SOURCE +#endif + #ifndef _@GUARD_PREFIX@_STDIO_H #define _@GUARD_PREFIX@_STDIO_H diff --git a/lib/time.in.h b/lib/time.in.h index 87cda21413b..3f9af920e34 100644 --- a/lib/time.in.h +++ b/lib/time.in.h @@ -143,6 +143,20 @@ _GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec *ts, int base)); _GL_CXXALIASWARN (timespec_getres); # endif +/* Return the number of seconds that have elapsed since the Epoch. */ +# if @GNULIB_TIME@ +# if @REPLACE_TIME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define time rpl_time +# endif +_GL_FUNCDECL_RPL (time, time_t, (time_t *__tp)); +_GL_CXXALIAS_RPL (time, time_t, (time_t *__tp)); +# else +_GL_CXXALIAS_SYS (time, time_t, (time_t *__tp)); +# endif +_GL_CXXALIASWARN (time); +# endif + /* Sleep for at least RQTP seconds unless interrupted, If interrupted, return -1 and store the remaining time into RMTP. See <https://pubs.opengroup.org/onlinepubs/9699919799/functions/nanosleep.html>. */ |