GNU bug report logs -
#9960
Compiling Emacs trunk with MSVC
Previous Next
Reported by: Eli Zaretskii <eliz <at> gnu.org>
Date: Sat, 5 Nov 2011 11:24:02 UTC
Severity: normal
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #239 received at 9960 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 29 Nov 2011 08:58:34 -0800
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> CC: Chong Yidong <cyd <at> gnu.org>, mario <at> lassnig.net, 9772 <at> debbugs.gnu.org,
> 9960 <at> debbugs.gnu.org, 10155 <at> debbugs.gnu.org,
> Eli Zaretskii <eliz <at> gnu.org>
>
> You're right, on further thought Emacs itself needn't use stdalign,
> and I've prepared a simpler patch (below) that omits all changes to
> src/*. Gnulib now uses stdalign, though, and Emacs uses
> multiple Gnulib modules such as sha256 that use stdalign, so
> this patch still brings in the stdalign module for Gnulib's own
> purposes.
I understand that the only part needed for solving the problems with
the missing declaration of `environ' is this:
> === added file 'm4/environ.m4'
> --- m4/environ.m4 1970-01-01 00:00:00 +0000
> +++ m4/environ.m4 2011-11-29 16:38:21 +0000
> @@ -0,0 +1,47 @@
> +# environ.m4 serial 6
> +dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc.
> +dnl This file is free software; the Free Software Foundation
> +dnl gives unlimited permission to copy and/or distribute it,
> +dnl with or without modifications, as long as this notice is preserved.
> +
> +AC_DEFUN_ONCE([gl_ENVIRON],
> +[
> + AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
> + dnl Persuade glibc <unistd.h> to declare environ.
> + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
> +
> + AC_CHECK_HEADERS_ONCE([unistd.h])
> + gt_CHECK_VAR_DECL(
> + [#if HAVE_UNISTD_H
> + #include <unistd.h>
> + #endif
> + /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
> + #include <stdlib.h>
> + ],
> + [environ])
> + if test $gt_cv_var_environ_declaration != yes; then
> + HAVE_DECL_ENVIRON=0
> + fi
> +])
IOW, the reason why lib/unistd.in.h didn't do its job is that
HAVE_DECL_ENVIRON was not defined to zero.
If that is true, I wonder if we could have a much smaller change that
fixes just that single problem.
This bug report was last modified 13 years and 62 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.