diff options
author | Paul E. Murphy <murphyp@linux.ibm.com> | 2021-01-22 13:55:45 -0600 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-02-05 13:35:20 -0500 |
commit | 9c9d63b15ad548f65f8bfd41cb7a4ef9af5ccb28 (patch) | |
tree | d232965a0537906ce89ec096cd97ac943991a6b7 /gnulib/import/time.in.h | |
parent | 0110ec824ef40f3f08b8670bdfa2160d157e2000 (diff) | |
download | gdb-9c9d63b15ad548f65f8bfd41cb7a4ef9af5ccb28.zip gdb-9c9d63b15ad548f65f8bfd41cb7a4ef9af5ccb28.tar.gz gdb-9c9d63b15ad548f65f8bfd41cb7a4ef9af5ccb28.tar.bz2 |
gnulib: update to 776af40e0
This fixes PR27184, a failure to compile gdb due to
cdefs.h being out of sync with glibc on ppc64le targets
which are compiled with -mabi=ieeelongdouble and glibc
2.32.
Likewise, update usage of _GL_ATTRIBUTE_FORMAT_PRINTF to
_GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD.
Likewise, disable newly added rpl_free gnulib api in
gdbserver support libraries.
Likewise, undefine read/write macros before redefining them
on mingw targets.
Likewise, wrap C++ usage of free with GNULIB_NAMESPACE namespace
as needed.
Change-Id: I86517613c0d8ac8f5ea45bbc4ebe2b54a3aef29f
Diffstat (limited to 'gnulib/import/time.in.h')
-rw-r--r-- | gnulib/import/time.in.h | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/gnulib/import/time.in.h b/gnulib/import/time.in.h index 1d11650..1385980 100644 --- a/gnulib/import/time.in.h +++ b/gnulib/import/time.in.h @@ -1,6 +1,6 @@ /* A more-standard <time.h>. - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2021 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -101,6 +101,25 @@ struct __time_t_must_be_integral { # define GNULIB_defined_struct_time_t_must_be_integral 1 # endif +/* Define TIME_UTC, a positive integer constant used for timespec_get(). */ +# if ! @TIME_H_DEFINES_TIME_UTC@ +# if !GNULIB_defined_TIME_UTC +# define TIME_UTC 1 +# define GNULIB_defined_TIME_UTC 1 +# endif +# endif + +/* Set *TS to the current time, and return BASE. + Upon failure, return 0. */ +# if @GNULIB_TIMESPEC_GET@ +# if ! @HAVE_TIMESPEC_GET@ +_GL_FUNCDECL_SYS (timespec_get, int, (struct timespec *ts, int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (timespec_get, int, (struct timespec *ts, int base)); +_GL_CXXALIASWARN (timespec_get); +# 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>. */ @@ -135,10 +154,27 @@ _GL_CXXALIASWARN (nanosleep); # endif _GL_FUNCDECL_RPL (tzset, void, (void)); _GL_CXXALIAS_RPL (tzset, void, (void)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef tzset +# define tzset _tzset +# endif +_GL_CXXALIAS_MDA (tzset, void, (void)); # else -# if ! @HAVE_TZSET@ -_GL_FUNCDECL_SYS (tzset, void, (void)); +_GL_CXXALIAS_SYS (tzset, void, (void)); +# endif +_GL_CXXALIASWARN (tzset); +# elif @GNULIB_MDA_TZSET@ +/* On native Windows, map 'tzset' to '_tzset', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::tzset always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef tzset +# define tzset _tzset # endif +_GL_CXXALIAS_MDA (tzset, void, (void)); +# else _GL_CXXALIAS_SYS (tzset, void, (void)); # endif _GL_CXXALIASWARN (tzset); @@ -350,17 +386,17 @@ _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " # endif # if defined GNULIB_POSIXCHECK # undef asctime_r -_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - " +_GL_WARN_ON_USE (asctime_r, "asctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef ctime -_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - " +_GL_WARN_ON_USE (ctime, "ctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef ctime_r -_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - " +_GL_WARN_ON_USE (ctime_r, "ctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif |