Blame gnulib/lib/time.in.h

Packit Service a2ae7a
/* A more-standard <time.h>.
Packit Service a2ae7a
Packit Service a2ae7a
   Copyright (C) 2007-2019 Free Software Foundation, Inc.
Packit Service a2ae7a
Packit Service a2ae7a
   This program is free software; you can redistribute it and/or modify
Packit Service a2ae7a
   it under the terms of the GNU Lesser General Public License as published by
Packit Service a2ae7a
   the Free Software Foundation; either version 2.1, or (at your option)
Packit Service a2ae7a
   any later version.
Packit Service a2ae7a
Packit Service a2ae7a
   This program is distributed in the hope that it will be useful,
Packit Service a2ae7a
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service a2ae7a
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service a2ae7a
   GNU Lesser General Public License for more details.
Packit Service a2ae7a
Packit Service a2ae7a
   You should have received a copy of the GNU Lesser General Public License
Packit Service a2ae7a
   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
Packit Service a2ae7a
Packit Service a2ae7a
#if __GNUC__ >= 3
Packit Service a2ae7a
@PRAGMA_SYSTEM_HEADER@
Packit Service a2ae7a
#endif
Packit Service a2ae7a
@PRAGMA_COLUMNS@
Packit Service a2ae7a
Packit Service a2ae7a
/* Don't get in the way of glibc when it includes time.h merely to
Packit Service a2ae7a
   declare a few standard symbols, rather than to declare all the
Packit Service a2ae7a
   symbols.  (However, skip this for MinGW as it treats __need_time_t
Packit Service a2ae7a
   incompatibly.)  Also, Solaris 8 <time.h> eventually includes itself
Packit Service a2ae7a
   recursively; if that is happening, just include the system <time.h>
Packit Service a2ae7a
   without adding our own declarations.  */
Packit Service a2ae7a
#if (((defined __need_time_t || defined __need_clock_t \
Packit Service a2ae7a
       || defined __need_timespec)                     \
Packit Service a2ae7a
      && !defined __MINGW32__)                         \
Packit Service a2ae7a
     || defined _@GUARD_PREFIX@_TIME_H)
Packit Service a2ae7a
Packit Service a2ae7a
# @INCLUDE_NEXT@ @NEXT_TIME_H@
Packit Service a2ae7a
Packit Service a2ae7a
#else
Packit Service a2ae7a
Packit Service a2ae7a
# define _@GUARD_PREFIX@_TIME_H
Packit Service a2ae7a
Packit Service a2ae7a
# @INCLUDE_NEXT@ @NEXT_TIME_H@
Packit Service a2ae7a
Packit Service a2ae7a
/* NetBSD 5.0 mis-defines NULL.  */
Packit Service a2ae7a
# include <stddef.h>
Packit Service a2ae7a
Packit Service a2ae7a
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
Packit Service a2ae7a
Packit Service a2ae7a
/* The definition of _GL_ARG_NONNULL is copied here.  */
Packit Service a2ae7a
Packit Service a2ae7a
/* The definition of _GL_WARN_ON_USE is copied here.  */
Packit Service a2ae7a
Packit Service a2ae7a
/* Some systems don't define struct timespec (e.g., AIX 4.1).
Packit Service a2ae7a
   Or they define it with the wrong member names or define it in <sys/time.h>
Packit Service a2ae7a
   (e.g., FreeBSD circa 1997).  Stock Mingw prior to 3.0 does not define it,
Packit Service a2ae7a
   but the pthreads-win32 library defines it in <pthread.h>.  */
Packit Service a2ae7a
# if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@
Packit Service a2ae7a
#  if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
Packit Service a2ae7a
#   include <sys/time.h>
Packit Service a2ae7a
#  elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
Packit Service a2ae7a
#   include <pthread.h>
Packit Service a2ae7a
#  elif @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
Packit Service a2ae7a
#   include <unistd.h>
Packit Service a2ae7a
#  else
Packit Service a2ae7a
Packit Service a2ae7a
#   ifdef __cplusplus
Packit Service a2ae7a
extern "C" {
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
Packit Service a2ae7a
#   if !GNULIB_defined_struct_timespec
Packit Service a2ae7a
#    undef timespec
Packit Service a2ae7a
#    define timespec rpl_timespec
Packit Service a2ae7a
struct timespec
Packit Service a2ae7a
{
Packit Service a2ae7a
  time_t tv_sec;
Packit Service a2ae7a
  long int tv_nsec;
Packit Service a2ae7a
};
Packit Service a2ae7a
#    define GNULIB_defined_struct_timespec 1
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
Packit Service a2ae7a
#   ifdef __cplusplus
Packit Service a2ae7a
}
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
# endif
Packit Service a2ae7a
Packit Service a2ae7a
# if !GNULIB_defined_struct_time_t_must_be_integral
Packit Service a2ae7a
/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires
Packit Service a2ae7a
   time_t to be an integer type, even though C99 permits floating
Packit Service a2ae7a
   point.  We don't know of any implementation that uses floating
Packit Service a2ae7a
   point, and it is much easier to write code that doesn't have to
Packit Service a2ae7a
   worry about that corner case, so we force the issue.  */
Packit Service a2ae7a
struct __time_t_must_be_integral {
Packit Service a2ae7a
  unsigned int __floating_time_t_unsupported : (time_t) 1;
Packit Service a2ae7a
};
Packit Service a2ae7a
#  define GNULIB_defined_struct_time_t_must_be_integral 1
Packit Service a2ae7a
# endif
Packit Service a2ae7a
Packit Service a2ae7a
/* Sleep for at least RQTP seconds unless interrupted,  If interrupted,
Packit Service a2ae7a
   return -1 and store the remaining time into RMTP.  See
Packit Service a2ae7a
   <http://www.opengroup.org/susv3xsh/nanosleep.html>.  */
Packit Service a2ae7a
# if @GNULIB_NANOSLEEP@
Packit Service a2ae7a
#  if @REPLACE_NANOSLEEP@
Packit Service a2ae7a
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2ae7a
#    define nanosleep rpl_nanosleep
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
_GL_FUNCDECL_RPL (nanosleep, int,
Packit Service a2ae7a
                  (struct timespec const *__rqtp, struct timespec *__rmtp)
Packit Service a2ae7a
                  _GL_ARG_NONNULL ((1)));
Packit Service a2ae7a
_GL_CXXALIAS_RPL (nanosleep, int,
Packit Service a2ae7a
                  (struct timespec const *__rqtp, struct timespec *__rmtp));
Packit Service a2ae7a
#  else
Packit Service a2ae7a
#   if ! @HAVE_NANOSLEEP@
Packit Service a2ae7a
_GL_FUNCDECL_SYS (nanosleep, int,
Packit Service a2ae7a
                  (struct timespec const *__rqtp, struct timespec *__rmtp)
Packit Service a2ae7a
                  _GL_ARG_NONNULL ((1)));
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
_GL_CXXALIAS_SYS (nanosleep, int,
Packit Service a2ae7a
                  (struct timespec const *__rqtp, struct timespec *__rmtp));
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
_GL_CXXALIASWARN (nanosleep);
Packit Service a2ae7a
# endif
Packit Service a2ae7a
Packit Service a2ae7a
/* Initialize time conversion information.  */
Packit Service a2ae7a
# if @GNULIB_TZSET@
Packit Service a2ae7a
#  if @REPLACE_TZSET@
Packit Service a2ae7a
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2ae7a
#    undef tzset
Packit Service a2ae7a
#    define tzset rpl_tzset
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
_GL_FUNCDECL_RPL (tzset, void, (void));
Packit Service a2ae7a
_GL_CXXALIAS_RPL (tzset, void, (void));
Packit Service a2ae7a
#  else
Packit Service a2ae7a
#   if ! @HAVE_TZSET@
Packit Service a2ae7a
_GL_FUNCDECL_SYS (tzset, void, (void));
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
_GL_CXXALIAS_SYS (tzset, void, (void));
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
_GL_CXXALIASWARN (tzset);
Packit Service a2ae7a
# endif
Packit Service a2ae7a
Packit Service a2ae7a
/* Return the 'time_t' representation of TP and normalize TP.  */
Packit Service a2ae7a
# if @GNULIB_MKTIME@
Packit Service a2ae7a
#  if @REPLACE_MKTIME@
Packit Service a2ae7a
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2ae7a
#    define mktime rpl_mktime
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
_GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1)));
Packit Service a2ae7a
_GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp));
Packit Service a2ae7a
#  else
Packit Service a2ae7a
_GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp));
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
_GL_CXXALIASWARN (mktime);
Packit Service a2ae7a
# endif
Packit Service a2ae7a
Packit Service a2ae7a
/* Convert TIMER to RESULT, assuming local time and UTC respectively.  See
Packit Service a2ae7a
   <http://www.opengroup.org/susv3xsh/localtime_r.html> and
Packit Service a2ae7a
   <http://www.opengroup.org/susv3xsh/gmtime_r.html>.  */
Packit Service a2ae7a
# if @GNULIB_TIME_R@
Packit Service a2ae7a
#  if @REPLACE_LOCALTIME_R@
Packit Service a2ae7a
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2ae7a
#    undef localtime_r
Packit Service a2ae7a
#    define localtime_r rpl_localtime_r
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
_GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer,
Packit Service a2ae7a
                                             struct tm *restrict __result)
Packit Service a2ae7a
                                            _GL_ARG_NONNULL ((1, 2)));
Packit Service a2ae7a
_GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer,
Packit Service a2ae7a
                                             struct tm *restrict __result));
Packit Service a2ae7a
#  else
Packit Service a2ae7a
#   if ! @HAVE_DECL_LOCALTIME_R@
Packit Service a2ae7a
_GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer,
Packit Service a2ae7a
                                             struct tm *restrict __result)
Packit Service a2ae7a
                                            _GL_ARG_NONNULL ((1, 2)));
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
_GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer,
Packit Service a2ae7a
                                             struct tm *restrict __result));
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
#  if @HAVE_DECL_LOCALTIME_R@
Packit Service a2ae7a
_GL_CXXALIASWARN (localtime_r);
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
#  if @REPLACE_LOCALTIME_R@
Packit Service a2ae7a
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2ae7a
#    undef gmtime_r
Packit Service a2ae7a
#    define gmtime_r rpl_gmtime_r
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
_GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer,
Packit Service a2ae7a
                                          struct tm *restrict __result)
Packit Service a2ae7a
                                         _GL_ARG_NONNULL ((1, 2)));
Packit Service a2ae7a
_GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer,
Packit Service a2ae7a
                                          struct tm *restrict __result));
Packit Service a2ae7a
#  else
Packit Service a2ae7a
#   if ! @HAVE_DECL_LOCALTIME_R@
Packit Service a2ae7a
_GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer,
Packit Service a2ae7a
                                          struct tm *restrict __result)
Packit Service a2ae7a
                                         _GL_ARG_NONNULL ((1, 2)));
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
_GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer,
Packit Service a2ae7a
                                          struct tm *restrict __result));
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
#  if @HAVE_DECL_LOCALTIME_R@
Packit Service a2ae7a
_GL_CXXALIASWARN (gmtime_r);
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
# endif
Packit Service a2ae7a
Packit Service a2ae7a
/* Convert TIMER to RESULT, assuming local time and UTC respectively.  See
Packit Service a2ae7a
   <http://www.opengroup.org/susv3xsh/localtime.html> and
Packit Service a2ae7a
   <http://www.opengroup.org/susv3xsh/gmtime.html>.  */
Packit Service a2ae7a
# if @GNULIB_LOCALTIME@ || @REPLACE_LOCALTIME@
Packit Service a2ae7a
#  if @REPLACE_LOCALTIME@
Packit Service a2ae7a
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2ae7a
#    undef localtime
Packit Service a2ae7a
#    define localtime rpl_localtime
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
_GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer)
Packit Service a2ae7a
                                          _GL_ARG_NONNULL ((1)));
Packit Service a2ae7a
_GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer));
Packit Service a2ae7a
#  else
Packit Service a2ae7a
_GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer));
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
_GL_CXXALIASWARN (localtime);
Packit Service a2ae7a
# endif
Packit Service a2ae7a
Packit Service a2ae7a
# if 0 || @REPLACE_GMTIME@
Packit Service a2ae7a
#  if @REPLACE_GMTIME@
Packit Service a2ae7a
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2ae7a
#    undef gmtime
Packit Service a2ae7a
#    define gmtime rpl_gmtime
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
_GL_FUNCDECL_RPL (gmtime, struct tm *, (time_t const *__timer)
Packit Service a2ae7a
                                       _GL_ARG_NONNULL ((1)));
Packit Service a2ae7a
_GL_CXXALIAS_RPL (gmtime, struct tm *, (time_t const *__timer));
Packit Service a2ae7a
#  else
Packit Service a2ae7a
_GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer));
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
_GL_CXXALIASWARN (gmtime);
Packit Service a2ae7a
# endif
Packit Service a2ae7a
Packit Service a2ae7a
/* Parse BUF as a timestamp, assuming FORMAT specifies its layout, and store
Packit Service a2ae7a
   the resulting broken-down time into TM.  See
Packit Service a2ae7a
   <http://www.opengroup.org/susv3xsh/strptime.html>.  */
Packit Service a2ae7a
# if @GNULIB_STRPTIME@
Packit Service a2ae7a
#  if ! @HAVE_STRPTIME@
Packit Service a2ae7a
_GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf,
Packit Service a2ae7a
                                     char const *restrict __format,
Packit Service a2ae7a
                                     struct tm *restrict __tm)
Packit Service a2ae7a
                                    _GL_ARG_NONNULL ((1, 2, 3)));
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
_GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf,
Packit Service a2ae7a
                                     char const *restrict __format,
Packit Service a2ae7a
                                     struct tm *restrict __tm));
Packit Service a2ae7a
_GL_CXXALIASWARN (strptime);
Packit Service a2ae7a
# endif
Packit Service a2ae7a
Packit Service a2ae7a
/* Convert *TP to a date and time string.  See
Packit Service a2ae7a
   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ctime.html>.  */
Packit Service a2ae7a
# if @GNULIB_CTIME@
Packit Service a2ae7a
#  if @REPLACE_CTIME@
Packit Service a2ae7a
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2ae7a
#    define ctime rpl_ctime
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
_GL_FUNCDECL_RPL (ctime, char *, (time_t const *__tp)
Packit Service a2ae7a
                                 _GL_ARG_NONNULL ((1)));
Packit Service a2ae7a
_GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp));
Packit Service a2ae7a
#  else
Packit Service a2ae7a
_GL_CXXALIAS_SYS (ctime, char *, (time_t const *__tp));
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
_GL_CXXALIASWARN (ctime);
Packit Service a2ae7a
# endif
Packit Service a2ae7a
Packit Service a2ae7a
/* Convert *TP to a date and time string.  See
Packit Service a2ae7a
   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html>.  */
Packit Service a2ae7a
# if @GNULIB_STRFTIME@
Packit Service a2ae7a
#  if @REPLACE_STRFTIME@
Packit Service a2ae7a
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2ae7a
#    define strftime rpl_strftime
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
_GL_FUNCDECL_RPL (strftime, size_t, (char *__buf, size_t __bufsize,
Packit Service a2ae7a
                                     const char *__fmt, const struct tm *__tp)
Packit Service a2ae7a
                                    _GL_ARG_NONNULL ((1, 3, 4)));
Packit Service a2ae7a
_GL_CXXALIAS_RPL (strftime, size_t, (char *__buf, size_t __bufsize,
Packit Service a2ae7a
                                     const char *__fmt, const struct tm *__tp));
Packit Service a2ae7a
#  else
Packit Service a2ae7a
_GL_CXXALIAS_SYS (strftime, size_t, (char *__buf, size_t __bufsize,
Packit Service a2ae7a
                                     const char *__fmt, const struct tm *__tp));
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
_GL_CXXALIASWARN (strftime);
Packit Service a2ae7a
# endif
Packit Service a2ae7a
Packit Service a2ae7a
# if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@
Packit Service a2ae7a
typedef struct tm_zone *timezone_t;
Packit Service a2ae7a
_GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name));
Packit Service a2ae7a
_GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name));
Packit Service a2ae7a
_GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz));
Packit Service a2ae7a
_GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz));
Packit Service a2ae7a
_GL_FUNCDECL_SYS (localtime_rz, struct tm *,
Packit Service a2ae7a
                  (timezone_t __tz, time_t const *restrict __timer,
Packit Service a2ae7a
                   struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3)));
Packit Service a2ae7a
_GL_CXXALIAS_SYS (localtime_rz, struct tm *,
Packit Service a2ae7a
                  (timezone_t __tz, time_t const *restrict __timer,
Packit Service a2ae7a
                   struct tm *restrict __result));
Packit Service a2ae7a
_GL_FUNCDECL_SYS (mktime_z, time_t,
Packit Service a2ae7a
                  (timezone_t __tz, struct tm *restrict __result)
Packit Service a2ae7a
                  _GL_ARG_NONNULL ((2)));
Packit Service a2ae7a
_GL_CXXALIAS_SYS (mktime_z, time_t,
Packit Service a2ae7a
                  (timezone_t __tz, struct tm *restrict __result));
Packit Service a2ae7a
# endif
Packit Service a2ae7a
Packit Service a2ae7a
/* Convert TM to a time_t value, assuming UTC.  */
Packit Service a2ae7a
# if @GNULIB_TIMEGM@
Packit Service a2ae7a
#  if @REPLACE_TIMEGM@
Packit Service a2ae7a
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service a2ae7a
#    undef timegm
Packit Service a2ae7a
#    define timegm rpl_timegm
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
_GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1)));
Packit Service a2ae7a
_GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm));
Packit Service a2ae7a
#  else
Packit Service a2ae7a
#   if ! @HAVE_TIMEGM@
Packit Service a2ae7a
_GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1)));
Packit Service a2ae7a
#   endif
Packit Service a2ae7a
_GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm));
Packit Service a2ae7a
#  endif
Packit Service a2ae7a
_GL_CXXALIASWARN (timegm);
Packit Service a2ae7a
# endif
Packit Service a2ae7a
Packit Service a2ae7a
/* Encourage applications to avoid unsafe functions that can overrun
Packit Service a2ae7a
   buffers when given outlandish struct tm values.  Portable
Packit Service a2ae7a
   applications should use strftime (or even sprintf) instead.  */
Packit Service a2ae7a
# if defined GNULIB_POSIXCHECK
Packit Service a2ae7a
#  undef asctime
Packit Service a2ae7a
_GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - "
Packit Service a2ae7a
                 "better use strftime (or even sprintf) instead");
Packit Service a2ae7a
# endif
Packit Service a2ae7a
# if defined GNULIB_POSIXCHECK
Packit Service a2ae7a
#  undef asctime_r
Packit Service a2ae7a
_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - "
Packit Service a2ae7a
                 "better use strftime (or even sprintf) instead");
Packit Service a2ae7a
# endif
Packit Service a2ae7a
# if defined GNULIB_POSIXCHECK
Packit Service a2ae7a
#  undef ctime
Packit Service a2ae7a
_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - "
Packit Service a2ae7a
                 "better use strftime (or even sprintf) instead");
Packit Service a2ae7a
# endif
Packit Service a2ae7a
# if defined GNULIB_POSIXCHECK
Packit Service a2ae7a
#  undef ctime_r
Packit Service a2ae7a
_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - "
Packit Service a2ae7a
                 "better use strftime (or even sprintf) instead");
Packit Service a2ae7a
# endif
Packit Service a2ae7a
Packit Service a2ae7a
#endif