[libvirt] [PATCH 0/7] configure: remove some unused checks

Ján Tomko (7): configure: split common header and function checks configure: sort AC_CHECK_HEADERS argument list configure: remove duplicit check for sys/un.h configure: remove check for regex.h configure: remove check for poll.h configure: do not check for kill configure: remove regexec and getgrnam_r checks configure.ac | 50 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 9 deletions(-) -- 2.16.4

Use one line per entry, to work better with line-based git history. Signed-off-by: Ján Tomko <jtomko@redhat.com> --- configure.ac | 56 +++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 1b5c56b1a9..f23faf8b8f 100644 --- a/configure.ac +++ b/configure.ac @@ -322,17 +322,55 @@ AC_CHECK_SIZEOF([long]) dnl Availability of various common functions (non-fatal if missing), dnl and various less common threadsafe functions -AC_CHECK_FUNCS_ONCE([cfmakeraw fallocate geteuid getgid getgrnam_r \ - getmntent_r getpwuid_r getrlimit getuid if_indextoname kill mmap \ - newlocale posix_fallocate posix_memalign prlimit regexec \ - sched_getaffinity setgroups setns setrlimit symlink sysctlbyname \ - getifaddrs sched_setscheduler unshare]) +AC_CHECK_FUNCS_ONCE([\ + cfmakeraw \ + fallocate \ + geteuid \ + getgid \ + getgrnam_r \ + getmntent_r \ + getpwuid_r \ + getrlimit \ + getuid \ + if_indextoname \ + kill \ + mmap \ + newlocale \ + posix_fallocate \ + posix_memalign \ + prlimit \ + regexec \ + sched_getaffinity \ + setgroups \ + setns \ + setrlimit \ + symlink \ + sysctlbyname \ + getifaddrs \ + sched_setscheduler \ + unshare \ + ]) dnl Availability of various common headers (non-fatal if missing). -AC_CHECK_HEADERS([pwd.h regex.h sys/un.h \ - sys/poll.h syslog.h mntent.h net/ethernet.h linux/magic.h \ - sys/un.h sys/syscall.h sys/sysctl.h netinet/tcp.h ifaddrs.h \ - libtasn1.h sys/ucred.h sys/mount.h stdarg.h]) +AC_CHECK_HEADERS([\ + pwd.h \ + regex.h \ + sys/un.h \ + sys/poll.h \ + syslog.h \ + mntent.h \ + net/ethernet.h \ + linux/magic.h \ + sys/un.h \ + sys/syscall.h \ + sys/sysctl.h \ + netinet/tcp.h \ + ifaddrs.h \ + libtasn1.h \ + sys/ucred.h \ + sys/mount.h \ + stdarg.h \ + ]) dnl Check whether endian provides handy macros. AC_CHECK_DECLS([htole64], [], [], [[#include <endian.h>]]) AC_CHECK_FUNCS([stat stat64 __xstat __xstat64 lstat lstat64 __lxstat __lxstat64]) -- 2.16.4

On Tue, Sep 25, 2018 at 05:23:44PM +0200, Ján Tomko wrote:
Use one line per entry, to work better with line-based git history.
Signed-off-by: Ján Tomko <jtomko@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

Signed-off-by: Ján Tomko <jtomko@redhat.com> --- configure.ac | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index f23faf8b8f..00e2de7b1f 100644 --- a/configure.ac +++ b/configure.ac @@ -353,23 +353,23 @@ AC_CHECK_FUNCS_ONCE([\ dnl Availability of various common headers (non-fatal if missing). AC_CHECK_HEADERS([\ + ifaddrs.h \ + libtasn1.h \ + linux/magic.h \ + mntent.h \ + net/ethernet.h \ + netinet/tcp.h \ pwd.h \ regex.h \ - sys/un.h \ - sys/poll.h \ + stdarg.h \ syslog.h \ - mntent.h \ - net/ethernet.h \ - linux/magic.h \ - sys/un.h \ + sys/mount.h \ + sys/poll.h \ sys/syscall.h \ sys/sysctl.h \ - netinet/tcp.h \ - ifaddrs.h \ - libtasn1.h \ sys/ucred.h \ - sys/mount.h \ - stdarg.h \ + sys/un.h \ + sys/un.h \ ]) dnl Check whether endian provides handy macros. AC_CHECK_DECLS([htole64], [], [], [[#include <endian.h>]]) -- 2.16.4

On Tue, Sep 25, 2018 at 05:23:45PM +0200, Ján Tomko wrote:
Signed-off-by: Ján Tomko <jtomko@redhat.com> --- configure.ac | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/configure.ac b/configure.ac index f23faf8b8f..00e2de7b1f 100644 --- a/configure.ac +++ b/configure.ac @@ -353,23 +353,23 @@ AC_CHECK_FUNCS_ONCE([\
Since you're doing this kind of stuff already, I'd like to keep it consistent and have the FUNCS_ONCE sorted too. Reviewed-by: Erik Skultety <eskultet@redhat.com>

Commit 7c08fcc4 added this one. Signed-off-by: Ján Tomko <jtomko@redhat.com> --- configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac index 00e2de7b1f..2d2c783dc2 100644 --- a/configure.ac +++ b/configure.ac @@ -369,7 +369,6 @@ AC_CHECK_HEADERS([\ sys/sysctl.h \ sys/ucred.h \ sys/un.h \ - sys/un.h \ ]) dnl Check whether endian provides handy macros. AC_CHECK_DECLS([htole64], [], [], [[#include <endian.h>]]) -- 2.16.4

On Tue, Sep 25, 2018 at 05:23:46PM +0200, Ján Tomko wrote:
Commit 7c08fcc4 added this one.
Signed-off-by: Ján Tomko <jtomko@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

Introduced by: commit 542039fab09bd46f419702667cd342ae8f88b498 Fully support mingw builds Made redundant by: commit ec8a2d0327ee214111bca04c39ab61a9fc247f28 regex: gnulib guarantees that we have regex support Signed-off-by: Ján Tomko <jtomko@redhat.com> --- configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2d2c783dc2..8e77a1c9d2 100644 --- a/configure.ac +++ b/configure.ac @@ -360,7 +360,6 @@ AC_CHECK_HEADERS([\ net/ethernet.h \ netinet/tcp.h \ pwd.h \ - regex.h \ stdarg.h \ syslog.h \ sys/mount.h \ -- 2.16.4

On Tue, Sep 25, 2018 at 05:23:47PM +0200, Ján Tomko wrote:
Introduced by: commit 542039fab09bd46f419702667cd342ae8f88b498 Fully support mingw builds
Made redundant by: commit ec8a2d0327ee214111bca04c39ab61a9fc247f28 regex: gnulib guarantees that we have regex support
Signed-off-by: Ján Tomko <jtomko@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

Introduced by: commit b38d045dea41ea1fb41e546e61388116eddb6b3c Remove use of sys/poll.h on mingw Made redundant by: commit 0c97e70b74434b4baca9bbfc19c14bf7ff2ef304 Update event loop example programs to demonstrate best practice Signed-off-by: Ján Tomko <jtomko@redhat.com> --- configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac index 8e77a1c9d2..4993013daa 100644 --- a/configure.ac +++ b/configure.ac @@ -363,7 +363,6 @@ AC_CHECK_HEADERS([\ stdarg.h \ syslog.h \ sys/mount.h \ - sys/poll.h \ sys/syscall.h \ sys/sysctl.h \ sys/ucred.h \ -- 2.16.4

On Tue, Sep 25, 2018 at 05:23:48PM +0200, Ján Tomko wrote:
Introduced by: commit b38d045dea41ea1fb41e546e61388116eddb6b3c Remove use of sys/poll.h on mingw
Made redundant by: commit 0c97e70b74434b4baca9bbfc19c14bf7ff2ef304 Update event loop example programs to demonstrate best practice
Signed-off-by: Ján Tomko <jtomko@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

Introduced by: commit 3c37a171a2dea8048dfee90e1be2875f30f7eb15 Add check for kill() to fix build of cgroups on win32 Made redundant by: commit 02f1fd41f60c90b636ba0e18b37d4624fe47135d cgroup macros refactoring, part 1 Signed-off-by: Ján Tomko <jtomko@redhat.com> --- configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac index 4993013daa..89bb6f86fc 100644 --- a/configure.ac +++ b/configure.ac @@ -333,7 +333,6 @@ AC_CHECK_FUNCS_ONCE([\ getrlimit \ getuid \ if_indextoname \ - kill \ mmap \ newlocale \ posix_fallocate \ -- 2.16.4

On Tue, Sep 25, 2018 at 05:23:49PM +0200, Ján Tomko wrote:
Introduced by: commit 3c37a171a2dea8048dfee90e1be2875f30f7eb15 Add check for kill() to fix build of cgroups on win32
Made redundant by: commit 02f1fd41f60c90b636ba0e18b37d4624fe47135d cgroup macros refactoring, part 1
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>

Introduced by: commit 635ae38979bbb2659a21dfaa57e7c762ae8d4e88 commit 1b745219c7507595d4a09c89aa6a331eaa039e31 But their HAVE_ counterparts were never used. Signed-off-by: Ján Tomko <jtomko@redhat.com> --- configure.ac | 2 -- 1 file changed, 2 deletions(-) diff --git a/configure.ac b/configure.ac index 89bb6f86fc..39600017ab 100644 --- a/configure.ac +++ b/configure.ac @@ -327,7 +327,6 @@ AC_CHECK_FUNCS_ONCE([\ fallocate \ geteuid \ getgid \ - getgrnam_r \ getmntent_r \ getpwuid_r \ getrlimit \ @@ -338,7 +337,6 @@ AC_CHECK_FUNCS_ONCE([\ posix_fallocate \ posix_memalign \ prlimit \ - regexec \ sched_getaffinity \ setgroups \ setns \ -- 2.16.4

On Tue, Sep 25, 2018 at 05:23:50PM +0200, Ján Tomko wrote:
Introduced by: commit 635ae38979bbb2659a21dfaa57e7c762ae8d4e88 commit 1b745219c7507595d4a09c89aa6a331eaa039e31 But their HAVE_ counterparts were never used.
Especially the regexec part wasn't clear from the corresponding commit message, well, ancient dark times where commit messages didn't need to be split and commit messages didn't need to contain any description whatsoever. Looks reasonable to me, I can't run this on my builders at the moment to check whether all the platforms are happy, but that's why we've got CI. Reviewed-by: Erik Skultety <eskultet@redhat.com>
participants (2)
-
Erik Skultety
-
Ján Tomko