Re: [Patch] Warning fixes for glib



On 3 Nov 2001, Owen Taylor wrote:

> Tim Janik <timj gtk org> writes:

> This really makes no sense at all to me. 
> 
>  - We can't just use functions without their prototypes. 
>  - Assuming sigtrap is going to be '5' seems very dubious
>  - Add more assembly? There is no guarantee that you can _implement_
>    raise() in assembly.
> 
> If we aren't going to include signal.h, the only possible solution
> is to remove the third branch of the #if and say "G_BREAKPOINT()
> is implemented on virtually no platforms, don't use in code you
> expect users to be able to compile."

i backed his change out already, but also nuked my initial (5 /* SIGTRAP */)
kludge. the macro now simply reads signal(SIGTRAP) which should be good
enough. this'll work for the cases where we already use G_BREAKPOINT() in
debugging code in glib simply by including <signal.h>, and if developers
of non-x86/non-alpha use this macro, they'll either have to include
<signal.h> or send us patches for new asm statements.
as such, G_BREAKPOINT() on non-x86/non-alpha is in the same class as
g_memmove() by requiring an extra include.

> 
> Regards,
>                                         Owen
> 

---
ciaoTJ




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