]> Savannah Git Hosting - gnulib.git/commitdiff
getrandom: do not depend on ‘open’ on mingw
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 28 Jun 2020 20:18:11 +0000 (13:18 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 28 Jun 2020 20:18:45 +0000 (13:18 -0700)
Similarly for at-internal, getloadavg.  These modules do not call
the ‘open’ function when they are compiled on mingw.  On mingw,
this avoids having to compile open.c when building Emacs, which
does its own thing with ‘open’.
* modules/at-internal, modules/getloadavg, modules/getrandom:
(Depends-on): Don’t depend on ‘open’ on mingw.
(Depends-on): Require AC_CANONICAL_HOST, for host_os.
* modules/getloadavg (Depends-on):
Depend on intprops, open, stdbool, stdlib only if compiling
getloadavg.c.

ChangeLog
modules/at-internal
modules/getloadavg
modules/getrandom

index 84a1bd47277e663a2691ca657aeb6e6794f34b4e..c6e26120eaac5e61fb39ea1f8550de8997dd7733 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2020-06-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       getrandom: do not depend on ‘open’ on mingw
+       Similarly for at-internal, getloadavg.  These modules do not call
+       the ‘open’ function when they are compiled on mingw.  On mingw,
+       this avoids having to compile open.c when building Emacs, which
+       does its own thing with ‘open’.
+       * modules/at-internal, modules/getloadavg, modules/getrandom:
+       (Depends-on): Don’t depend on ‘open’ on mingw.
+       (Depends-on): Require AC_CANONICAL_HOST, for host_os.
+       * modules/getloadavg (Depends-on):
+       Depend on intprops, open, stdbool, stdlib only if compiling
+       getloadavg.c.
+
 2020-06-28  Bruno Haible  <bruno@clisp.org>
 
        doc: Add a note about sigprocmask vs. pthread_sigmask.
index d58c9b0b4b679f8a4c453ab1630d849071eb0bdc..2a37779f7243e7ccbf95a765b759274d6fdbe86f 100644 (file)
@@ -9,11 +9,12 @@ Depends-on:
 errno
 fcntl-h
 intprops
-open
+open       [case $host_os in mingw*) false;; *) :;; esac]
 sys_stat
 unistd
 
 configure.ac:
+AC_REQUIRE([AC_CANONICAL_HOST])
 
 Makefile.am:
 lib_SOURCES += openat-priv.h openat-proc.c
index 8adb9a78487f7d2ba7473c443703cf7ba1f2bc4f..21955b782f60f883713bed63db39b65e47033dbb 100644 (file)
@@ -7,12 +7,13 @@ m4/getloadavg.m4
 
 Depends-on:
 extensions
-intprops
-open
-stdbool
-stdlib
+intprops  [test $HAVE_GETLOADAVG = 0]
+open      [case $host_os in mingw*) false;; *) test $HAVE_GETLOADAVG = 0;; esac]
+stdbool   [test $HAVE_GETLOADAVG = 0]
+stdlib    [test $HAVE_GETLOADAVG = 0]
 
 configure.ac:
+AC_REQUIRE([AC_CANONICAL_HOST])
 gl_GETLOADAVG
 if test $HAVE_GETLOADAVG = 0; then
   AC_LIBOBJ([getloadavg])
index 76437eb5adb0e9c36f78dea20555f969ae46f43d..f1c359706db3097a45c3c05da3a51a16fcf28e5d 100644 (file)
@@ -9,9 +9,10 @@ Depends-on:
 sys_random
 fcntl-h             [test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1]
 minmax              [test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1]
-open                [test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1]
+open                [case $host_os in mingw*) false;; *) test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1;; esac]
 
 configure.ac:
+AC_REQUIRE([AC_CANONICAL_HOST])
 gl_FUNC_GETRANDOM
 if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
   AC_LIBOBJ([getrandom])