aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2024-08-04 15:32:33 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2024-08-04 15:33:05 -0700
commit4e98e95df277fb11fb56ddcf22aace98923656d3 (patch)
tree0b25e7c89b4c1bc1eec9947823d89ab116aa6ff2
parentmaint: avoid warning on older GCC compilers (diff)
downloadcoreutils-4e98e95df277fb11fb56ddcf22aace98923656d3.tar.gz
coreutils-4e98e95df277fb11fb56ddcf22aace98923656d3.zip
build: modernize AC_CHECK_TYPE usage
* m4/jm-macros.m4 (gl_CHECK_ALL_TYPES): Use current form of AC_CHECK_TYPE instead of the no-longer-documented obsolescent form.
-rw-r--r--m4/jm-macros.m415
1 files changed, 11 insertions, 4 deletions
diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4
index 9e3b94636..e092c9fa6 100644
--- a/m4/jm-macros.m4
+++ b/m4/jm-macros.m4
@@ -1,4 +1,4 @@
-#serial 115 -*- autoconf -*-
+#serial 116 -*- autoconf -*-
dnl Misc type-related macros for coreutils.
@@ -215,18 +215,25 @@ AC_DEFUN([gl_CHECK_ALL_TYPES],
AC_REQUIRE([AC_STRUCT_ST_BLOCKS])
AC_REQUIRE([AC_TYPE_GETGROUPS])
+
+ dnl FIXME is this section still needed?
+ dnl These types are universally available now.
AC_REQUIRE([AC_TYPE_MBSTATE_T])
AC_REQUIRE([AC_TYPE_MODE_T])
AC_REQUIRE([AC_TYPE_OFF_T])
AC_REQUIRE([AC_TYPE_PID_T])
AC_REQUIRE([AC_TYPE_SIZE_T])
AC_REQUIRE([AC_TYPE_UID_T])
- AC_CHECK_TYPE([ino_t], [unsigned long int])
+ AC_CHECK_TYPE([ino_t], [],
+ [AC_DEFINE([ino_t], [unsigned long int],
+ [Type of file serial numbers, also known as inode numbers.])])
dnl This relies on the fact that Autoconf's implementation of
dnl AC_CHECK_TYPE checks includes unistd.h.
- AC_CHECK_TYPE([major_t], [unsigned int])
- AC_CHECK_TYPE([minor_t], [unsigned int])
+ AC_CHECK_TYPE([major_t], [],
+ [AC_DEFINE([major_t], [unsigned int], [Type of major device numbers.])])
+ AC_CHECK_TYPE([minor_t], [],
+ [AC_DEFINE([minor_t], [unsigned int], [Type of minor device numbers.])])
AC_REQUIRE([AC_HEADER_MAJOR])
])