Re: Bonobo stream API mis-naming ...



Hi Morten,

On Thu, 2002-08-22 at 14:28, Morten Welinder wrote:
>    It's really best practice, in any case, to always include
>    headers in the order of:
> 
>     A) System headers
>     B) Library headers
>     C) Application headers
> 
> This is precisely what will get you into trouble...  You must include
> application headers that affect system headers -- such as <config.h>
> which defines that _FILE_OFFSET_BITS macro -- before the system headers.

	I imagine Owen and myself take it for granted that you have to include
<config.h> as the first item.

> Also (A) and (B) are invariably going to get mixed up since library
> headers can and do include system headers you have no explicit need
> for in your application code.

	Which makes me think we should try to include things first - but as
Owen says - this will end up with #include <world.h> in the end, which
will suck for lots of reasons.

> gnome-vfs exports a few "struct stat *" interfaces which makes those
> functions practically unusable unless you make sure to compile the
> headers users in the same "_FILE_OFFSET_BITS mode" as gnome-vfs was.

	Then; why are the _FILE_OFFSET_BITS flags [ or whatever ] in the
gnome-vfs CFLAGS in it's pkgconfig file, exported to the world ?

> The solution is to not step on libc's name space.  Anything else is
> living in denial.  Use "Open", not "open".  I realise it may be hard
> to change published APIs, but we should change where we can.

	It's not hard - it's just not really possible. Come Gnome 3.0 -
perhaps. Also - I'm extremely confused, why is it that only you see this
problem ? I've built Gnome 2.0 on Solaris with gcc with no problems,
Laca / Jacob do it regularly with Forte, it builds on AIX I'm led to
understand.

	How is it you're seeing problems ? which OS & version ? which files ?
what include trees ?

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




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