From: Dmitry V. Levin Date: Mon, 1 Jun 2009 09:59:11 +0000 (+0000) Subject: Clean up header checks X-Git-Tag: v4.5.19~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f48df6ce298672621718d3921d3f357fc68c4433;p=strace Clean up header checks * configure.ac: Reformat AC_CHECK_HEADERS to keep it sorted and easily updated, and reduce merging errors in the future. * system.c: Convert all non-standard #ifdef checks for specific headers to regular #ifdef HAVE_*_H checks. Signed-off-by: Mike Frysinger Signed-off-by: Dmitry V. Levin --- diff --git a/ChangeLog b/ChangeLog index 21cdd0f7..13cf0ce5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-06-01 Dmitry V. Levin + + * configure.ac: Reformat AC_CHECK_HEADERS to keep it sorted and + easily updated, and reduce merging errors in the future. + * system.c: Convert all non-standard #ifdef checks for specific + headers to regular #ifdef HAVE_*_H checks. + Signed-off-by: Mike Frysinger + 2009-04-20 Denys Vlasenko * file.c (printstatsol, printstat_sparc64): diff --git a/configure.ac b/configure.ac index ffbfeb43..3b1db7c7 100644 --- a/configure.ac +++ b/configure.ac @@ -209,7 +209,39 @@ AC_CHECK_LIB(nsl, main) fi AC_CHECK_FUNCS(sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl prctl sendmsg inet_ntop if_indextoname) -AC_CHECK_HEADERS([sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h stropts.h sys/conf.h sys/stream.h sys/tihdr.h sys/tiuser.h sys/sysconfig.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h sys/uio.h sys/aio.h poll.h sys/poll.h sys/vfs.h asm/sysmips.h linux/utsname.h sys/nscsys.h mqueue.h sys/epoll.h libaio.h inttypes.h], [], []) +AC_CHECK_HEADERS([ \ + inttypes.h \ + ioctls.h \ + libaio.h \ + mqueue.h \ + poll.h \ + stropts.h \ + termio.h \ + sys/acl.h \ + sys/aio.h \ + sys/asynch.h \ + sys/conf.h \ + sys/door.h \ + sys/epoll.h \ + sys/filio.h \ + sys/ioctl.h \ + sys/nscsys.h \ + sys/poll.h \ + sys/ptrace.h \ + sys/reg.h \ + sys/stream.h \ + sys/sysconfig.h \ + sys/tihdr.h \ + sys/tiuser.h \ + sys/uio.h \ + sys/vfs.h \ + asm/cachectl.h \ + asm/reg.h \ + asm/sysmips.h \ + linux/capability.h \ + linux/ptrace.h \ + linux/utsname.h \ +], [], []) AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h], [], [], [#include #include ]) diff --git a/system.c b/system.c index f21dca79..63a64b85 100644 --- a/system.c +++ b/system.c @@ -66,11 +66,11 @@ #include -#ifdef SYS_capget +#ifdef HAVE_LINUX_CAPABILITY_H #include #endif -#ifdef SYS_cacheflush +#ifdef HAVE_ASM_CACHECTL_H #include #endif @@ -78,7 +78,7 @@ #include #endif -#ifdef MIPS +#ifdef HAVE_ASM_SYSMIPS_H #include #endif