2002-12-30 03:51:30 +03:00
dnl Process this file with autoconf to create configure. Use autoreconf.
AC_PREREQ(2.57)
2012-05-02 16:34:56 +04:00
AC_INIT([strace],[4.7])
2002-12-30 03:51:30 +03:00
AC_CONFIG_SRCDIR([strace.c])
2009-10-12 03:25:29 +04:00
AC_CONFIG_AUX_DIR([.])
2002-12-30 03:51:30 +03:00
AM_CONFIG_HEADER([config.h])
2011-02-27 17:05:58 +03:00
AM_INIT_AUTOMAKE([foreign check-news dist-xz no-dist-gzip silent-rules])
2002-12-30 03:51:30 +03:00
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
Add x32 support to strace
X32 support is added to Linux kernel 3.4. In a nutshell, x32 is x86-64 with
32bit pointers. At system call level, x32 is also identical to x86-64,
as shown by many changes like "defined(X86_64) || defined(X32)". The
main differerence bewteen x32 and x86-64 is off_t in x32 is long long
instead of long.
This patch adds x32 support to strace. Tested on Linux/x32.
* configure.ac: Support X32.
* defs.h: Set SUPPORTED_PERSONALITIES to 3 for X86_64,
Set PERSONALITY2_WORDSIZE to 4 for X86_64.
Add tcb::ext_arg for X32.
* file.c (stat): New for X32.
(sys_lseek): Use 64-bit version for X32.
(printstat64): Check current_personality != 1 for X86_64.
* ipc.c (indirect_ipccall): Check current_personality == 1
for X86_64.
* mem.c (sys_mmap64): Also use tcp->u_arg for X32. Print NULL
for zero address. Call printllval for offset for X32.
* pathtrace.c (pathtrace_match): Don't check sys_old_mmap for
X32.
* process.c (ARG_FLAGS): Defined for X32.
(ARG_STACK): Likewise.
(ARG_PTID): Likewise.
(change_syscall): Handle X32.
(struct_user_offsets): Support X32.
(sys_arch_prctl): Likewise.
* signal.c: Include <asm/sigcontext.h> for X32.
(SA_RESTORER): Also define for X32.
* syscall.c (update_personality): Support X32 for X86_64.
(is_restart_error): Likewise.
(syscall_fixup_on_sysenter): Likewise.
(get_syscall_args): Likewise.
(get_syscall_result): Likewise.
(get_error): Likewise.
(__X32_SYSCALL_BIT): Define if not defined.
(__X32_SYSCALL_MASK): Likewise.
(get_scno): Check DS register value for X32. Use
__X32_SYSCALL_MASK on X32 system calls.
* util.c (printllval): Use ext_arg for X32.
(printcall): Support X32.
(change_syscall): Likewise.
(arg0_offset): Likewise.
(arg1_offset): Likewise.
* Makefile.am (EXTRA_DIST): Add linux/x32/errnoent.h,
linux/x32/ioctlent.h.in, linux/x32/signalent.h,
linux/x32/syscallent.h, linux/x86_64/errnoent2.h,
linux/x86_64/ioctlent2.h, linux/x86_64/signalent2.h and
linux/x86_64/syscallent2.h.
* linux/x32/errnoent.h: New.
* linux/x32/ioctlent.h.in: Likewise.
* linux/x32/signalent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/errnoent2.h: Likewise.
* linux/x86_64/ioctlent2.h: Likewise.
* linux/x86_64/signalent2.h: Likewise.
* linux/x86_64/syscallent2.h: Likewise.
Signed-off-by: H.J. Lu <hongjiu.lu@intel.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-16 15:00:01 +04:00
AC_PROG_CC
AC_USE_SYSTEM_EXTENSIONS
2002-12-30 03:51:30 +03:00
AC_MSG_CHECKING([for supported architecture])
case "$host_cpu" in
2008-11-11 01:21:41 +03:00
bfin)
arch=bfin
AC_DEFINE([BFIN], 1, [Define for the Blackfin architecture.])
;;
2002-12-30 03:51:30 +03:00
i[[3456]]86|pentium)
arch=i386
AC_DEFINE([I386], 1, [Define for the i386 architecture.])
;;
ia64)
arch=ia64
AC_DEFINE([IA64], 1, [Define for the IA64 architecture.])
;;
m68k)
arch=m68k
AC_DEFINE([M68K], 1, [Define for the m68k architecture.])
;;
2004-07-07 David S. Miller <davem@nuts.davemloft.net>
* linux/sparc/syscallent.h: Sync with reality.
* linux/sparc/syscall.h (sys_sendfile64, sys_futex, sys_gettid,
sys_sched_setaffinity, sys_sched_getaffinity, sys_setxattr,
sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr,
sys_fgetxattr, sys_listxattr, sys_llistxattr, sys_flistxattr,
sys_removexattr, sys_lremovexattr, sys_fremovexattr,
sys_remap_file_pages, sys_readahead, sys_tgkill, sys_statfs64,
sys_fstatfs64, sys_clock_settime, sys_clock_gettime,
sys_clock_getres, sys_clock_nanosleep, sys_timer_create,
sys_timer_settime, sys_timer_gettime): New declarations.
* linux/sparc64/dummy2.h, linux/sparc64/syscallent2.h,
linux/sparc64/syscall.h, linux/sparc64/errnoent.h,
linux/sparc64/errnoent1.h, linux/sparc64/errnoent2.h,
linux/sparc64/ioctlent.h, linux/sparc64/ioctlent1.h,
linux/sparc64/ioctlent2.h, linux/sparc64/signalent.h,
linux/sparc64/signalent.h, linux/sparc64/signalent.h,
linux/sparc64/signalent1.h, linux/sparc64/signalent2.h,
linux/sparc64/syscall1.h, linux/sparc64/syscallent.h,
linux/sparc64/syscallent1.h: New files.
* defs.h (LINUXSPARC): Define also when SPARC64.
(LINUX && SPARC64): Set SUPPORTED_PERSONALITIES to 3.
Ignore SIGTRAP after execve by defining TCB_WAITEXECVE.
Define possibly missing __NR_exit_group. Declare getrval2.
* configure.ac (sparc64): New architecture case.
* config.h.in (SPARC64): New define.
* file.c (stat_sparc64): New structure.
(printstat_sparc64): New output routine for that.
(printstat): Call it, if personality is 2.
(printstat64): Likewise.
* util.c: Conditionalize ptrace defines on LINUXSPARC
not LINUX && SPARC.
(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
to PTRACE_FOOREGS64 so that more sparc code can be shared
between 64-bit and 32-bit.
(_hack_syscall5): Correct trap number when SPARC64.
(PTRACE_WRITE{TEXT,DATA}): Add SPARC64 to ifdef guard.
(getpc): Handle SPARC64 && LINUX.
(printcall): Likewise.
(arg fetching/setting): Use same code for SPARC64 LINUX
as for SPARC.
(setbpt): Handle SPARC64 && LINUX.
(clearbpt): Likewise.
* signal.c: Conditionalize ptrace defines on SPARC and
SPARC64.
(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
to PTRACE_FOOREGS64 so that more sparc code can be shared
between 64-bit and 32-bit.
(m_siginfo): Use same definition on SPARC64 as SPARC.
(sys_sigreturn): Handle LINUX && SPARC64.
* syscall.c: Conditionalize ptrace defines on SPARC and
SPARC64.
(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
to PTRACE_FOOREGS64 so that more sparc code can be shared
between 64-bit and 32-bit.
(getscno): Use same static state on SPARC64 as SPARC,
and add SPARC64 handling.
(get_error): Handle LINUX && SPARC64.
(force_result): Likewise.
(syscall_enter): Likewise.
(trace_syscall): Handle sys_socketcall and sys_ipc on SPARC64
just like SPARC.
(getrval2): Handle LINUX && SPARC64.
* process.c: Conditionalize ptrace defines on SPARC and
SPARC64.
(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
to PTRACE_FOOREGS64 so that more sparc code can be shared
between 64-bit and 32-bit.
(change_syscall): Handle LINUX && SPARC64.
(struct_user_offsets): Ifdef out those which do not exist
on SPARC64.
* net.c (sys_pipe): Handle LINUX && SPARC64.
* ioctl.c: Fix initializer typo for nioctlents2, was
nioctlents1 by accident.
2004-07-12 11:44:08 +04:00
sparc64*)
arch=sparc64
AC_DEFINE([SPARC64], 1, [Define for the SPARC64 architecture.])
;;
2002-12-30 03:51:30 +03:00
sparc*)
arch=sparc
AC_DEFINE([SPARC], 1, [Define for the SPARC architecture.])
;;
mips*)
arch=mips
AC_DEFINE([MIPS], 1, [Define for the MIPS architecture.])
;;
alpha*)
arch=alpha
AC_DEFINE([ALPHA], 1, [Define for the Alpha architecture.])
;;
2003-01-14 12:59:00 +03:00
powerpc*)
2002-12-30 03:51:30 +03:00
arch=powerpc
AC_DEFINE([POWERPC], 1, [Define for the PowerPC architecture.])
2010-07-12 23:39:57 +04:00
if test $host_cpu = powerpc64; then
AC_DEFINE([POWERPC64], 1, [Define for the PowerPC64 architecture.])
fi
2002-12-30 03:51:30 +03:00
;;
arm*)
arch=arm
AC_DEFINE([ARM], 1, [Define for the ARM architecture.])
;;
2012-10-24 20:58:16 +04:00
aarch64*)
arch=aarch64
AC_DEFINE([AARCH64], 1, [Define for the AArch64 architecture.])
;;
2009-02-27 23:32:52 +03:00
avr32*)
arch=avr32
AC_DEFINE([AVR32], 1, [Define for the AVR32 architecture.])
;;
2002-12-30 03:51:30 +03:00
s390)
arch=s390
AC_DEFINE([S390], 1, [Define for the S390 architecture.])
;;
s390x)
arch=s390x
AC_DEFINE([S390X], 1, [Define for the S390x architecture.])
;;
hppa*|parisc*)
arch=hppa
AC_DEFINE([HPPA], 1, [Define for the HPPA architecture.])
;;
2007-11-02 00:32:49 +03:00
sh64*)
2003-06-27 02:40:42 +04:00
arch=sh64
AC_DEFINE([SH64], 1, [Define for the SH64 architecture.])
2003-06-02 23:18:58 +04:00
;;
2007-11-02 00:32:49 +03:00
sh*)
arch=sh
AC_DEFINE([SH], 1, [Define for the SH architecture.])
;;
2002-12-30 03:51:30 +03:00
x86?64*)
Add x32 support to strace
X32 support is added to Linux kernel 3.4. In a nutshell, x32 is x86-64 with
32bit pointers. At system call level, x32 is also identical to x86-64,
as shown by many changes like "defined(X86_64) || defined(X32)". The
main differerence bewteen x32 and x86-64 is off_t in x32 is long long
instead of long.
This patch adds x32 support to strace. Tested on Linux/x32.
* configure.ac: Support X32.
* defs.h: Set SUPPORTED_PERSONALITIES to 3 for X86_64,
Set PERSONALITY2_WORDSIZE to 4 for X86_64.
Add tcb::ext_arg for X32.
* file.c (stat): New for X32.
(sys_lseek): Use 64-bit version for X32.
(printstat64): Check current_personality != 1 for X86_64.
* ipc.c (indirect_ipccall): Check current_personality == 1
for X86_64.
* mem.c (sys_mmap64): Also use tcp->u_arg for X32. Print NULL
for zero address. Call printllval for offset for X32.
* pathtrace.c (pathtrace_match): Don't check sys_old_mmap for
X32.
* process.c (ARG_FLAGS): Defined for X32.
(ARG_STACK): Likewise.
(ARG_PTID): Likewise.
(change_syscall): Handle X32.
(struct_user_offsets): Support X32.
(sys_arch_prctl): Likewise.
* signal.c: Include <asm/sigcontext.h> for X32.
(SA_RESTORER): Also define for X32.
* syscall.c (update_personality): Support X32 for X86_64.
(is_restart_error): Likewise.
(syscall_fixup_on_sysenter): Likewise.
(get_syscall_args): Likewise.
(get_syscall_result): Likewise.
(get_error): Likewise.
(__X32_SYSCALL_BIT): Define if not defined.
(__X32_SYSCALL_MASK): Likewise.
(get_scno): Check DS register value for X32. Use
__X32_SYSCALL_MASK on X32 system calls.
* util.c (printllval): Use ext_arg for X32.
(printcall): Support X32.
(change_syscall): Likewise.
(arg0_offset): Likewise.
(arg1_offset): Likewise.
* Makefile.am (EXTRA_DIST): Add linux/x32/errnoent.h,
linux/x32/ioctlent.h.in, linux/x32/signalent.h,
linux/x32/syscallent.h, linux/x86_64/errnoent2.h,
linux/x86_64/ioctlent2.h, linux/x86_64/signalent2.h and
linux/x86_64/syscallent2.h.
* linux/x32/errnoent.h: New.
* linux/x32/ioctlent.h.in: Likewise.
* linux/x32/signalent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/errnoent2.h: Likewise.
* linux/x86_64/ioctlent2.h: Likewise.
* linux/x86_64/signalent2.h: Likewise.
* linux/x86_64/syscallent2.h: Likewise.
Signed-off-by: H.J. Lu <hongjiu.lu@intel.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-16 15:00:01 +04:00
AC_TRY_COMPILE(
[#ifndef __ILP32__
# error not x32
#endif], [], arch=x32, arch=x86_64)
if test "$arch" = "x86_64"; then
AC_DEFINE([X86_64], 1, [Define for the 64bit AMD x86-64 architecture.])
else
AC_DEFINE([X32], 1, [Define for the 32bit AMD x86-64 architecture.])
fi
2002-12-30 03:51:30 +03:00
;;
2009-02-25 20:08:40 +03:00
cris|crisv10)
arch=crisv10
AC_DEFINE([CRISV10], 1, [Define for the CRISv10 architecture.])
;;
crisv32)
arch=crisv32
AC_DEFINE([CRISV32], 1, [Define for the CRISv32 architecture.])
;;
2009-12-28 18:00:15 +03:00
tile*)
arch=tile
AC_DEFINE([TILE], 1, [Define for the Tile architecture])
;;
2010-07-06 16:21:07 +04:00
microblaze*)
arch=microblaze
AC_DEFINE([MICROBLAZE], 1, [Define for the MicroBlaze architecture.])
;;
2013-02-14 16:26:27 +04:00
or1k*)
arch=or1k
AC_DEFINE([OR1K], 1, [Define for the OpenRISC 1000 architecture.])
;;
2002-12-30 03:51:30 +03:00
*)
AC_MSG_RESULT([NO!])
AC_MSG_ERROR([architecture $host_cpu is not supported by strace])
;;
esac
AC_MSG_RESULT($arch)
AC_SUBST(arch)
2004-07-12 09:45:08 +04:00
AM_CONDITIONAL([I386], [test x$arch = xi386])
2002-12-30 12:13:08 +03:00
AM_CONDITIONAL([X86_64], [test x$arch = xx86_64])
Add x32 support to strace
X32 support is added to Linux kernel 3.4. In a nutshell, x32 is x86-64 with
32bit pointers. At system call level, x32 is also identical to x86-64,
as shown by many changes like "defined(X86_64) || defined(X32)". The
main differerence bewteen x32 and x86-64 is off_t in x32 is long long
instead of long.
This patch adds x32 support to strace. Tested on Linux/x32.
* configure.ac: Support X32.
* defs.h: Set SUPPORTED_PERSONALITIES to 3 for X86_64,
Set PERSONALITY2_WORDSIZE to 4 for X86_64.
Add tcb::ext_arg for X32.
* file.c (stat): New for X32.
(sys_lseek): Use 64-bit version for X32.
(printstat64): Check current_personality != 1 for X86_64.
* ipc.c (indirect_ipccall): Check current_personality == 1
for X86_64.
* mem.c (sys_mmap64): Also use tcp->u_arg for X32. Print NULL
for zero address. Call printllval for offset for X32.
* pathtrace.c (pathtrace_match): Don't check sys_old_mmap for
X32.
* process.c (ARG_FLAGS): Defined for X32.
(ARG_STACK): Likewise.
(ARG_PTID): Likewise.
(change_syscall): Handle X32.
(struct_user_offsets): Support X32.
(sys_arch_prctl): Likewise.
* signal.c: Include <asm/sigcontext.h> for X32.
(SA_RESTORER): Also define for X32.
* syscall.c (update_personality): Support X32 for X86_64.
(is_restart_error): Likewise.
(syscall_fixup_on_sysenter): Likewise.
(get_syscall_args): Likewise.
(get_syscall_result): Likewise.
(get_error): Likewise.
(__X32_SYSCALL_BIT): Define if not defined.
(__X32_SYSCALL_MASK): Likewise.
(get_scno): Check DS register value for X32. Use
__X32_SYSCALL_MASK on X32 system calls.
* util.c (printllval): Use ext_arg for X32.
(printcall): Support X32.
(change_syscall): Likewise.
(arg0_offset): Likewise.
(arg1_offset): Likewise.
* Makefile.am (EXTRA_DIST): Add linux/x32/errnoent.h,
linux/x32/ioctlent.h.in, linux/x32/signalent.h,
linux/x32/syscallent.h, linux/x86_64/errnoent2.h,
linux/x86_64/ioctlent2.h, linux/x86_64/signalent2.h and
linux/x86_64/syscallent2.h.
* linux/x32/errnoent.h: New.
* linux/x32/ioctlent.h.in: Likewise.
* linux/x32/signalent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/errnoent2.h: Likewise.
* linux/x86_64/ioctlent2.h: Likewise.
* linux/x86_64/signalent2.h: Likewise.
* linux/x86_64/syscallent2.h: Likewise.
Signed-off-by: H.J. Lu <hongjiu.lu@intel.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-16 15:00:01 +04:00
AM_CONDITIONAL([X32], [test x$arch = xx32])
2003-01-10 13:44:59 +03:00
2002-12-30 03:51:30 +03:00
AC_INCLUDEDIR
2010-09-09 21:41:15 +04:00
gl_WARN_ADD([-Wall])
2010-09-09 21:42:28 +04:00
gl_WARN_ADD([-Wwrite-strings])
2012-05-15 04:50:26 +04:00
AC_ARG_ENABLE([gcc-Werror],
[AS_HELP_STRING([--enable-gcc-Werror], [turn on gcc's -Werror option])],
[case $enableval in
yes) gl_WARN_ADD([-Werror]) ;;
no) ;;
*) AC_MSG_ERROR([bad value $enableval for gcc-Werror option]) ;;
esac]
)
2010-09-09 21:41:15 +04:00
AC_SUBST([WARN_CFLAGS])
2002-12-30 03:51:30 +03:00
AC_PROG_CPP
AC_PROG_INSTALL
AC_C_CONST
2010-09-12 11:39:55 +04:00
AC_C_BIGENDIAN
2002-12-30 03:51:30 +03:00
AC_HEADER_STDC
2008-08-01 05:06:31 +04:00
AC_HEADER_STDBOOL
2002-12-30 03:51:30 +03:00
AC_HEADER_DIRENT
AC_HEADER_STAT
2012-03-25 19:12:16 +04:00
AC_CHECK_MEMBERS(m4_normalize([
struct stat.st_aclcnt,
struct stat.st_blksize,
struct stat.st_blocks,
struct stat.st_flags,
struct stat.st_fstype,
struct stat.st_gen,
struct stat.st_level,
struct stat.st_rdev
]))
2002-12-30 03:51:30 +03:00
AC_STAT64
2009-10-14 18:33:58 +04:00
AC_STATFS64
2002-12-30 03:51:30 +03:00
AC_TYPE_SIGNAL
AC_TYPE_UID_T
AC_TYPE_MODE_T
AC_TYPE_GETGROUPS
AC_HEADER_MAJOR
2003-01-10 22:57:34 +03:00
AC_CHECK_TYPES([sig_atomic_t, siginfo_t],,, [#include <signal.h>])
2003-02-26 23:34:02 +03:00
AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,,
[#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>])
2002-12-30 03:51:30 +03:00
AC_CHECK_TYPES([long long])
AC_LITTLE_ENDIAN_LONG_LONG
AC_OFF_T_IS_LONG_LONG
AC_CHECK_TYPES([struct opthdr],,, [#include <sys/socket.h>])
AC_CHECK_TYPES([struct t_opthdr],,, [#include <sys/tiuser.h>])
2012-03-25 19:12:16 +04:00
AC_CHECK_FUNCS(m4_normalize([
fork
if_indextoname
inet_ntop
prctl
process_vm_readv
sendmsg
sigaction
stpcpy
strerror
strsignal
_sys_siglist
sys_siglist
]))
AC_CHECK_HEADERS(m4_normalize([
asm/cachectl.h
asm/sysmips.h
inttypes.h
ioctls.h
libaio.h
linux/capability.h
2013-02-04 03:04:57 +04:00
linux/perf_event.h
2012-03-25 19:12:16 +04:00
linux/ptrace.h
linux/utsname.h
mqueue.h
netinet/sctp.h
poll.h
stropts.h
sys/acl.h
sys/asynch.h
sys/conf.h
sys/epoll.h
sys/filio.h
sys/ioctl.h
sys/poll.h
sys/ptrace.h
sys/reg.h
sys/uio.h
sys/vfs.h
]))
2002-12-30 03:51:30 +03:00
AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
2007-07-06 00:50:34 +04:00
[], [], [#include <stddef.h>
2010-03-08 18:07:52 +03:00
#include <sys/socket.h>
#include <asm/types.h>])
2002-12-30 13:23:01 +03:00
AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include <signal.h>])
2009-02-11 06:03:28 +03:00
AC_CHECK_TYPES([struct sigcontext_struct,
struct sigcontext],,, [#include <signal.h>])
2003-01-10 22:55:30 +03:00
AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>])
2002-12-30 03:51:30 +03:00
AC_CHECK_MEMBERS([struct msghdr.msg_control],,, [#include <sys/socket.h>])
2003-01-10 22:55:30 +03:00
AC_CHECK_MEMBERS([struct T_conn_res.QUEUE_ptr,
struct T_conn_res.ACCEPTOR_id],,,
[#include <sys/stream.h>
#include <sys/tihdr.h>])
2003-06-28 01:20:09 +04:00
AC_CHECK_TYPES([struct __old_kernel_stat],,, [#include <asm/stat.h>])
2004-03-02 00:29:22 +03:00
AC_CHECK_TYPES([struct pt_all_user_regs, struct ia64_fpreg],,,
[#include <sys/ptrace.h>])
2004-03-02 01:10:52 +03:00
AC_CHECK_TYPES([struct user_desc],,, [#include <asm/ldt.h>])
2005-08-03 16:18:09 +04:00
AC_CHECK_MEMBERS([struct dqblk.dqb_curblocks],,, [#include <sys/quota.h>])
2007-07-05 23:08:42 +04:00
AC_CHECK_MEMBERS([struct sigcontext.sc_hi2],,, [#include <signal.h>
2007-07-11 11:11:20 +04:00
#ifdef HAVE_ASM_SIGCONTEXT_H
# include <asm/sigcontext.h>
#endif])
2007-07-05 23:08:42 +04:00
2012-05-02 00:56:32 +04:00
AC_CHECK_MEMBERS([struct utsname.domainname],,, [#include <sys/utsname.h>])
2002-12-30 03:51:30 +03:00
AC_CHECK_DECLS([sys_errlist])
AC_CHECK_DECLS([sys_siglist, _sys_siglist],,, [#include <signal.h>])
2012-03-25 19:12:16 +04:00
AC_CHECK_DECLS(m4_normalize([
PTRACE_EVENT_CLONE,
PTRACE_EVENT_EXEC,
PTRACE_EVENT_EXIT,
PTRACE_EVENT_FORK,
PTRACE_EVENT_VFORK,
PTRACE_EVENT_VFORK_DONE,
PTRACE_GETEVENTMSG,
PTRACE_GETSIGINFO,
PTRACE_O_TRACECLONE,
PTRACE_O_TRACEEXEC,
PTRACE_O_TRACEEXIT,
PTRACE_O_TRACEFORK,
PTRACE_O_TRACESYSGOOD,
PTRACE_O_TRACEVFORK,
PTRACE_SETOPTIONS
]),,, [#include <sys/ptrace.h>])
2002-12-30 03:51:30 +03:00
2012-05-02 14:21:49 +04:00
AC_CHECK_DECLS(m4_normalize([
LO_FLAGS_AUTOCLEAR,
LO_FLAGS_PARTSCAN
]),,, [#include <linux/loop.h>])
2011-08-17 01:36:16 +04:00
AC_CACHE_CHECK([for BLKGETSIZE64], [ac_cv_have_blkgetsize64],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#include <stdlib.h>
#include <linux/fs.h>], [return !BLKGETSIZE64;])],
[ac_cv_have_blkgetsize64=yes], [ac_cv_have_blkgetsize64=no])]
if test $ac_cv_have_blkgetsize64 = yes; then
AC_DEFINE([HAVE_BLKGETSIZE64], [1], [Define to 1 if you have BLKGETSIZE64.])
fi)
2012-03-16 00:42:46 +04:00
AC_CHECK_SIZEOF([long])
Implement prlimit64 decoding, rewrite [gs]etrlimit decoding
* configure.ac: Remove AC_RLIM_T_IS_LONG_LONG call.
Define SIZEOF_RLIM_T.
* m4/long_long.m4 (AC_RLIM_T_IS_LONG_LONG): Remove.
* linux/dummy.h (sys_prlimit64): Remove.
* linux/syscall.h (sys_prlimit64): New prototype.
* resource.c (resources): Reindent, add RLIMIT_RTTIME.
(sprintrlim, print_rlimit32, sys_getrlimit, sys_setrlimit): Remove.
[HAVE_LONG_LONG_RLIM_T]: Remove dead code.
[_LFS64_LARGEFILE || HAVE_LONG_LONG_RLIM_T]: Likewise.
(sprint_rlim64, print_rlimit64, decode_rlimit64, sprint_rlim32,
print_rlimit32, decode_rlimit, sys_getrlimit, sys_setrlimit,
sys_prlimit64): New functions.
2012-03-16 23:05:21 +04:00
AC_CHECK_SIZEOF([rlim_t],,[#include <sys/resource.h>])
2012-03-16 00:42:46 +04:00
2002-12-30 03:51:30 +03:00
AC_PATH_PROG([PERL], [perl])
2011-02-27 03:28:50 +03:00
AC_CONFIG_FILES([Makefile tests/Makefile])
2002-12-30 03:51:30 +03:00
AC_OUTPUT