bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tempname: merge from glibc and coreutils


From: Bruno Haible
Subject: Re: [PATCH] tempname: merge from glibc and coreutils
Date: Sat, 27 Jun 2020 12:19:18 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-179-generic; KDE/5.18.0; x86_64; ; )

Paul Eggert wrote on 2020-05-31:
> * modules/tempname (Depends-on): Remove gettimeofday, sys_time.
> Add getentropy, libc-config.

On MSVC, this produces a link error in programs that use this module,
because of the function BCryptGenRandom. Such programs now need to link
with $(LIB_GETRANDOM).

Likewise for some modules which depend on 'tempname'. Here is the
reverse dependency tree:

getrandom <- tempname <- mkdtemp  <- clean-temp <- javacomp
                      <- mkstemp   <- stdlib-safer
                      <- mkstemps
                      <- mkostemp
                      <- mkostemps
                      <- tmpfile  <- tmpfile-safer
                                  <- argv-iter-tests


2020-06-27  Bruno Haible  <bruno@clisp.org>

        tempname et al.: Fix link errors on MSVC (regression from 2020-05-31).
        * modules/tempname (Link): New section.
        * modules/mkdtemp (Link): Likewise.
        * modules/clean-temp (Link): Likewise.
        * modules/mkstemp (Link): Likewise.
        * modules/stdlib-safer (Link): Likewise.
        * modules/mkstemps (Link): Likewise.
        * modules/mkostemp (Link): Likewise.
        * modules/mkostemps (Link): Likewise.
        * modules/tmpfile (Link): Likewise.
        * modules/tmpfile-safer (Link): Likewise.
        * modules/javacomp (Link): Add $(LIB_GETRANDOM).
        * modules/argv-iter-tests (Makefile.am): Link test-argv-iter with
        $(LIB_GETRANDOM).
        * NEWS: Mention the changes.

diff --git a/NEWS b/NEWS
index c8f78ea..5684494 100644
--- a/NEWS
+++ b/NEWS
@@ -58,6 +58,19 @@ User visible incompatible changes
 
 Date        Modules         Changes
 
+2020-06-27  tempname        The link requirements of these modules are changed
+            mkdtemp         from empty to $(LIB_GETRANDOM).
+            mkstemp
+            mkstemps
+            mkostemp
+            mkostemps
+            tmpfile
+            stdlib-safer
+            tmpfile-safer
+            clean-temp
+            javacomp        $(LIB_GETRANDOM) was added to the link requirements
+                            of this module.
+
 2020-05-27  read-file       The functions provided by this module now take an
                             'int flags' argument to modify the file reading
                             behavior.  The read_binary_file function has been
diff --git a/modules/argv-iter-tests b/modules/argv-iter-tests
index f32587e..97cbe50 100644
--- a/modules/argv-iter-tests
+++ b/modules/argv-iter-tests
@@ -10,3 +10,4 @@ configure.ac:
 Makefile.am:
 TESTS += test-argv-iter
 check_PROGRAMS += test-argv-iter
+test_argv_iter_LDADD = $(LDADD) $(LIB_GETRANDOM)
diff --git a/modules/clean-temp b/modules/clean-temp
index d5c44ee..abed9b9 100644
--- a/modules/clean-temp
+++ b/modules/clean-temp
@@ -31,6 +31,9 @@ lib_SOURCES += clean-temp.h clean-temp.c
 Include:
 "clean-temp.h"
 
+Link:
+$(LIB_GETRANDOM)
+
 License:
 GPL
 
diff --git a/modules/javacomp b/modules/javacomp
index 0552797..5f8f60f 100644
--- a/modules/javacomp
+++ b/modules/javacomp
@@ -43,6 +43,7 @@ Include:
 
 Link:
 $(LIB_MBRTOWC)
+$(LIB_GETRANDOM)
 
 License:
 GPL
diff --git a/modules/mkdtemp b/modules/mkdtemp
index 3bd83e2..13b2d5a 100644
--- a/modules/mkdtemp
+++ b/modules/mkdtemp
@@ -23,6 +23,9 @@ Makefile.am:
 Include:
 <stdlib.h>
 
+Link:
+$(LIB_GETRANDOM)
+
 License:
 LGPLv2+
 
diff --git a/modules/mkostemp b/modules/mkostemp
index afa49d6..460e842 100644
--- a/modules/mkostemp
+++ b/modules/mkostemp
@@ -26,6 +26,9 @@ Makefile.am:
 Include:
 <stdlib.h>
 
+Link:
+$(LIB_GETRANDOM)
+
 License:
 LGPLv2+
 
diff --git a/modules/mkostemps b/modules/mkostemps
index fb956f9..bb9fe71 100644
--- a/modules/mkostemps
+++ b/modules/mkostemps
@@ -25,6 +25,9 @@ Makefile.am:
 Include:
 <stdlib.h>
 
+Link:
+$(LIB_GETRANDOM)
+
 License:
 LGPLv2+
 
diff --git a/modules/mkstemp b/modules/mkstemp
index 780908f..d985715 100644
--- a/modules/mkstemp
+++ b/modules/mkstemp
@@ -24,6 +24,9 @@ Makefile.am:
 Include:
 <stdlib.h>
 
+Link:
+$(LIB_GETRANDOM)
+
 License:
 LGPLv2+
 
diff --git a/modules/mkstemps b/modules/mkstemps
index 61af8d5..1e5f097 100644
--- a/modules/mkstemps
+++ b/modules/mkstemps
@@ -24,6 +24,9 @@ Makefile.am:
 Include:
 <stdlib.h>
 
+Link:
+$(LIB_GETRANDOM)
+
 License:
 LGPLv2+
 
diff --git a/modules/stdlib-safer b/modules/stdlib-safer
index 8dbd682..80414b3 100644
--- a/modules/stdlib-safer
+++ b/modules/stdlib-safer
@@ -20,6 +20,9 @@ lib_SOURCES += mkstemp-safer.c
 Include:
 "stdlib-safer.h"
 
+Link:
+$(LIB_GETRANDOM)
+
 License:
 GPL
 
diff --git a/modules/tempname b/modules/tempname
index 0f692d3..ca88522 100644
--- a/modules/tempname
+++ b/modules/tempname
@@ -26,6 +26,9 @@ lib_SOURCES += tempname.c
 Include:
 "tempname.h"
 
+Link:
+$(LIB_GETRANDOM)
+
 License:
 LGPLv2+
 
diff --git a/modules/tmpfile b/modules/tmpfile
index 884f284..20b88c8 100644
--- a/modules/tmpfile
+++ b/modules/tmpfile
@@ -26,6 +26,9 @@ Makefile.am:
 Include:
 <stdio.h>
 
+Link:
+$(LIB_GETRANDOM)
+
 License:
 LGPL
 
diff --git a/modules/tmpfile-safer b/modules/tmpfile-safer
index d63559e..02e49d4 100644
--- a/modules/tmpfile-safer
+++ b/modules/tmpfile-safer
@@ -20,6 +20,9 @@ lib_SOURCES += tmpfile-safer.c
 Include:
 "stdio-safer.h"
 
+Link:
+$(LIB_GETRANDOM)
+
 License:
 GPL
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]