aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2014-03-18 09:58:17 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2014-03-18 09:58:17 +0000
commitb5b58343505c66dcba0f45f4eefa04bd05d6755f (patch)
tree8296b4acc4cba130806c65f9898f5f88c18336c6 /libgfortran
parente2110f8f2f75e6f30f7b5a5d94a65faeb9eb0629 (diff)
downloadgcc-b5b58343505c66dcba0f45f4eefa04bd05d6755f.zip
gcc-b5b58343505c66dcba0f45f4eefa04bd05d6755f.tar.gz
gcc-b5b58343505c66dcba0f45f4eefa04bd05d6755f.tar.bz2
configure.ac: Check for presence of fcntl.
* configure.ac: Check for presence of fcntl. * configure: Regenerate. * config.h.in: Regenerate. * io/unix.c (set_close_on_exec): Check for HAVE_FCNTL. From-SVN: r208634
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog7
-rw-r--r--libgfortran/config.h.in3
-rwxr-xr-xlibgfortran/configure7
-rw-r--r--libgfortran/configure.ac2
-rw-r--r--libgfortran/io/unix.c2
5 files changed, 17 insertions, 4 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 4c9bc85..2dcea7d 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,10 @@
+2014-03-18 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * configure.ac: Check for presence of fcntl.
+ * configure: Regenerate.
+ * config.h.in: Regenerate.
+ * io/unix.c (set_close_on_exec): Check for HAVE_FCNTL.
+
2014-03-17 Jerry DeLisle <jvdelisle@gcc.gnu>
PR libfortran/48600
diff --git a/libgfortran/config.h.in b/libgfortran/config.h.in
index 74cf35c..8298f8d 100644
--- a/libgfortran/config.h.in
+++ b/libgfortran/config.h.in
@@ -360,6 +360,9 @@
/* Define to 1 if you have the `fabsl' function. */
#undef HAVE_FABSL
+/* Define to 1 if you have the `fcntl' function. */
+#undef HAVE_FCNTL
+
/* libm includes feenableexcept */
#undef HAVE_FEENABLEEXCEPT
diff --git a/libgfortran/configure b/libgfortran/configure
index bfb2408..23f57c7 100755
--- a/libgfortran/configure
+++ b/libgfortran/configure
@@ -2572,6 +2572,7 @@ as_fn_append ac_func_list " execve"
as_fn_append ac_func_list " pipe"
as_fn_append ac_func_list " dup2"
as_fn_append ac_func_list " close"
+as_fn_append ac_func_list " fcntl"
as_fn_append ac_func_list " strcasestr"
as_fn_append ac_func_list " getrlimit"
as_fn_append ac_func_list " gettimeofday"
@@ -12342,7 +12343,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12345 "configure"
+#line 12346 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12448,7 +12449,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12451 "configure"
+#line 12452 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -16602,6 +16603,8 @@ done
+
+
fi
# Check strerror_r, cannot be above as versions with two and three arguments exist
diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
index 6acc0f29..de2d65e 100644
--- a/libgfortran/configure.ac
+++ b/libgfortran/configure.ac
@@ -282,7 +282,7 @@ if test "x${with_newlib}" = "xyes"; then
else
AC_CHECK_FUNCS_ONCE(getrusage times mkstemp strtof strtold snprintf \
ftruncate chsize chdir getlogin gethostname kill link symlink sleep ttyname \
- alarm access fork execl wait setmode execve pipe dup2 close \
+ alarm access fork execl wait setmode execve pipe dup2 close fcntl \
strcasestr getrlimit gettimeofday stat fstat lstat getpwuid vsnprintf dup \
getcwd localtime_r gmtime_r getpwuid_r ttyname_r clock_gettime \
readlink getgid getpid getppid getuid geteuid umask getegid \
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index 9f78b62..34c2d0c 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -1077,7 +1077,7 @@ static void __attribute__ ((unused))
set_close_on_exec (int fd __attribute__ ((unused)))
{
/* Mingw does not define F_SETFD. */
-#if defined(F_SETFD) && defined(FD_CLOEXEC)
+#if defined(HAVE_FCNTL) && defined(F_SETFD) && defined(FD_CLOEXEC)
if (fd >= 0)
fcntl(fd, F_SETFD, FD_CLOEXEC);
#endif