summaryrefslogtreecommitdiff
path: root/libbacktrace/configure.ac
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-18 18:06:28 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-18 18:06:28 +0000
commit7341e544a603b629235731ade8faace5666d1180 (patch)
tree44912af377a1284ca36611f9b8acc53b753eb783 /libbacktrace/configure.ac
parentd48b4b141d4e420c86aafb9f746b397bc04cfaa9 (diff)
downloadgcc-7341e544a603b629235731ade8faace5666d1180.tar.gz
* posix.c (O_BINARY): Define if not defined.
(backtrace_open): Pass O_BINARY to open. Only call fcntl if HAVE_FCNTL is defined. * configure.ac: Test for the fcntl function. * configure, config.h.in: Rebuild. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191443 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libbacktrace/configure.ac')
-rw-r--r--libbacktrace/configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/libbacktrace/configure.ac b/libbacktrace/configure.ac
index 495e23e5c68..250423d1943 100644
--- a/libbacktrace/configure.ac
+++ b/libbacktrace/configure.ac
@@ -201,6 +201,20 @@ if test "$ALLOC_FILE" = "alloc.lo"; then
fi
AC_SUBST(BACKTRACE_USES_MALLOC)
+# Check for the fcntl function.
+if test -n "${with_target_subdir}"; then
+ case "${host}" in
+ *-*-mingw*) have_fcntl=no ;;
+ *) have_fcntl=yes ;;
+ esac
+else
+ AC_CHECK_FUNC(fcntl, [have_fcntl=yes], [have_fcntl=no])
+fi
+if test "$have_fcntl" = "yes"; then
+ AC_DEFINE([HAVE_FCNTL], 1,
+ [Define to 1 if you have the fcntl function])
+fi
+
AC_CHECK_DECLS(strnlen)
AC_CACHE_CHECK([whether tests can run],