bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: determining the stack bounds


From: Eric Blake
Subject: Re: determining the stack bounds
Date: Fri, 06 Jun 2008 06:46:49 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080421 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 6/6/2008 6:25 AM:
| According to Bruno Haible on 6/6/2008 5:29 AM:
| | The type of the third argument, according to POSIX, is 'void *ucp'.
| Why does
| | it have to be cast? Why is it not directly 'ucontext_t *ucp' (since,
| as you
| | say, ucontext_t will be defined in <signal.h>)?
|
| I think POSIX is catering to the fact that older platforms (in particular
| BSD) typed it as 'struct sigcontext *sc' instead.  More importantly,
| ucontext_t is an XSI extension; you can be POSIX compliant but not XSI
| compliant; in that case, you lack ucontext_t, and the third argument to a
| sigaction handler must be an unusable void* (which is pretty much what I
| discovered about OpenBSD 4.0).

I spoke too soon.  In POSIX 2001, ucontext_t is XSI.  But in 200x, it has
been promoted to CX (ie. mandatory for all POSIX implementations, but
still an extension to C99).

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhJMbkACgkQ84KuGfSFAYD39wCfc9+JvLLtlVqdzIBdyqURsAXW
Df8AnApIhDIt1STR0HXMDthT0PixWR5G
=M0wd
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]