On 02/26/2018 12:25 PM, Ken Brown wrote: > On 2/1/2018 12:21 PM, Paul Eggert wrote: >> +# if defined __CYGWIN__ >> +/* The 'environ' variable is defined in a DLL. Therefore its >> declaration needs >> +   the '__declspec(dllimport)' attribute, but the system's >> lacks it. >> +   This leads to a link error on 64-bit Cygwin when the option >> +   -Wl,--disable-auto-import is in use.  */ >> +_GL_EXTERN_C __declspec(dllimport) char **environ; >> +# endif > > This breaks the build on 32-bit Cygwin.  The build fails as follows: > >   CCLD     make-docfile.exe > /tmp/ccZciFa6.o: In function `main': > /home/kbrown/src/emacs/i686/lib-src/../../master/lib-src/emacsclient.c:1740: > undefined reference to `_imp__environ' > collect2: error: ld returned 1 exit status > > Bruno is aware of the issue; I first noticed it while building clisp > and reported it there.  But I thought I should report it here too in > case others bump into it. Thanks for the heads-up. Does the attached patch fix the problem for you? If so, I can install it until Bruno comes up with something better.