]> Savannah Git Hosting - gnulib.git/commitdiff
unistd: Remove conflicting declaration of getrandom().
authorBruno Haible <bruno@clisp.org>
Sat, 30 May 2020 13:15:55 +0000 (15:15 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 30 May 2020 13:15:55 +0000 (15:15 +0200)
* lib/unistd.in.h (getrandom): Remove declaration.
* m4/unistd_h.m4 (gl_UNISTD_H): Don't test whether getrandom is
declared.
(gl_UNISTD_H_DEFAULTS): Don't initialize GNULIB_GETRANDOM,
HAVE_GETRANDOM.
* modules/unistd (Makefile.am): Don't substitute GNULIB_GETRANDOM,
HAVE_GETRANDOM.

ChangeLog
lib/unistd.in.h
m4/unistd_h.m4
modules/unistd

index 521ee3c084c745b07e060e06c9c56bbaa9459ae3..2cb7edd31cfbc4e91ff07e5572b330d8de37da1b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2020-05-30  Bruno Haible  <bruno@clisp.org>
+
+       unistd: Remove conflicting declaration of getrandom().
+       * lib/unistd.in.h (getrandom): Remove declaration.
+       * m4/unistd_h.m4 (gl_UNISTD_H): Don't test whether getrandom is
+       declared.
+       (gl_UNISTD_H_DEFAULTS): Don't initialize GNULIB_GETRANDOM,
+       HAVE_GETRANDOM.
+       * modules/unistd (Makefile.am): Don't substitute GNULIB_GETRANDOM,
+       HAVE_GETRANDOM.
+
 2020-05-30  Bruno Haible  <bruno@clisp.org>
 
        getrandom: Add tests.
index 4a0d6655af8cd1cc3cad356e7a9ac5639021ec9d..906f806c3ec5de025a7b0f51613c535f27eec8cd 100644 (file)
@@ -1030,24 +1030,6 @@ _GL_WARN_ON_USE (getpass, "getpass is unportable - "
 #endif
 
 
-#if @GNULIB_GETRANDOM@
-/* Fill a buffer with random bytes.  */
-# if !@HAVE_GETRANDOM@
-_GL_FUNCDECL_SYS (getrandom, int, (void *buffer, size_t length,
-                                   unsigned int flags));
-# endif
-_GL_CXXALIAS_SYS (getrandom, int, (void *buffer, size_t length,
-                                   unsigned int flags));
-_GL_CXXALIASWARN (getrandom);
-#elif defined GNULIB_POSIXCHECK
-# undef getrandom
-# if HAVE_RAW_DECL_GETRANDOM
-_GL_WARN_ON_USE (getrandom, "getrandom is unportable - "
-                 "use gnulib module getrandom for portability");
-# endif
-#endif
-
-
 #if @GNULIB_GETUSERSHELL@
 /* Return the next valid login shell on the system, or NULL when the end of
    the list has been reached.  */
index 1f39d53e1fa8c391554cb3fa5a695e41aeef67ca..a3b4633f6824528aa97d021369ac3e13590582fb 100644 (file)
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 78
+# unistd_h.m4 serial 79
 dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -44,7 +44,7 @@ AC_DEFUN([gl_UNISTD_H],
     ]], [access chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir
     fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize
     getentropy getgroups gethostname getlogin getlogin_r getpagesize getpass
-    getrandom getusershell setusershell endusershell
+    getusershell setusershell endusershell
     group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
     readlink readlinkat rmdir sethostname sleep symlink symlinkat
     truncate ttyname_r unlink unlinkat usleep])
@@ -90,7 +90,6 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   GNULIB_GETOPT_POSIX=0;         AC_SUBST([GNULIB_GETOPT_POSIX])
   GNULIB_GETPAGESIZE=0;          AC_SUBST([GNULIB_GETPAGESIZE])
   GNULIB_GETPASS=0;              AC_SUBST([GNULIB_GETPASS])
-  GNULIB_GETRANDOM=0;            AC_SUBST([GNULIB_GETRANDOM])
   GNULIB_GETUSERSHELL=0;         AC_SUBST([GNULIB_GETUSERSHELL])
   GNULIB_GROUP_MEMBER=0;         AC_SUBST([GNULIB_GROUP_MEMBER])
   GNULIB_ISATTY=0;               AC_SUBST([GNULIB_ISATTY])
@@ -137,7 +136,6 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_GETLOGIN=1;        AC_SUBST([HAVE_GETLOGIN])
   HAVE_GETPAGESIZE=1;     AC_SUBST([HAVE_GETPAGESIZE])
   HAVE_GETPASS=1;         AC_SUBST([HAVE_GETPASS])
-  HAVE_GETRANDOM=1;       AC_SUBST([HAVE_GETRANDOM])
   HAVE_GROUP_MEMBER=1;    AC_SUBST([HAVE_GROUP_MEMBER])
   HAVE_LCHOWN=1;          AC_SUBST([HAVE_LCHOWN])
   HAVE_LINK=1;            AC_SUBST([HAVE_LINK])
index dc32ce056e849aabe13abd33b34878c5e1a50fd1..f075b780291f1f46dbe77ba8c866aacd38cc9100 100644 (file)
@@ -63,7 +63,6 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's/@''GNULIB_GETOPT_POSIX''@/$(GNULIB_GETOPT_POSIX)/g' \
              -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
              -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \
-             -e 's/@''GNULIB_GETRANDOM''@/$(GNULIB_GETRANDOM)/g' \
              -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
              -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
              -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
@@ -110,7 +109,6 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
              -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
              -e 's|@''HAVE_GETPASS''@|$(HAVE_GETPASS)|g' \
-             -e 's|@''HAVE_GETRANDOM''@|$(HAVE_GETRANDOM)|g' \
              -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
              -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
              -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \