Changeset 2365 for box/trunk/infrastructure
- Timestamp:
- 26/10/2008 23:36:05 (4 years ago)
- File:
-
- 1 edited
-
box/trunk/infrastructure/m4/ax_func_syscall.m4 (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/infrastructure/m4/ax_func_syscall.m4
r2327 r2365 13 13 dnl @version 2005/07/01 14 14 dnl @license AllPermissive 15 dnl 16 dnl Changed by Chris on 081026: 17 dnl 18 dnl Reversed the test for __syscall(), remove the test for syscall(), 19 dnl remove the definition and reverse the sense in ax_func_syscall.m4 20 dnl (which checks for __syscall() needing definition). 21 dnl 22 dnl Autoconf's AC_CHECK_FUNC defines it when testing for its presence, 23 dnl so HAVE___SYSCALL will be true even if __syscall has no definition 24 dnl in the system libraries, and this is precisely the case that we 25 dnl want to test for, so now we test whether the test program compiles 26 dnl with no explicit definition (only the system headers) and if that 27 dnl fails, we set HAVE___SYSCALL_NEED_DEFN to 1. 15 28 16 29 AC_DEFUN([AX_FUNC_SYSCALL], [ 17 30 AC_CHECK_HEADERS([sys/syscall.h unistd.h]) 18 31 AC_CHECK_FUNCS([syscall __syscall]) 19 if test "x$ac_cv_func_syscall" != "xyes" && 20 test "x$ac_cv_func___syscall" != "xyes"; then 32 if test "x$ac_cv_func___syscall" = "xyes"; then 21 33 AC_CACHE_CHECK([for __syscall needing definition], [box_cv_have___syscall_need_defn], 22 34 [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ … … 25 37 #include <sys/syscall.h> 26 38 #endif 27 extern "C" off_t __syscall(quad_t number, ...);28 39 ]], [[ 29 40 __syscall(SYS_exit, 0); 30 41 return 1; 31 42 ]])], 32 [box_cv_have___syscall_need_defn= yes], [box_cv_have___syscall_need_defn=no]43 [box_cv_have___syscall_need_defn=no], [box_cv_have___syscall_need_defn=yes] 33 44 )]) 34 45 if test "x$box_cv_have___syscall_need_defn" = "xyes"; then
Note: See TracChangeset
for help on using the changeset viewer.
