aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorcypherpunks <cypherpunks@torproject.org>2016-06-17 13:43:25 +0000
committerNick Mathewson <nickm@torproject.org>2016-06-17 10:17:44 -0400
commit94762e37b950f3ce1696c78dd4f7a89b6d05f1ac (patch)
treee9b3517710fc601d2e7cac22d0620498cc145a0c /m4
parent9a63f059b9eefa910a8c74b4936623dd37e946dd (diff)
downloadtor-94762e37b950f3ce1696c78dd4f7a89b6d05f1ac.tar.gz
tor-94762e37b950f3ce1696c78dd4f7a89b6d05f1ac.zip
Use the Autoconf macro AC_USE_SYSTEM_EXTENSIONS
The Autoconf macro AC_USE_SYSTEM_EXTENSIONS defines preprocessor macros which turn on extensions to C and POSIX. The macro also makes it easier for developers to use the extensions without needing (or forgetting) to define them manually. The macro can be safely used because it was introduced in Autoconf 2.60 and Tor requires Autoconf 2.63 and above.
Diffstat (limited to 'm4')
-rw-r--r--m4/pc_from_ucontext.m49
1 files changed, 3 insertions, 6 deletions
diff --git a/m4/pc_from_ucontext.m4 b/m4/pc_from_ucontext.m4
index 6bedcbb2da..8a9dc459e6 100644
--- a/m4/pc_from_ucontext.m4
+++ b/m4/pc_from_ucontext.m4
@@ -79,24 +79,21 @@ 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([#define _GNU_SOURCE 1
- #include <cygwin/signal.h>],
+ AC_TRY_COMPILE([#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([#define _GNU_SOURCE 1
- #include <sys/ucontext.h>],
+ AC_TRY_COMPILE([#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([#define _GNU_SOURCE 1
- #include <ucontext.h>],
+ AC_TRY_COMPILE([#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)