summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2023-08-14 09:15:51 +0800
committerPo Lu <luangruo@yahoo.com>2023-08-14 09:15:51 +0800
commit0e390f54fa61a5a8c9481a862803d0de78815d6a (patch)
treedbce229eb26813abbb4f1004b5aeaddd5a757ae4 /m4
parent6412ba2f1ad93bf641b86ba7633beb4f6dda89ea (diff)
downloademacs-0e390f54fa61a5a8c9481a862803d0de78815d6a.tar.gz
; Update from Gnulib
* lib/boot-time-aux.h (get_linux_uptime): * lib/boot-time.c (UT_USER): * lib/nproc.c (num_processors_ignoring_omp): * lib/readutmp.h (WTMP_FILE): * m4/readutmp.m4 (gl_READUTMP): * m4/stdint.m4: Update from Gnulib.
Diffstat (limited to 'm4')
-rw-r--r--m4/readutmp.m48
-rw-r--r--m4/stdint.m47
2 files changed, 11 insertions, 4 deletions
diff --git a/m4/readutmp.m4 b/m4/readutmp.m4
index fff8d4eb7bf..0a47f4bb77d 100644
--- a/m4/readutmp.m4
+++ b/m4/readutmp.m4
@@ -1,4 +1,4 @@
-# readutmp.m4 serial 28
+# readutmp.m4 serial 30
dnl Copyright (C) 2002-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -55,7 +55,7 @@ AC_DEFUN_ONCE([gl_PREREQ_READUTMP_H],
if test $ac_cv_header_utmp_h = yes || test $ac_cv_header_utmpx_h = yes; then
dnl Prerequisites of lib/readutmp.h and lib/readutmp.c.
AC_CHECK_FUNCS_ONCE([utmpname utmpxname])
- AC_CHECK_DECLS([getutent],,,[[
+ AC_CHECK_DECLS([endutent],,,[[
/* <sys/types.h> is a prerequisite of <utmp.h> on FreeBSD 8.0, OpenBSD 4.6. */
#include <sys/types.h>
#ifdef HAVE_UTMP_H
@@ -103,6 +103,10 @@ AC_INCLUDES_DEFAULT
AC_CHECK_MEMBERS([struct utmp.ut_exit.e_termination],,,[$utmp_includes])
fi
+ AC_CHECK_DECLS([sysinfo],,,[[
+ #include <sys/sysinfo.h>
+ ]])
+
AC_CHECK_HEADERS_ONCE([sys/param.h])
dnl <sys/sysctl.h> requires <sys/param.h> on OpenBSD 4.0.
AC_CHECK_HEADERS([sys/sysctl.h],,,
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index d6961b0993e..b9f764d4c1c 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,4 +1,4 @@
-# stdint.m4 serial 61
+# stdint.m4 serial 62
dnl Copyright (C) 2001-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -150,7 +150,10 @@ intmax_t i = INTMAX_MAX;
uintmax_t j = UINTMAX_MAX;
/* Check that SIZE_MAX has the correct type, if possible. */
-#if 201112 <= __STDC_VERSION__
+/* ISO C 11 mandates _Generic, but GCC versions < 4.9 lack it. */
+#if 201112 <= __STDC_VERSION__ \
+ && (!defined __GNUC__ || 4 < __GNUC__ + (9 <= __GNUC_MINOR__) \
+ || defined __clang__)
int k = _Generic (SIZE_MAX, size_t: 0);
#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
|| (0x5110 <= __SUNPRO_C && !__STDC__))