silc-client-1.1pre5 compile fix
Sami Farin
safari-silc at safari.iki.fi
Thu Jan 18 21:05:06 CET 2007
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 at safari.iki.fi>
> : To: SILC-devel Mailing List <silc-devel at 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".
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.silcnet.org/pipermail/silc-devel/attachments/20070118/34b21657/attachment.bin
More information about the silc-devel
mailing list