Re: Bonobo stream API mis-naming ...



Michael Meeks wrote:
> On Thu, 2002-08-22 at 14:28, Morten Welinder wrote:

> > 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 ?

They have to be. If the library exports struct stat as a public interface,
everything that uses it has to be compiled in large file mode. I suppose
that's why the flags are exported via CFLAGS. However, that scheme will
break if you link with an already existing library which was not compiled
in large file mode. And there's nothing to warn you about that.

> > The solution is to not step on libc's name space.  Anything else is

Large files on ILP32 systems cause incompatible libc problem. It would be
better not to export types affected by large file mode at all.

> > 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.

Forte understands #pragma redefine_extname and maybe that's good enough.
gcc 3.2 also understands it. I'm not sure how far back the support for it
goes. I don't know about AIX.

If the compiler doesn't understand that #pragma, then certain C constructs
fall apart with #define directives. If you want to take an address of the
function, you first need to #undef function and then get the address. This
isn't going to work.

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

And which compiler version?

-- 
 .-.   .-.    I don't work here. I'm a consultant.
(_  \ /  _)
     |        dave willfork com
     |



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