aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorcypherpunks <cypherpunks@torproject.org>2016-03-28 19:59:35 +0000
committerNick Mathewson <nickm@torproject.org>2016-12-23 10:34:11 -0500
commitbe080a402fc780c8211eb2117ddf0150cfd7a946 (patch)
treebb46058cd30edcdcfa08669c2a74faaa92989088 /m4
parent0087fe36c10554dca69697912fceb1a97601e1ca (diff)
downloadtor-be080a402fc780c8211eb2117ddf0150cfd7a946.tar.gz
tor-be080a402fc780c8211eb2117ddf0150cfd7a946.zip
Replace obsolete macros with modern equivalents
Diffstat (limited to 'm4')
-rw-r--r--m4/ax_check_sign.m44
-rw-r--r--m4/pc_from_ucontext.m420
2 files changed, 12 insertions, 12 deletions
diff --git a/m4/ax_check_sign.m4 b/m4/ax_check_sign.m4
index 104b17014c..d67e114dba 100644
--- a/m4/ax_check_sign.m4
+++ b/m4/ax_check_sign.m4
@@ -41,8 +41,8 @@ AU_ALIAS([VL_CHECK_SIGN], [AX_CHECK_SIGN])
AC_DEFUN([AX_CHECK_SIGN], [
typename=`echo $1 | sed "s/@<:@^a-zA-Z0-9_@:>@/_/g"`
AC_CACHE_CHECK([whether $1 is signed], ax_cv_decl_${typename}_signed, [
- AC_TRY_COMPILE([$4],
- [ int foo @<:@ 1 - 2 * !((($1) -1) < 0) @:>@ ],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$4]],
+ [[ int foo @<:@ 1 - 2 * !((($1) -1) < 0) @:>@ ]])],
[ eval "ax_cv_decl_${typename}_signed=\"yes\"" ],
[ eval "ax_cv_decl_${typename}_signed=\"no\"" ])])
symbolname=`echo $1 | sed "s/@<:@^a-zA-Z0-9_@:>@/_/g" | tr "a-z" "A-Z"`
diff --git a/m4/pc_from_ucontext.m4 b/m4/pc_from_ucontext.m4
index 8a9dc459e6..9b66bf752c 100644
--- a/m4/pc_from_ucontext.m4
+++ b/m4/pc_from_ucontext.m4
@@ -79,29 +79,29 @@ AC_DEFUN([AC_PC_FROM_UCONTEXT],
if ! $pc_field_found; then
# Prefer sys/ucontext.h to ucontext.h, for OS X's sake.
if test "x$ac_cv_header_cygwin_signal_h" = xyes; then
- AC_TRY_COMPILE([#include <cygwin/signal.h>],
- [ucontext_t u; return u.$pc_field == 0;],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cygwin/signal.h>]],
+ [[ucontext_t u; return u.$pc_field == 0;]])],
AC_DEFINE_UNQUOTED(PC_FROM_UCONTEXT, $pc_field,
How to access the PC from a struct ucontext)
AC_MSG_RESULT([$pc_field])
pc_field_found=true)
elif test "x$ac_cv_header_sys_ucontext_h" = xyes; then
- AC_TRY_COMPILE([#include <sys/ucontext.h>],
- [ucontext_t u; return u.$pc_field == 0;],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/ucontext.h>]],
+ [[ucontext_t u; return u.$pc_field == 0;]])],
AC_DEFINE_UNQUOTED(PC_FROM_UCONTEXT, $pc_field,
How to access the PC from a struct ucontext)
AC_MSG_RESULT([$pc_field])
pc_field_found=true)
elif test "x$ac_cv_header_ucontext_h" = xyes; then
- AC_TRY_COMPILE([#include <ucontext.h>],
- [ucontext_t u; return u.$pc_field == 0;],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <ucontext.h>]],
+ [[ucontext_t u; return u.$pc_field == 0;]])],
AC_DEFINE_UNQUOTED(PC_FROM_UCONTEXT, $pc_field,
How to access the PC from a struct ucontext)
AC_MSG_RESULT([$pc_field])
pc_field_found=true)
else # hope some standard header gives it to us
- AC_TRY_COMPILE([],
- [ucontext_t u; return u.$pc_field == 0;],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
+ [[ucontext_t u; return u.$pc_field == 0;]])],
AC_DEFINE_UNQUOTED(PC_FROM_UCONTEXT, $pc_field,
How to access the PC from a struct ucontext)
AC_MSG_RESULT([$pc_field])
@@ -114,8 +114,8 @@ AC_DEFUN([AC_PC_FROM_UCONTEXT],
pc_fields="$pc_fields sc_rip" # OpenBSD (x86_64)
for pc_field in $pc_fields; do
if ! $pc_field_found; then
- AC_TRY_COMPILE([#include <signal.h>],
- [ucontext_t u; return u.$pc_field == 0;],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]],
+ [[ucontext_t u; return u.$pc_field == 0;]])],
AC_DEFINE_UNQUOTED(PC_FROM_UCONTEXT, $pc_field,
How to access the PC from a struct ucontext)
AC_MSG_RESULT([$pc_field])