* 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
+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
/* 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
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"
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
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
+
+
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 \
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