From: Paul Eggert Date: Fri, 12 May 2017 00:59:25 +0000 (-0700) Subject: getopt-posix: port to mingw X-Git-Tag: v1.0~6168 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=19fb4184b097eee0f17f16bdd40d60e3e6d91d45;p=gnulib.git 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 --- diff --git a/ChangeLog b/ChangeLog index 0da6a99175..c342f6c4a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2017-05-11 Paul Eggert + + 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 gettimeofday: Increase precision on mingw. diff --git a/lib/getopt.c b/lib/getopt.c index 543c8e7284..1c0f78c05d 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -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