* Re: [Emacs-diffs] master 100e339: Update from gnulib [not found] ` <20180201172144.5A58620856@vcs0.savannah.gnu.org> @ 2018-02-26 20:25 ` Ken Brown 2018-02-26 23:26 ` Paul Eggert 0 siblings, 1 reply; 4+ messages in thread From: Ken Brown @ 2018-02-26 20:25 UTC (permalink / raw) To: emacs-devel, Paul Eggert; +Cc: Bruno Haible 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 <unistd.h> 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. Ken ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master 100e339: Update from gnulib 2018-02-26 20:25 ` [Emacs-diffs] master 100e339: Update from gnulib Ken Brown @ 2018-02-26 23:26 ` Paul Eggert 2018-02-26 23:51 ` Ken Brown 0 siblings, 1 reply; 4+ messages in thread From: Paul Eggert @ 2018-02-26 23:26 UTC (permalink / raw) To: Ken Brown, emacs-devel; +Cc: Bruno Haible [-- Attachment #1: Type: text/plain, Size: 1138 bytes --] 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 >> <unistd.h> 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. [-- Attachment #2: unistd.diff --] [-- Type: text/x-patch, Size: 516 bytes --] diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 13f4bb6cd1..beeb8e1d6f 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -400,7 +400,7 @@ _GL_WARN_ON_USE (dup3, "dup3 is unportable - " #if @GNULIB_ENVIRON@ -# if defined __CYGWIN__ +# if defined __CYGWIN__ && !defined __i386__ /* The 'environ' variable is defined in a DLL. Therefore its declaration needs the '__declspec(dllimport)' attribute, but the system's <unistd.h> lacks it. This leads to a link error on 64-bit Cygwin when the option ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master 100e339: Update from gnulib 2018-02-26 23:26 ` Paul Eggert @ 2018-02-26 23:51 ` Ken Brown 2018-02-27 17:10 ` Paul Eggert 0 siblings, 1 reply; 4+ messages in thread From: Ken Brown @ 2018-02-26 23:51 UTC (permalink / raw) To: Paul Eggert, emacs-devel; +Cc: Bruno Haible On 2/26/2018 6:26 PM, Paul Eggert wrote: > 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 >>> <unistd.h> 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. Yes, thanks. Ken ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master 100e339: Update from gnulib 2018-02-26 23:51 ` Ken Brown @ 2018-02-27 17:10 ` Paul Eggert 0 siblings, 0 replies; 4+ messages in thread From: Paul Eggert @ 2018-02-27 17:10 UTC (permalink / raw) To: Ken Brown, emacs-devel; +Cc: Bruno Haible On 02/26/2018 03:51 PM, Ken Brown wrote: >> Does the attached patch fix the problem for you? If so, I can install >> it until Bruno comes up with something better. > > Yes, thanks. Thanks for checking; I installed it into Gnulib and propagated it into Emacs master. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-02-27 17:10 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20180201172143.17217.47676@vcs0.savannah.gnu.org> [not found] ` <20180201172144.5A58620856@vcs0.savannah.gnu.org> 2018-02-26 20:25 ` [Emacs-diffs] master 100e339: Update from gnulib Ken Brown 2018-02-26 23:26 ` Paul Eggert 2018-02-26 23:51 ` Ken Brown 2018-02-27 17:10 ` Paul Eggert
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.