[PATCH v2] configure.ac: remove unused checks

Pierre Marsais pierre.marsais at lse.epita.fr
Wed May 20 00:41:08 UTC 2020


Those unused configure.ac checks were found with the following commands:

$ ./bootstrap
$ ./configure
$ grep '^#undef HAVE' config.h.in | cut -d' ' -f2 | sort >in_configure
$ find -iname '*.[ch]' -exec ifnames \{\} + | grep ^HAVE | \
  cut -d' ' -f1 | sort >in_source
$ comm -23 in_configure in_source | grep -vE '^HAVE_(UNION|STRUCT)'

* configure.ac (AC_CHECK_FUNCS): Remove utimensat, the last user was
removed by commit 589cff6.  Remove strsignal, the last user was
removed by commit 2c4fb90.
(AC_CHECK_HEADERS): Remove sys/conf.h, the last user was removed by
commit 811bda6.  Remove inttypes.h, the last user was removed by commit
a6d91de.  Remove stropts.h, the last user was removed by commit a56a81c.
(AC_CHECK_DECLS): remove P_PPID, P_PGID, P_SID, P_CID, P_UID, P_GID,
P_ALL, and P_LWPID, the last user was removed by commit 7da9d19.  Add
missing P_PIDFD.

Signed-off-by: Pierre Marsais <pierre.marsais at lse.epita.fr>
---
Hi, thanks for your comment

I didn't use any particular tool, but I added some commands in the
commit message that can help for this kind of tasks.

Other changes in V2:
 - Update commit message wording
 - Update checks for sys/wait.h decls
 - Remove inttypes.h from AC_CHECK_HEADERS

 configure.ac | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/configure.ac b/configure.ac
index da486c24..2d3d3927 100644
--- a/configure.ac
+++ b/configure.ac
@@ -293,9 +293,7 @@ AC_CHECK_FUNCS(m4_normalize([
 	stpcpy
 	strerror
 	strndup
-	strsignal
 	sync_file_range
-	utimensat
 ]))
 
 AC_CHECK_TYPES([sig_atomic_t, struct sigcontext],,, [#include <signal.h>])
@@ -395,7 +393,6 @@ AC_CHECK_HEADERS(m4_normalize([
 	elf.h
 	gcov.h
 	iconv.h
-	inttypes.h
 	linux/bsg.h
 	linux/dm-ioctl.h
 	linux/dqblk_xfs.h
@@ -437,8 +434,6 @@ AC_CHECK_HEADERS(m4_normalize([
 	netipx/ipx.h
 	paths.h
 	scsi/sg.h
-	stropts.h
-	sys/conf.h
 	sys/eventfd.h
 	sys/fanotify.h
 	sys/ipc.h
@@ -633,15 +628,10 @@ AC_CHECK_DECLS(m4_normalize([
 ]),,, [#include <sys/ptrace.h>])
 
 AC_CHECK_DECLS(m4_normalize([
+	P_ALL,
 	P_PID,
-	P_PPID,
 	P_PGID,
-	P_SID,
-	P_CID,
-	P_UID,
-	P_GID,
-	P_ALL,
-	P_LWPID
+	P_PIDFD
 ]),,, [#include <sys/wait.h>])
 
 AC_CHECK_DECLS(m4_normalize([
-- 
2.26.2



More information about the Strace-devel mailing list