* Change to process.c
@ 2005-05-22 2:44 Nick Roberts
2005-05-22 3:48 ` Eli Zaretskii
2005-05-22 9:34 ` Andreas Schwab
0 siblings, 2 replies; 6+ messages in thread
From: Nick Roberts @ 2005-05-22 2:44 UTC (permalink / raw)
Cc: hunterd42
I don't think this change can be right.
Nick
2005-05-21 David Hunter <hunterd42@comcast.net> (tiny change)
* process.c (send_process): Restore the SIGPIPE handler if we
catch a SIGPIPE.
gcc -c -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -DUSE_LUCID -I. -I/home/nick/emacs/src -D_BSD_SOURCE -I/usr/X11R6/include -g3 process.c
process.c: In function `send_process':
process.c:5295: warning: assignment from incompatible pointer type
process.c:5304: warning: passing arg 2 of `sys_signal' from incompatible pointer type
process.c:5323: warning: passing arg 2 of `sys_signal' from incompatible pointer type
process.c:5404: warning: passing arg 2 of `sys_signal' from incompatible pointer type
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Change to process.c
2005-05-22 2:44 Change to process.c Nick Roberts
@ 2005-05-22 3:48 ` Eli Zaretskii
2005-05-22 4:33 ` Nick Roberts
2005-05-22 9:34 ` Andreas Schwab
1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2005-05-22 3:48 UTC (permalink / raw)
Cc: hunterd42, emacs-devel
> From: Nick Roberts <nickrob@snap.net.nz>
> Date: Sun, 22 May 2005 14:44:20 +1200
> Cc: hunterd42@comcast.net
>
> gcc -c -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -DUSE_LUCID -I. -I/home/nick/emacs/src -D_BSD_SOURCE -I/usr/X11R6/include -g3 process.c
> process.c: In function `send_process':
> process.c:5295: warning: assignment from incompatible pointer type
> process.c:5304: warning: passing arg 2 of `sys_signal' from incompatible pointer type
> process.c:5323: warning: passing arg 2 of `sys_signal' from incompatible pointer type
> process.c:5404: warning: passing arg 2 of `sys_signal' from incompatible pointer type
What are the expansions of the macros that come into play here
(SIGTYPE, signal_handler_t), and what is the signature of sys_signal
on that machine?
Also, what version of GCC is that?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Change to process.c
2005-05-22 3:48 ` Eli Zaretskii
@ 2005-05-22 4:33 ` Nick Roberts
0 siblings, 0 replies; 6+ messages in thread
From: Nick Roberts @ 2005-05-22 4:33 UTC (permalink / raw)
Cc: hunterd42, emacs-devel
> What are the expansions of the macros that come into play here
> (SIGTYPE, signal_handler_t), and what is the signature of sys_signal
> on that machine?
old_sigpipe = (SIGTYPE (*) ()) signal (SIGPIPE, send_process_trap)
expands to:
old_sigpipe = (void (*) ()) sys_signal(13,send_process_trap)
signal (SIGPIPE, old_sigpipe) expands to: sys_signal(13,old_sigpipe)
What does "the signature of sys_signal" mean?
> Also, what version of GCC is that?
nickrob/37 gcc --version
gcc (GCC) 3.2 (Mandrake Linux 9.0 3.2-1mdk)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Nick
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Change to process.c
2005-05-22 2:44 Change to process.c Nick Roberts
2005-05-22 3:48 ` Eli Zaretskii
@ 2005-05-22 9:34 ` Andreas Schwab
2005-05-22 9:50 ` Andreas Schwab
1 sibling, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2005-05-22 9:34 UTC (permalink / raw)
Cc: hunterd42, emacs-devel
Nick Roberts <nickrob@snap.net.nz> writes:
> gcc -c -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -DUSE_LUCID -I. -I/home/nick/emacs/src -D_BSD_SOURCE -I/usr/X11R6/include -g3 process.c
> process.c: In function `send_process':
> process.c:5295: warning: assignment from incompatible pointer type
> process.c:5304: warning: passing arg 2 of `sys_signal' from incompatible pointer type
> process.c:5323: warning: passing arg 2 of `sys_signal' from incompatible pointer type
> process.c:5404: warning: passing arg 2 of `sys_signal' from incompatible pointer type
This was a misplaced volatile. It's not needed here in the first place,
so I removed it.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Change to process.c
2005-05-22 9:34 ` Andreas Schwab
@ 2005-05-22 9:50 ` Andreas Schwab
2005-05-22 19:47 ` David Hunter
0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2005-05-22 9:50 UTC (permalink / raw)
Cc: hunterd42, emacs-devel
Andreas Schwab <schwab@suse.de> writes:
> Nick Roberts <nickrob@snap.net.nz> writes:
>
>> gcc -c -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -DUSE_LUCID -I. -I/home/nick/emacs/src -D_BSD_SOURCE -I/usr/X11R6/include -g3 process.c
>> process.c: In function `send_process':
>> process.c:5295: warning: assignment from incompatible pointer type
>> process.c:5304: warning: passing arg 2 of `sys_signal' from incompatible pointer type
>> process.c:5323: warning: passing arg 2 of `sys_signal' from incompatible pointer type
>> process.c:5404: warning: passing arg 2 of `sys_signal' from incompatible pointer type
>
> This was a misplaced volatile. It's not needed here in the first place,
> so I removed it.
Looking closer, the volatile _is_ needed. But it needs to be placed at
the right side of the asterisk.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Change to process.c
2005-05-22 9:50 ` Andreas Schwab
@ 2005-05-22 19:47 ` David Hunter
0 siblings, 0 replies; 6+ messages in thread
From: David Hunter @ 2005-05-22 19:47 UTC (permalink / raw)
Cc: Nick Roberts, emacs-devel
Andreas Schwab wrote:
>>This was a misplaced volatile. It's not needed here in the first place,
>>so I removed it.
>
> Looking closer, the volatile _is_ needed. But it needs to be placed at
> the right side of the asterisk.
Oops.. oh yeah. I want a volatile pointer to a function that returns a pointer; not a pointer to a function that returns a volatile pointer.
Sorry for not weighing in during the discussion, but thanks for catching and fixing this.
(I can't find my C book!!)
-Dave
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-05-22 19:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-22 2:44 Change to process.c Nick Roberts
2005-05-22 3:48 ` Eli Zaretskii
2005-05-22 4:33 ` Nick Roberts
2005-05-22 9:34 ` Andreas Schwab
2005-05-22 9:50 ` Andreas Schwab
2005-05-22 19:47 ` David Hunter
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).