[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to m4/ltdl/m4/stackovf.m4,v
From: |
Eric Blake |
Subject: |
Changes to m4/ltdl/m4/stackovf.m4,v |
Date: |
Fri, 16 Jun 2006 03:51:31 +0000 |
CVSROOT: /sources/m4
Module name: m4
Changes by: Eric Blake <ericb> 06/06/16 03:51:29
Index: ltdl/m4/stackovf.m4
===================================================================
RCS file: /sources/m4/m4/ltdl/m4/stackovf.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- ltdl/m4/stackovf.m4 4 May 2005 15:45:44 -0000 1.1
+++ ltdl/m4/stackovf.m4 16 Jun 2006 03:51:29 -0000 1.2
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# stackovf.m4 -- how do we deal with stack overflow?
#
-# Copyright (C) 2000, 2003 Gary V. Vaughan <address@hidden>
+# Copyright (C) 2000, 2003, 2006 Gary V. Vaughan <address@hidden>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,17 +18,17 @@
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
-# serial 2
+# serial 3
-# m4_SYS_STACKOVF
+# M4_SYS_STACKOVF
# ---------------
-AC_DEFUN([m4_SYS_STACKOVF],
-[AC_PREREQ(2.56)dnl We use the new compiler based header checking in 2.56
+AC_DEFUN([M4_SYS_STACKOVF],
+[AC_PREREQ([2.56])dnl We use the new compiler based header checking in 2.56
AC_REQUIRE([AC_TYPE_SIGNAL])dnl
-AC_CHECK_HEADERS(siginfo.h, [], [], [AC_INCLUDES_DEFAULT])
-AC_CHECK_FUNCS(sigaction sigaltstack sigstack sigvec)
-AC_MSG_CHECKING(if stack overflow is detectable)
+AC_CHECK_HEADERS([siginfo.h], [], [], [AC_INCLUDES_DEFAULT])
+AC_CHECK_FUNCS([sigaction sigaltstack sigstack sigvec])
+AC_MSG_CHECKING([if stack overflow is detectable])
# Code from Jim Avera <address@hidden>.
# stackovf.c requires:
# 1. Either sigaction with SA_ONSTACK, or sigvec with SV_ONSTACK
@@ -37,39 +37,39 @@
use_stackovf=no
if test "$ac_cv_func_sigaction" = yes || test "$ac_cv_func_sigvec" = yes; then
if test "$ac_cv_func_sigaltstack" = yes || test "$ac_cv_func_sigstack" =
yes; then
- AC_TRY_LINK([#include <sys/time.h>
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>
#include <sys/resource.h>
-#include <signal.h>],
- [struct rlimit r; int i; getrlimit (RLIMIT_STACK, &r)
+#include <signal.h>]],
+ [[struct rlimit r; int i; getrlimit (RLIMIT_STACK, &r)
#if (!defined(HAVE_SIGACTION) || !defined(SA_ONSTACK)) \
&& (!defined(HAVE_SIGVEC) || !defined(SV_ONSTACK))
choke me /* SA_ONSTACK and/or SV_ONSTACK are not defined */
-#endif],
- use_stackovf=yes)
+#endif]])],
+ [use_stackovf=yes])
fi
fi
-AC_MSG_RESULT($use_stackovf)
+AC_MSG_RESULT([$use_stackovf])
+AM_CONDITIONAL([STACKOVF], [test "$use_stackovf" = yes])
if test "$use_stackovf" = yes; then
- AC_DEFINE(USE_STACKOVF, 1, [Define to 1 if using stack overflow detection.])
- STACKOVF=stackovf.${U}o
- AC_SUBST(STACKOVF)
- AC_EGREP_HEADER(rlim_t, sys/resource.h, ,
- AC_DEFINE(rlim_t, int,
- [Define to int if rlim_t is not defined in <sys/resource.h>.]))
- AC_EGREP_HEADER(stack_t, signal.h, ,
- AC_DEFINE(stack_t, struct sigaltstack,
- [Define to struct sigaltstack if stack_t is not defined in
<sys/signal.h>.]))
- AC_EGREP_HEADER(sigcontext, signal.h,
- AC_DEFINE(HAVE_SIGCONTEXT, 1,
- [Define to 1 if <signal.h> declares sigcontext.]))
- AC_EGREP_HEADER(siginfo_t, signal.h,
- AC_DEFINE(HAVE_SIGINFO_T, 1,
- [Define to 1 if <signal.h> declares siginfo_t.]))
+ AC_DEFINE([USE_STACKOVF], [1],
+ [Define to 1 if using stack overflow detection.])
+ AC_EGREP_HEADER([rlim_t], [sys/resource.h], [],
+ [AC_DEFINE([rlim_t], [int],
+ [Define to int if rlim_t is not defined in <sys/resource.h>.])])
+ AC_EGREP_HEADER([stack_t], [signal.h], [],
+ [AC_DEFINE([stack_t], [struct sigaltstack],
+ [Define to struct sigaltstack if stack_t is not defined in
<sys/signal.h>.])])
+ AC_EGREP_HEADER([sigcontext], [signal.h],
+ [AC_DEFINE([HAVE_SIGCONTEXT], [1],
+ [Define to 1 if <signal.h> declares sigcontext.])])
+ AC_EGREP_HEADER([siginfo_t], [signal.h],
+ [AC_DEFINE([HAVE_SIGINFO_T], [1],
+ [Define to 1 if <signal.h> declares siginfo_t.])])
- AC_TRY_COMPILE([#include <signal.h>],
- [struct sigaltstack x; x.ss_base = 0;],
- AC_DEFINE(ss_sp, ss_base,
- [Define to ss_base if stack_t has ss_base instead of ss_sp.]))
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]],
+ [[struct sigaltstack x; x.ss_base = 0;]])],
+ [AC_DEFINE([ss_sp], [ss_base],
+ [Define to ss_base if stack_t has ss_base instead of ss_sp.])])
fi
-])# m4_SYS_STACKOVF
+])# M4_SYS_STACKOVF
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Changes to m4/ltdl/m4/stackovf.m4,v,
Eric Blake <=