mailing list of musl libc
 help / color / mirror / code / Atom feed
* SIG_* in signal.h
@ 2012-05-16 22:12 Szabolcs Nagy
  2012-05-16 23:05 ` Isaac Dunham
  2012-05-17  0:14 ` Rich Felker
  0 siblings, 2 replies; 8+ messages in thread
From: Szabolcs Nagy @ 2012-05-16 22:12 UTC (permalink / raw)
  To: musl

i just tried to compile pcc using musl
and it failed because SIG_IGN was undefined

it seem SIG_ING, SIG_ERR, SIG_DFL are ifdefed
with various featuretest macros in signal.h
eventhough they are ansic



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: SIG_* in signal.h
  2012-05-16 22:12 SIG_* in signal.h Szabolcs Nagy
@ 2012-05-16 23:05 ` Isaac Dunham
  2012-05-16 23:11   ` Szabolcs Nagy
  2012-05-17  0:14 ` Rich Felker
  1 sibling, 1 reply; 8+ messages in thread
From: Isaac Dunham @ 2012-05-16 23:05 UTC (permalink / raw)
  To: musl

On Thu, 17 May 2012 00:12:27 +0200
Szabolcs Nagy <nsz@port70.net> wrote:

> i just tried to compile pcc using musl
> and it failed because SIG_IGN was undefined
> 
> it seem SIG_ING, SIG_ERR, SIG_DFL are ifdefed
> with various featuretest macros in signal.h
> eventhough they are ansic
> 
Not what stopped it for me: 

/opt/musl/bin/pcc -std=c99 -ffreestanding -nostdinc
-D_XOPEN_SOURCE=700 -I./src/internal -I./include -I./arch/i386  -Os
-pipe -O2 -c -o src/complex/__cexp.o src/complex/__cexp.c
src/complex/__cexp.c, line 72: operands of CAST have incompatible types
src/complex/__cexp.c, line 73: operands of CAST have incompatible types
make: *** [src/complex/__cexp.o] Error 1



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: SIG_* in signal.h
  2012-05-16 23:05 ` Isaac Dunham
@ 2012-05-16 23:11   ` Szabolcs Nagy
  2012-05-16 23:21     ` Szabolcs Nagy
  2012-05-17  0:06     ` Isaac Dunham
  0 siblings, 2 replies; 8+ messages in thread
From: Szabolcs Nagy @ 2012-05-16 23:11 UTC (permalink / raw)
  To: musl

* Isaac Dunham <idunham@lavabit.com> [2012-05-16 16:05:12 -0700]:

> On Thu, 17 May 2012 00:12:27 +0200
> Szabolcs Nagy <nsz@port70.net> wrote:
> 
> > i just tried to compile pcc using musl
> > and it failed because SIG_IGN was undefined
> > 
> > it seem SIG_ING, SIG_ERR, SIG_DFL are ifdefed
> > with various featuretest macros in signal.h
> > eventhough they are ansic
> > 
> Not what stopped it for me: 
> 
you are compiling musl with pcc and not pcc with musl :)

> /opt/musl/bin/pcc -std=c99 -ffreestanding -nostdinc
> -D_XOPEN_SOURCE=700 -I./src/internal -I./include -I./arch/i386  -Os
> -pipe -O2 -c -o src/complex/__cexp.o src/complex/__cexp.c
> src/complex/__cexp.c, line 72: operands of CAST have incompatible types
> src/complex/__cexp.c, line 73: operands of CAST have incompatible types
> make: *** [src/complex/__cexp.o] Error 1
i could compile recent musl with recent pcc without errors


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: SIG_* in signal.h
  2012-05-16 23:11   ` Szabolcs Nagy
@ 2012-05-16 23:21     ` Szabolcs Nagy
  2012-05-17  0:06     ` Isaac Dunham
  1 sibling, 0 replies; 8+ messages in thread
From: Szabolcs Nagy @ 2012-05-16 23:21 UTC (permalink / raw)
  To: musl

* Szabolcs Nagy <nsz@port70.net> [2012-05-17 01:11:20 +0200]:
> * Isaac Dunham <idunham@lavabit.com> [2012-05-16 16:05:12 -0700]:
> > /opt/musl/bin/pcc -std=c99 -ffreestanding -nostdinc
> > -D_XOPEN_SOURCE=700 -I./src/internal -I./include -I./arch/i386  -Os
> > -pipe -O2 -c -o src/complex/__cexp.o src/complex/__cexp.c
> > src/complex/__cexp.c, line 72: operands of CAST have incompatible types
> > src/complex/__cexp.c, line 73: operands of CAST have incompatible types
> > make: *** [src/complex/__cexp.o] Error 1
> i could compile recent musl with recent pcc without errors

sorry my musl was out of date and i had local modifications as well
so yes the complex code does not build

and in src/network/h_errno.c the undef is broken

otherwise it seems to work here


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: SIG_* in signal.h
  2012-05-16 23:11   ` Szabolcs Nagy
  2012-05-16 23:21     ` Szabolcs Nagy
@ 2012-05-17  0:06     ` Isaac Dunham
  1 sibling, 0 replies; 8+ messages in thread
From: Isaac Dunham @ 2012-05-17  0:06 UTC (permalink / raw)
  To: musl

On Thu, 17 May 2012 01:11:20 +0200
Szabolcs Nagy <nsz@port70.net> wrote:

> * Isaac Dunham <idunham@lavabit.com> [2012-05-16 16:05:12 -0700]:
> 
> > On Thu, 17 May 2012 00:12:27 +0200
> > Szabolcs Nagy <nsz@port70.net> wrote:
> > 
> > > i just tried to compile pcc using musl
> > > and it failed because SIG_IGN was undefined
> > > 
> > > it seem SIG_ING, SIG_ERR, SIG_DFL are ifdefed
> > > with various featuretest macros in signal.h
> > > eventhough they are ansic
> > > 
> > Not what stopped it for me: 
> > 
> you are compiling musl with pcc and not pcc with musl :)

Mixed up on the wires.
> > /opt/musl/bin/pcc -std=c99 -ffreestanding -nostdinc
> > -D_XOPEN_SOURCE=700 ....
Everything in /opt/musl is built against a fairly current musl...
pcc was built against my 'fixes' (really ought to be "hacks" ;) ) 
branch, which is current enough that this morning, 
git pull origin master 
said it was up-to-date.
pcc & pcc-libs are version 20120516.
I used -D_BSD_SOURCE and maybe also -D_GNU_SOURCE, though.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: SIG_* in signal.h
  2012-05-16 22:12 SIG_* in signal.h Szabolcs Nagy
  2012-05-16 23:05 ` Isaac Dunham
@ 2012-05-17  0:14 ` Rich Felker
  2012-05-17  3:49   ` Isaac Dunham
  2012-05-17  6:53   ` Szabolcs Nagy
  1 sibling, 2 replies; 8+ messages in thread
From: Rich Felker @ 2012-05-17  0:14 UTC (permalink / raw)
  To: musl

On Thu, May 17, 2012 at 12:12:27AM +0200, Szabolcs Nagy wrote:
> i just tried to compile pcc using musl
> and it failed because SIG_IGN was undefined
> 
> it seem SIG_ING, SIG_ERR, SIG_DFL are ifdefed
> with various featuretest macros in signal.h
> eventhough they are ansic

Are you sure? I don't see that problem in my version and as far as I
know I fixed that bug about a year ago...

Rich


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: SIG_* in signal.h
  2012-05-17  0:14 ` Rich Felker
@ 2012-05-17  3:49   ` Isaac Dunham
  2012-05-17  6:53   ` Szabolcs Nagy
  1 sibling, 0 replies; 8+ messages in thread
From: Isaac Dunham @ 2012-05-17  3:49 UTC (permalink / raw)
  To: musl

On Wed, 16 May 2012 20:14:16 -0400
Rich Felker <dalias@aerifal.cx> wrote:

> On Thu, May 17, 2012 at 12:12:27AM +0200, Szabolcs Nagy wrote:
> > i just tried to compile pcc using musl
> > and it failed because SIG_IGN was undefined
> > 
> > it seem SIG_ING, SIG_ERR, SIG_DFL are ifdefed
> > with various featuretest macros in signal.h
> > eventhough they are ansic
> 
> Are you sure? I don't see that problem in my version and as far as I
> know I fixed that bug about a year ago...
Don't see it here, either. OTOH, it's not easy to see that it isn't the
case.
Line 205 marks the end of the #ifdef _EVERYBODY_AND_HIS_DOG_SOURCE
macros, which start at lines 8 & 9.  I'd like to see an editor where
you can tell that without reading every line in between...(not to start
a war over editors, mind you!)
This is where I see a reason for stuff like:
#endif /* XOPEN/GNU/POSIX */
A comment after every endif (like glibc does) is rather absurd, though.

And it seems to me that usually the non-macro-protected code goes on
top, making it clearer what is ANSI...

Not to say that it's wrong, just that it could be clearer.

Isaac Dunham



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: SIG_* in signal.h
  2012-05-17  0:14 ` Rich Felker
  2012-05-17  3:49   ` Isaac Dunham
@ 2012-05-17  6:53   ` Szabolcs Nagy
  1 sibling, 0 replies; 8+ messages in thread
From: Szabolcs Nagy @ 2012-05-17  6:53 UTC (permalink / raw)
  To: musl

* Rich Felker <dalias@aerifal.cx> [2012-05-16 20:14:16 -0400]:
> On Thu, May 17, 2012 at 12:12:27AM +0200, Szabolcs Nagy wrote:
> > it seem SIG_ING, SIG_ERR, SIG_DFL are ifdefed
> > with various featuretest macros in signal.h
> > eventhough they are ansic
> 
> Are you sure? I don't see that problem in my version and as far as I
> know I fixed that bug about a year ago...
> 
sorry it was looking at the wrong musl


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-05-17  6:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-16 22:12 SIG_* in signal.h Szabolcs Nagy
2012-05-16 23:05 ` Isaac Dunham
2012-05-16 23:11   ` Szabolcs Nagy
2012-05-16 23:21     ` Szabolcs Nagy
2012-05-17  0:06     ` Isaac Dunham
2012-05-17  0:14 ` Rich Felker
2012-05-17  3:49   ` Isaac Dunham
2012-05-17  6:53   ` Szabolcs Nagy

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).