Hash :
182afcba
Author :
Date :
2020-02-22T20:57:30
Use 'restrict' in all POSIX function declarations. * lib/iconv.in.h (iconv): Use 'restrict'. * lib/inttypes.in.h (strtoimax, strtoumax): Likewise. * lib/monetary.in.h (strfmon_l): Likewise. * lib/pthread.in.h (pthread_create, pthread_mutex_init, pthread_mutexattr_gettype, pthread_mutexattr_getrobust, pthread_mutex_timedlock, pthread_rwlock_init, pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock, pthread_cond_init, pthread_cond_wait, pthread_cond_timedwait): Likewise. * lib/search.in.h (tdelete): Likewise. * lib/signal.in.h (pthread_sigmask, sigprocmask): Likewise. * lib/stdio.in.h (dprintf, fgets, fopen, fprintf, fputs, fread, freopen, fscanf, fwrite, getdelim, getline, printf, scanf, snprintf, sprintf, vdprintf, vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf): Likewise. * lib/stdlib.in.h (mbtowc, realpath, strtod, strtold, strtoll, strtoull): Likewise. * lib/string.in.h (strncat): Likewise. * lib/sys_socket.in.h (accept, getpeername, getsockname, getsockopt, recvfrom): Likewise. * lib/sys_stat.in.h (fstatat, lstat, stat): Likewise. * lib/time.in.h (strftime): Likewise. * lib/unistd.in.h (readlink, readlinkat): Likewise. * lib/wchar.in.h (mbrtowc, mbrlen, mbsrtowcs, mbsnrtowcs, wcrtomb, wcsrtombs, wcsnrtombs, wmemcpy, wcscpy, wcpcpy, wcsncpy, wcpncpy, wcscat, wcsncat, wcsxfrm, wcsstr, wcstok, wcsftime): Likewise. * m4/iconv_h.m4 (gl_ICONV_H): Require AC_C_RESTRICT. * m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): Likewise. * m4/monetary_h.m4 (gl_MONETARY_H): Likewise. * m4/search_h.m4 (gl_SEARCH_H): Likewise. * m4/signal_h.m4 (gl_SIGNAL_H): Likewise. * m4/stdio_h.m4 (gl_STDIO_H): Likewise. * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise. * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise. * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise. * m4/unistd_h.m4 (gl_UNISTD_H): Likewise. * m4/wchar_h.m4 (gl_WCHAR_H): Likewise. * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Make consistent with the other *_h.m4 files. * m4/time_h.m4 (gl_HEADER_TIME_H): Likewise.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
# monetary_h.m4 serial 5
dnl Copyright (C) 2017-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN_ONCE([gl_MONETARY_H],
[
AC_REQUIRE([gl_MONETARY_H_DEFAULTS])
m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])])
AC_CHECK_HEADERS_ONCE([monetary.h])
dnl For now, we provide a <monetary.h> wrapper only if
dnl - module 'posixcheck' is present, or
dnl - C++ GNULIB_NAMESPACE support may be requested, or
dnl - the system already has a <monetary.h>.
if m4_ifdef([gl_POSIXCHECK], [true], [m4_ifdef([gl_ANSI_CXX], [test "$CXX" != no], [false]) || test $ac_cv_header_monetary_h = yes]); then
MONETARY_H='monetary.h'
gl_CHECK_NEXT_HEADERS([monetary.h])
if test $ac_cv_header_monetary_h = yes; then
HAVE_MONETARY_H=1
else
HAVE_MONETARY_H=0
fi
AC_SUBST([HAVE_MONETARY_H])
AC_CHECK_HEADERS_ONCE([xlocale.h])
if test $ac_cv_header_xlocale_h = yes; then
HAVE_XLOCALE_H=1
else
HAVE_XLOCALE_H=0
fi
AC_SUBST([HAVE_XLOCALE_H])
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[
#include <monetary.h>
]], [strfmon_l])
AC_REQUIRE([AC_C_RESTRICT])
else
MONETARY_H=''
fi
AC_SUBST([MONETARY_H])
AM_CONDITIONAL([GL_GENERATE_MONETARY_H], [test -n "$MONETARY_H"])
])
AC_DEFUN([gl_MONETARY_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_MONETARY_H_DEFAULTS])
gl_MODULE_INDICATOR_SET_VARIABLE([$1])
])
AC_DEFUN([gl_MONETARY_H_DEFAULTS],
[
GNULIB_STRFMON_L=0; AC_SUBST([GNULIB_STRFMON_L])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_STRFMON_L=1; AC_SUBST([HAVE_STRFMON_L])
REPLACE_STRFMON_L=0; AC_SUBST([REPLACE_STRFMON_L])
])