]> Savannah Git Hosting - gnulib.git/commitdiff
getopt-posix: port to mingw
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 12 May 2017 00:59:25 +0000 (17:59 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 12 May 2017 00:59:49 +0000 (17:59 -0700)
* lib/getopt.c (flockfile, funlockfile): Define on mingw.
Problem reported by Daniel P. Berrage in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-05/msg00086.html

ChangeLog
lib/getopt.c

index 0da6a991757c453584adbeac1158e1f42d1f1c73..c342f6c4a1db8b79a49d1a408a45c8e093c53bde 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-05-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+       getopt-posix: port to mingw
+       * lib/getopt.c (flockfile, funlockfile): Define on mingw.
+       Problem reported by Daniel P. Berrage in:
+       http://lists.gnu.org/archive/html/bug-gnulib/2017-05/msg00086.html
+
 2017-05-11 Bruno Haible  <bruno@clisp.org>
 
        gettimeofday: Increase precision on mingw.
index 543c8e7284d7247db1dbd00e15cbf6406f9a6f8b..1c0f78c05d5da892d045be0cd0038d817c5c8f96 100644 (file)
@@ -45,7 +45,8 @@
 # define _(msgid) gettext (msgid)
 /* When used standalone, flockfile and funlockfile might not be
    available.  */
-# ifndef _POSIX_THREAD_SAFE_FUNCTIONS
+# if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \
+      || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
 #  define flockfile(fp) /* nop */
 #  define funlockfile(fp) /* nop */
 # endif