* bug#10155: 23.3; HEAD broken by recent commit for emacsclient
@ 2011-11-28 17:19 Randal L. Schwartz
2011-11-28 18:07 ` Eli Zaretskii
0 siblings, 1 reply; 7+ messages in thread
From: Randal L. Schwartz @ 2011-11-28 17:19 UTC (permalink / raw)
To: 10155
The commit:
Author: Eli Zaretskii <eliz@gnu.org>
Date: Sun Nov 27 20:52:53 2011 +0200
Fix MS-Windows build with MSVC compiler.
Parts of the changes by Fabrice Popineau
<fabrice.popineau@supelec.fr>.
lib-src/makefile.w32-in (LOCAL_FLAGS): Add $(EMACS_EXTRA_C_FLAGS).
lib-src/emacsclient.c (main) <environ>: Remove declaration, already
pulled in by unistd.h on Posix hosts and stdlib.h on MS-Windows.
nt/inc/stdint.h (uint32_t, uint64_t) [_WIN64]: New typedefs.
(UINT64_MAX) [_WIN64]: Fix definition.
(uintmax_t, intmax_t): Fix definitions.
nt/inc/inttypes.h (strtoumax, strtoimax) [!__MINGW32__]: Provide
correct definitions.
nt/config.nt (HAVE_DECL_STRTOLL): Define.
(va_copy) [_WIN64]: Provide a better definition.
src/s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
(snprintf) [_MSC_VER]: Redirect to _snprintf.
(strtoll) [_MSC_VER]: Redirect to _strtoi64.
(malloc, free, realloc, calloc): Redirect to e_* only when
compiling Emacs.
src/lisp.h (GCTYPEBITS): Move before first use.
(ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
(DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
this macro definition.
(tzname): Redirect to _tzname for all values of _MSC_VER.
Broke emacsclient:
cd lib-src; make all \
CC='gcc -std=gnu99' CFLAGS='-g -O2' CPPFLAGS='' \
LDFLAGS='' MAKE='make'
gcc -std=gnu99 -c -Wimplicit-function-declaration
-Wold-style-definition -Wdeclaration-after-statement
-DHAVE_CONFIG_H -I. -I../src -I../lib
-I/Users/merlyn/MIRROR/emacs-GIT/lib-src
-I/Users/merlyn/MIRROR/emacs-GIT/lib-src/../src
-I/Users/merlyn/MIRROR/emacs-GIT/lib-src/../lib -g -O2
-DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \
/Users/merlyn/MIRROR/emacs-GIT/lib-src/../src/regex.c
gcc -std=gnu99 -Wimplicit-function-declaration -Wold-style-definition
-Wdeclaration-after-statement -DHAVE_CONFIG_H -I. -I../src
-I../lib -I/Users/merlyn/MIRROR/emacs-GIT/lib-src
-I/Users/merlyn/MIRROR/emacs-GIT/lib-src/../src
-I/Users/merlyn/MIRROR/emacs-GIT/lib-src/../lib -g -O2
-DEMACS_NAME="\"GNU Emacs\"" \
-DVERSION="\"24.0.91\""
/Users/merlyn/MIRROR/emacs-GIT/lib-src/etags.c \
regex.o ../lib/libgnu.a -o etags
gcc -std=gnu99 -Wimplicit-function-declaration -Wold-style-definition
-Wdeclaration-after-statement -DHAVE_CONFIG_H -I. -I../src
-I../lib -I/Users/merlyn/MIRROR/emacs-GIT/lib-src
-I/Users/merlyn/MIRROR/emacs-GIT/lib-src/../src
-I/Users/merlyn/MIRROR/emacs-GIT/lib-src/../lib -g -O2
-DCTAGS -DEMACS_NAME="\"GNU Emacs\"" \
-DVERSION="\"24.0.91\""
/Users/merlyn/MIRROR/emacs-GIT/lib-src/etags.c \
regex.o ../lib/libgnu.a -o ctags
gcc -std=gnu99 -Wimplicit-function-declaration -Wold-style-definition
-Wdeclaration-after-statement -DHAVE_CONFIG_H -I. -I../src
-I../lib -I/Users/merlyn/MIRROR/emacs-GIT/lib-src
-I/Users/merlyn/MIRROR/emacs-GIT/lib-src/../src
-I/Users/merlyn/MIRROR/emacs-GIT/lib-src/../lib -g -O2
/Users/merlyn/MIRROR/emacs-GIT/lib-src/emacsclient.c \
-DVERSION="\"24.0.91\"" \
../lib/libgnu.a -o emacsclient
/Users/merlyn/MIRROR/emacs-GIT/lib-src/emacsclient.c: In function
'set_local_socket':
/Users/merlyn/MIRROR/emacs-GIT/lib-src/emacsclient.c:1281: warning:
passing argument 2 of 'confstr' discards qualifiers from
pointer target type
/Users/merlyn/MIRROR/emacs-GIT/lib-src/emacsclient.c: In function
'main':
/Users/merlyn/MIRROR/emacs-GIT/lib-src/emacsclient.c:1639: error:
'environ' undeclared (first use in this function)
/Users/merlyn/MIRROR/emacs-GIT/lib-src/emacsclient.c:1639: error: (Each
undeclared identifier is reported only once
/Users/merlyn/MIRROR/emacs-GIT/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
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10155: 23.3; HEAD broken by recent commit for emacsclient
2011-11-28 17:19 bug#10155: 23.3; HEAD broken by recent commit for emacsclient Randal L. Schwartz
@ 2011-11-28 18:07 ` Eli Zaretskii
2011-11-28 18:13 ` Randal L. Schwartz
0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2011-11-28 18:07 UTC (permalink / raw)
To: Randal L. Schwartz; +Cc: 10155
> From: merlyn@stonehenge.com (Randal L. Schwartz)
> Date: Mon, 28 Nov 2011 09:19:23 -0800
The subject says 23.3, but my crystal ball says you are reporting a
problem with 24.0.91, right? Because I didn't commit anything to the
Emacs 23 branch.
> /Users/merlyn/MIRROR/emacs-GIT/lib-src/emacsclient.c: In function
> 'set_local_socket':
> /Users/merlyn/MIRROR/emacs-GIT/lib-src/emacsclient.c:1281: warning:
> passing argument 2 of 'confstr' discards qualifiers from
> pointer target type
Was this warning present before as well? I don't think it's related
to the change you blame.
> /Users/merlyn/MIRROR/emacs-GIT/lib-src/emacsclient.c: In function
> 'main':
> /Users/merlyn/MIRROR/emacs-GIT/lib-src/emacsclient.c:1639: error:
> 'environ' undeclared (first use in this function)
> /Users/merlyn/MIRROR/emacs-GIT/lib-src/emacsclient.c:1639: error: (Each
> undeclared identifier is reported only once
> /Users/merlyn/MIRROR/emacs-GIT/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
Which OS is that?
Can you tell which system header declares `environ' on that platform?
Sorry about the inconvenience.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10155: 23.3; HEAD broken by recent commit for emacsclient
2011-11-28 18:07 ` Eli Zaretskii
@ 2011-11-28 18:13 ` Randal L. Schwartz
2011-11-28 18:38 ` Eli Zaretskii
0 siblings, 1 reply; 7+ messages in thread
From: Randal L. Schwartz @ 2011-11-28 18:13 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 10155
>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
>> From: merlyn@stonehenge.com (Randal L. Schwartz)
>> Date: Mon, 28 Nov 2011 09:19:23 -0800
Eli> The subject says 23.3, but my crystal ball says you are reporting a
Eli> problem with 24.0.91, right? Because I didn't commit anything to the
Eli> Emacs 23 branch.
yes. sorry, since it wasn't something I could submit from within
the broken emacs, I copied to another system. correct.
>> /Users/merlyn/MIRROR/emacs-GIT/lib-src/emacsclient.c: In function
>> 'set_local_socket':
>> /Users/merlyn/MIRROR/emacs-GIT/lib-src/emacsclient.c:1281: warning:
>> passing argument 2 of 'confstr' discards qualifiers from
>> pointer target type
Eli> Was this warning present before as well? I don't think it's related
Eli> to the change you blame.
No idea. I tend to look at the build only when it breaks. :)
>> /Users/merlyn/MIRROR/emacs-GIT/lib-src/emacsclient.c: In function
>> 'main':
>> /Users/merlyn/MIRROR/emacs-GIT/lib-src/emacsclient.c:1639: error:
>> 'environ' undeclared (first use in this function)
>> /Users/merlyn/MIRROR/emacs-GIT/lib-src/emacsclient.c:1639: error: (Each
>> undeclared identifier is reported only once
>> /Users/merlyn/MIRROR/emacs-GIT/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
Eli> Which OS is that?
Darwin [redacted] 10.8.0 Darwin Kernel Version 10.8.0:
Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
OSX 10.6 essentially.
Eli> Can you tell which system header declares `environ' on that
Eli> platform?
None... just
extern char **environ;
says the manpage for environ.
http://developer.apple.com/library/mac/#documentation/darwin/reference/manpages/man7/environ.7.html
Eli> Sorry about the inconvenience.
No worries. That's why I smoketest every day.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10155: 23.3; HEAD broken by recent commit for emacsclient
2011-11-28 18:13 ` Randal L. Schwartz
@ 2011-11-28 18:38 ` Eli Zaretskii
2011-11-28 18:40 ` Randal L. Schwartz
2011-11-28 18:44 ` Dan Nicolaescu
0 siblings, 2 replies; 7+ messages in thread
From: Eli Zaretskii @ 2011-11-28 18:38 UTC (permalink / raw)
To: Randal L. Schwartz; +Cc: 10155
> From: merlyn@stonehenge.com (Randal L. Schwartz)
> Cc: 10155@debbugs.gnu.org
> Date: Mon, 28 Nov 2011 10:13:47 -0800
>
> Eli> Can you tell which system header declares `environ' on that
> Eli> platform?
>
> None... just
>
> extern char **environ;
>
> says the manpage for environ.
Then what would be the appropriate preprocessor symbol to guard such a
declaration? Would this do:
#if defined __APPLE__ && defined __MACH__
extern char **environ;
#endif
?
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10155: 23.3; HEAD broken by recent commit for emacsclient
2011-11-28 18:38 ` Eli Zaretskii
@ 2011-11-28 18:40 ` Randal L. Schwartz
2011-11-28 18:44 ` Dan Nicolaescu
1 sibling, 0 replies; 7+ messages in thread
From: Randal L. Schwartz @ 2011-11-28 18:40 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 10155
>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
Eli> Then what would be the appropriate preprocessor symbol to guard such a
Eli> declaration? Would this do:
Eli> #if defined __APPLE__ && defined __MACH__
Eli> extern char **environ;
Eli> #endif
Those are both true here, so I suppose so.
Dunno... not much of a cross-platform C developer... just trying to give
early warnings when my beloved Emacs fails on OSX.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10155: 23.3; HEAD broken by recent commit for emacsclient
2011-11-28 18:38 ` Eli Zaretskii
2011-11-28 18:40 ` Randal L. Schwartz
@ 2011-11-28 18:44 ` Dan Nicolaescu
2011-11-28 18:54 ` Eli Zaretskii
1 sibling, 1 reply; 7+ messages in thread
From: Dan Nicolaescu @ 2011-11-28 18:44 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 10155, Randal L. Schwartz
Eli Zaretskii <eliz@gnu.org> writes:
>> From: merlyn@stonehenge.com (Randal L. Schwartz)
>> Cc: 10155@debbugs.gnu.org
>> Date: Mon, 28 Nov 2011 10:13:47 -0800
>>
>> Eli> Can you tell which system header declares `environ' on that
>> Eli> platform?
>>
>> None... just
>>
>> extern char **environ;
>>
>> says the manpage for environ.
>
> Then what would be the appropriate preprocessor symbol to guard such a
> declaration? Would this do:
>
> #if defined __APPLE__ && defined __MACH__
> extern char **environ;
> #endif
Can this be done in gnulib?
Better hide such ugliness in the compatibility layer...
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10155: 23.3; HEAD broken by recent commit for emacsclient
2011-11-28 18:44 ` Dan Nicolaescu
@ 2011-11-28 18:54 ` Eli Zaretskii
0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2011-11-28 18:54 UTC (permalink / raw)
To: Dan Nicolaescu, Paul Eggert; +Cc: 10155, merlyn
> From: Dan Nicolaescu <dann@gnu.org>
> Cc: merlyn@stonehenge.com (Randal L. Schwartz), 10155@debbugs.gnu.org
> Date: Mon, 28 Nov 2011 13:44:01 -0500
>
> > #if defined __APPLE__ && defined __MACH__
> > extern char **environ;
> > #endif
>
> Can this be done in gnulib?
There's something there already, in lib/unistd.in.h:
#if @GNULIB_ENVIRON@
# if !@HAVE_DECL_ENVIRON@
/* Set of environment variables and values. An array of strings of the form
"VARIABLE=VALUE", terminated with a NULL. */
# if defined __APPLE__ && defined __MACH__
# include <crt_externs.h>
# define environ (*_NSGetEnviron ())
# else
So the question is, why doesn't this DTRT? Paul, can you help here?
I don't have access to OS X to try.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-11-28 18:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-28 17:19 bug#10155: 23.3; HEAD broken by recent commit for emacsclient Randal L. Schwartz
2011-11-28 18:07 ` Eli Zaretskii
2011-11-28 18:13 ` Randal L. Schwartz
2011-11-28 18:38 ` Eli Zaretskii
2011-11-28 18:40 ` Randal L. Schwartz
2011-11-28 18:44 ` Dan Nicolaescu
2011-11-28 18:54 ` Eli Zaretskii
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.