Subject: bug#9960: Compiling Emacs trunk with MSVC

From: YAMAMOTO Mitsuharu <[email-masked]>
Date: Mon, 28 Nov 2011 18:18:54 +0900

>>>>> On Sun, 27 Nov 2011 21:05:11 +0200, Eli Zaretskii <[email-masked]> said:

> Thanks.  I think I made all the changes needed for the MSVC 32-bit
> build.  You can try the latest bzr trunk, the changes are in
> revision 106533.  The next pretest of Emacs 24 is expected to be
> available tomorrow, so if you can try building that and reporting
> back, that'd be swell.

=== modified file 'lib-src/emacsclient.c'
*** lib-src/emacsclient.c	2011-11-14 20:23:26 +0000
--- lib-src/emacsclient.c	2011-11-27 18:52:53 +0000
***************
*** 1635,1641 ****
    /* Send over our environment and current directory. */
    if (!current_frame)
      {
-       extern char **environ;
        int i;
        for (i = 0; environ[i]; i++)
          {
--- 1635,1640 ----

The above change in revno 106533 causes the following error in
compilation on Mac OS X 10.7.  I tried autogen.sh, make distclean, and
make bootstrap, but that didn't help.

.../lib-src/emacsclient.c: In function ‘main’:
.../lib-src/emacsclient.c:1639: error: ‘environ’ undeclared (first use in this function)
.../lib-src/emacsclient.c:1639: error: (Each undeclared identifier is reported only once
.../lib-src/emacsclient.c:1639: error: for each function it appears in.)
make[2]: *** [emacsclient] Error 1
make[1]: *** [lib-src] Error 2
make: *** [bootstrap] Error 2

				     YAMAMOTO Mitsuharu
				[email-masked]