[PATCH] more miscellaneous cleanup in dbus core

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Oct 11 02:29:13 PDT 2007

On Wed, 10 Oct 2007 at 14:37:33 -0400, Havoc Pennington wrote:
> Simon McVittie wrote:
> > inline keyword isn't recognised, because gcc -ansi claims to implement
> > ISO C90, and inline was only added in C99 (although everyone implemented
> > it as an extension already). __inline__ is always implemented by gcc, for this
> > reason.

This is in fact a hard compilation failure, not a warning (if you don't know
what inline means, then that function is syntactically invalid).

> The intent is that on a compiler without inline we would "#define 
> inline" to nothing, and that we always use inline with "static" so this 
> is safe to do.

The attached patch implements this, in a far simpler way. I suggest
applying this instead! (If inline doesn't work, it #defines it to
__inline__, __inline or nothing, whichever works.)

> > Looking more closely at how --enable-ansi and that function interact, it
> > seems that it's meant to be disabled in an --enable-ansi build (although if
> > someone uses CFLAGS=-ansi it'll get enabled in any case), but someone
> > has got the autofoo completely wrong (code that's only meant to trigger on
> > Darwin is actually enabling the i486 atomic ops indiscriminately on all i386
> > or x86-64 machines, oops). I have most of a patch, which I'll finish
> > tomorrow.
> This would be good to mop up.

Also attached.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-detection-of-i486-atomic-ops.patch
Type: text/x-diff
Size: 5182 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20071011/1abc7b7a/attachment.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Enable-Autoconf-s-AC_C_INLINE-to-avoid-compilation-f.patch
Type: text/x-diff
Size: 1501 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20071011/1abc7b7a/attachment-0001.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 266 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20071011/1abc7b7a/attachment.pgp 

More information about the dbus mailing list