Re: [gimp-devel] gtk+ 1.01: conflicting types for `sys_siglist'




>     This is on a FreeBSD 3.0-current system.  If Configure detects
> sys_siglist(), it undefines NO_SYS_SIGLIST.  In glib/gutils.c, it
> attempts to redefine sys_siglist(), which is where it fails.  Why
> would gutils.c try to define sys_siglist() if it was already detected
> by Configure?

Here's my explaination:

Configure does not detect strsignal(), so it relies on the
array sys_siglist[]. It tries to link with this array with
the extern declaration:

 extern char *sys_siglist[];

However, FreeBSD has the definition

> extern __const char *__const sys_siglist[];

This wouldn't be a problem, except that gutils.c was recently modified
to include <unistd.h> for other reasons. (To get the prototype for
write()), and that header file defines sys_siglist.

Now, for FreeBSD, it would work fine to simply remove
the extern declaration. But that might break things elsewhere.
:-(. Other options:

 - change the declaration to const (but that could also break
   things)

 - Just use an extern definition for write(). (Definite hack)

So, if people running things other than Linux or FreeBSD, 
could check:

 - Does your system define NO_SYS_SIGLIST in glibconfig.h?

 - If not, in which header file is sys_siglist defined, and
  is it as 'const char *' or as 'char *'?

I'd appreciate it. (If there isn't get enough input on this,
the includsion of unistd.h in the file can be avoided.)

Regards,
                              Owen



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