Discussion:
SIGBUS -> SIGSEGV
(too old to reply)
Salvatore Benedetto
2008-08-30 13:58:43 UTC
Permalink
Hi there,

while trying to compile tcl within Haiku, the build process
failed in a switch case on SIGBUS saying that it was already
defined a few lines above, where actually the case SIGSEGV
was. So I looked up in the Haiku code and found the following

#define SIGBUS SIGSEGV /* for old style code */

What does exactly old style code means? Is this still needed?

Regards,
--
Salvatore Benedetto (a.k.a. emitrax)
Student of Computer Engineer
University of Pisa
www.haiku-os.it
Ingo Weinhold
2008-08-30 23:13:55 UTC
Permalink
Post by Salvatore Benedetto
while trying to compile tcl within Haiku, the build process
failed in a switch case on SIGBUS saying that it was already
defined a few lines above, where actually the case SIGSEGV
was. So I looked up in the Haiku code and found the following
#define SIGBUS SIGSEGV /* for old style code */
What does exactly old style code means? Is this still needed?
SIGBUS is defined by POSIX, so we'll have to keep it. I'm afraid you'll have
to "#ifndef __HAIKU__" the SIGBUS case.

CU, Ingo
Salvatore Benedetto
2008-08-30 23:22:56 UTC
Permalink
Post by Ingo Weinhold
Post by Salvatore Benedetto
while trying to compile tcl within Haiku, the build process
failed in a switch case on SIGBUS saying that it was already
defined a few lines above, where actually the case SIGSEGV
was. So I looked up in the Haiku code and found the following
#define SIGBUS SIGSEGV /* for old style code */
What does exactly old style code means? Is this still needed?
SIGBUS is defined by POSIX, so we'll have to keep it. I'm afraid you'll have
to "#ifndef __HAIKU__" the SIGBUS case.
Fine by me. Just wanted to understand why it is defined like SIGSEGV, is that
something to do with BeOS compatibility?

Regards,
--
Salvatore Benedetto (a.k.a. emitrax)
Student of Computer Engineer
University of Pisa
www.haiku-os.it
Ingo Weinhold
2008-08-31 00:51:10 UTC
Permalink
Post by Salvatore Benedetto
Post by Ingo Weinhold
Post by Salvatore Benedetto
while trying to compile tcl within Haiku, the build process
failed in a switch case on SIGBUS saying that it was already
defined a few lines above, where actually the case SIGSEGV
was. So I looked up in the Haiku code and found the following
#define SIGBUS SIGSEGV /* for old style code */
What does exactly old style code means? Is this still needed?
SIGBUS is defined by POSIX, so we'll have to keep it. I'm afraid you'll have
to "#ifndef __HAIKU__" the SIGBUS case.
Fine by me. Just wanted to understand why it is defined like SIGSEGV, is that
something to do with BeOS compatibility?
That's at least how BeOS defines it. We could theoretically define a fresh
value for it, but that would also change NSIG and might lead to compatibility
problems. I don't think we send SIGBUS anywhere, though.

CU, Ingo

Loading...