]> gcc.gnu.org Git - gcc.git/commitdiff
Include <sys/random.h> for getentropy on Solaris
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 14 Aug 2018 22:51:36 +0000 (22:51 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Tue, 14 Aug 2018 22:51:36 +0000 (22:51 +0000)
* configure.ac: Check for <sys/random.h>.
* configure, config.h.in: Regenerate.
* intrinsics/random.c [HAVE_SYS_RANDOM_H]: Include <sys/random.h>.

From-SVN: r263543

libgfortran/ChangeLog
libgfortran/config.h.in
libgfortran/configure
libgfortran/configure.ac
libgfortran/intrinsics/random.c

index b8f238e777445cf07c3d1d8403be78a19c3c4f2c..c1e236e48c3f582ea96a0e4d08bb128d01f0e9dc 100644 (file)
@@ -1,3 +1,9 @@
+2018-08-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * configure.ac: Check for <sys/random.h>.
+       * configure, config.h.in: Regenerate.
+       * intrinsics/random.c [HAVE_SYS_RANDOM_H]: Include <sys/random.h>.
+
 2018-08-13  Janne Blomqvist  <jb@gcc.gnu.org>
 
        * configure.ac: Check for getentropy.
index 9ad64d57ab91f1cb8b61a56e39201a941faa91ee..65fd27c6b11c6a723609de3820192b8c21dd3ef7 100644 (file)
 /* Define to 1 if the target supports __sync_fetch_and_add */
 #undef HAVE_SYNC_FETCH_AND_ADD
 
+/* Define to 1 if you have the <sys/random.h> header file. */
+#undef HAVE_SYS_RANDOM_H
+
 /* Define to 1 if you have the <sys/resource.h> header file. */
 #undef HAVE_SYS_RESOURCE_H
 
index 42b4c0b5cb4dcdfbb811fe71919802fb8b13d980..a583b676a3e5e45b25e1251149dac172f7fcf429 100755 (executable)
@@ -2547,6 +2547,7 @@ $as_echo "$as_me: creating cache $cache_file" >&6;}
 fi
 
 as_fn_append ac_header_list " unistd.h"
+as_fn_append ac_header_list " sys/random.h"
 as_fn_append ac_header_list " sys/time.h"
 as_fn_append ac_header_list " sys/times.h"
 as_fn_append ac_header_list " sys/resource.h"
@@ -12513,7 +12514,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12516 "configure"
+#line 12517 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12619,7 +12620,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12622 "configure"
+#line 12623 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -16181,6 +16182,8 @@ done
 
 
 
+
+
 
 
 
index 900c7466decba1810833f276192b302b036d51d2..05952aa0d406df8b0a636af18ff9bcd6e5c89a0b 100644 (file)
@@ -275,8 +275,9 @@ AC_TYPE_UINTPTR_T
 AC_CHECK_TYPES([ptrdiff_t])
 
 # check header files (we assume C89 is available, so don't check for that)
-AC_CHECK_HEADERS_ONCE(unistd.h sys/time.h sys/times.h sys/resource.h \
-sys/types.h sys/stat.h sys/wait.h floatingpoint.h ieeefp.h fenv.h fptrap.h \
+AC_CHECK_HEADERS_ONCE(unistd.h sys/random.h sys/time.h sys/times.h \
+sys/resource.h sys/types.h sys/stat.h sys/wait.h \
+floatingpoint.h ieeefp.h fenv.h fptrap.h \
 fpxcp.h pwd.h complex.h xlocale.h)
 
 GCC_HEADER_STDINT(gstdint.h)
index 229fa6995c0ba365de989c433e66bc606846aeec..f84905e7c423d6c29da47dbd6cd712214b78d051 100644 (file)
@@ -37,6 +37,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #include <sys/stat.h>
 #include <fcntl.h>
 #include "time_1.h"
+#ifdef HAVE_SYS_RANDOM_H
+#include <sys/random.h>
+#endif
 
 #ifdef __MINGW32__
 #define HAVE_GETPID 1
This page took 0.088964 seconds and 5 git commands to generate.