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

List:       silc-devel
Subject:    Re: silc-client-1.1pre5 compile fix
From:       Sami Farin <safari-silc () safari ! iki ! fi>
Date:       2007-01-18 20:05:06
Message-ID: 20070118200506.GA16110 () m ! safari ! iki ! fi
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Thu, Jan 18, 2007 at 20:44:10 +0100, Pekka Riikonen wrote:
> On Thu, 18 Jan 2007, Sami Farin wrote:
> 
> : Date: Thu, 18 Jan 2007 15:37:39 +0200
> : From: Sami Farin <safari-silc@safari.iki.fi>
> : To: SILC-devel Mailing List <silc-devel@lists.silcnet.org>
> : Subject: silc-client-1.1pre5 compile fix
> : 
> : gcc -g -O2 -Wall -o silc gui-entry.o gui-expandos.o gui-printtext.o 
...
> : ../core/libcore.a(network.o): In function `net_connect_ip': 
> : /usr/local/src/silc-client-1.1pre5/apps/irssi/src/core/network.c:203: 
> : undefined reference to `sin_set_ip' ...
> : 
> And, when does this happen on what system and with what compiler?  Haven't 
> had any similar problems here.

gcc-4.1.1-52 on IA-32 Redhat Fedora, using -O0.

I looked at definition of G_INLINE_FUNC ,
glib defines it to "extern inline".
Wouldn't static be more proper?

"static inline" works, too.  With "extern inline" you'd have to have
addressable versions of the functions somewhere.
"static inline" can be used in included headers (used in e.g. Linux).
But inlining is not required IMHO (these functions are not performance-
critical, or do you have evidence of the contrary?).

http://tree.celinuxforum.org/CelfPubWiki/ExternVsStaticInline
In 2001, Linus said:

- "static inline" means "we have to have this function, if you use it 
   but don't inline it, then make a static version of it in this 
   compilation unit" 
 
 - "extern inline" means "I actually _have_ an extern for this function, 
   but if you want to inline it, here's the inline-version" 
 
... we should just convert 
all current users of "extern inline" to "static inline".  

-- 

[Attachment #5 (application/pgp-signature)]

_______________________________________________________________________
Info:    https://lists.silcnet.org/mailman/listinfo/silc-announce
Archive: https://lists.silcnet.org/pipermail/silc-announce
FAQ:     http://silcnet.org/support/faq/

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

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