aboutsummaryrefslogtreecommitdiff
path: root/libbacktrace/configure
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2012-09-18 18:06:28 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-09-18 18:06:28 +0000
commit3319ef17d271118e08da767daad9341cbe67c4e0 (patch)
tree44912af377a1284ca36611f9b8acc53b753eb783 /libbacktrace/configure
parentbd3e497d0bab06d287a86af07fda9b6cade4e43f (diff)
downloadgcc-3319ef17d271118e08da767daad9341cbe67c4e0.zip
gcc-3319ef17d271118e08da767daad9341cbe67c4e0.tar.gz
gcc-3319ef17d271118e08da767daad9341cbe67c4e0.tar.bz2
posix.c (O_BINARY): Define if not defined.
* 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. From-SVN: r191443
Diffstat (limited to 'libbacktrace/configure')
-rwxr-xr-xlibbacktrace/configure21
1 files changed, 21 insertions, 0 deletions
diff --git a/libbacktrace/configure b/libbacktrace/configure
index 518e99e..70ac451 100755
--- a/libbacktrace/configure
+++ b/libbacktrace/configure
@@ -11713,6 +11713,27 @@ if test "$ALLOC_FILE" = "alloc.lo"; then
fi
+# 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_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl"
+if test "x$ac_cv_func_fcntl" = x""yes; then :
+ have_fcntl=yes
+else
+ have_fcntl=no
+fi
+
+fi
+if test "$have_fcntl" = "yes"; then
+
+$as_echo "#define HAVE_FCNTL 1" >>confdefs.h
+
+fi
+
ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
if test "x$ac_cv_have_decl_strnlen" = x""yes; then :
ac_have_decl=1