[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: kdelibs/kdefx/kcpuinfo.cpp (1.2) broken?
From:       Fredrik =?iso-8859-1?q?H=F6glund?= <fredrik () kde ! org>
Date:       2003-04-29 21:02:12
[Download RAW message or body]

On Sunday 27 April 2003 23:53, Adriaan de Groot wrote:
> On Sunday 27 April 2003 18:23, Fredrik Höglund wrote:
[snip]
> > How is __sighandler_t declared in your signal.h?
> > In glibc 2.3.1 it's declared as typedef void (*__sighandler_t) (int);
>
> We have
>
> /usr/include/sys/signal.h:typedef void __sighandler_t __P((int));
>
> which preprocessor magic resolves to
>
> eggs.ebn.kun.nl$gcc -E t.c | grep __sighandler_t
> typedef void __sighandler_t  (int)  ;
> typedef __sighandler_t  *sig_t;
>
> So this is a glibc vs. BSD libc issue. Ugh. Two solutions present themself:
>
> #ifdef QT_OS_BSD
> #define SIGFUNC sig_t;
> #else
> #define SIGFUNC __sighandler_t;
> #endif
>
> or doing a configure check for the type of ::signal() and using some
> KDE-defined type for that (isn't there one already, like (we once had ?)
> kde_size_t?).

I think I'd just add a typedef void (*kde_sighandler_t) (int); to
kcpuinfo.cpp. Since it's a void function with an int parameter on
both systems we won't need a configure check for it.

Do you think this is something that belongs in kdecore/kglobal.h
as well?

Regards,
Fredrik


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic