Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2002:
[Freeciv-Dev] Re: detection of "inline" broken (PR#2104)
Home

[Freeciv-Dev] Re: detection of "inline" broken (PR#2104)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: detection of "inline" broken (PR#2104)
From: rf13@xxxxxxxxxxxxxxxxx
Date: Fri, 4 Oct 2002 05:34:34 -0700

On Sat, Sep 28, 2002 at 01:19:47AM -0700, jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
> I use Debian Sid.  My system:
> 
> + checking for autoconf >= 2.52 ... found 2.54, ok.
> + checking for automake >= 1.4 ... found 1.5, ok.
> + checking for xgettext >= 0.10.36 ... found 0.11.5, ok.
> + checking for msgfmt >= 0.10.36 ... found 0.11.5, ok.
> 
> for some time now I have been unable to compile either GTK or GTK2 
> clients.  I hadn't really looked into it since I figured it was a debian 
> issue, but now I see otherwise.
> 
> It happens because config.h contains
> 
>    /* Define as `__inline' if that's what the C compiler calls it,
>       or to nothing if it is not supported. */
>    #define inline
> 
> which basically removes the ability to do inlining.  This breaks glib, 
> whose header files include some "inline" functions and (the part that I 
> think breaks) some custom code to properly #define "inline".
> 
> When I change the above to
> 
>    #define inline __inline
> 
> compilation works fine.

> So the question is: why is inline incorrectly defined?

Guess: freeciv doesn't need it and glib is the first project which is
used by freeciv which uses inline in an unsecure way. A proper usage
is to not just use "inline" but prepend a string like:
/usr/include/bits/stdio.h:25:# define __STDIO_INLINE inline
/usr/include/bits/stdio.h:27:# define __STDIO_INLINE extern __inline
/usr/include/bits/stdio.h:33:__STDIO_INLINE int
/usr/include/bits/stdio.h:40:__STDIO_INLINE int
...
/usr/include/bits/stdio.h:118:__STDIO_INLINE int
/usr/include/bits/stdio.h:169:#undef __STDIO_INLINE

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx


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