DragonFly BSD
DragonFly bugs List (threaded) for 2005-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: include files bug?


From: Andreas Hauser <andy@xxxxxxxxxxxxxxx>
Date: 16 Aug 2005 17:45:03 -0000

joerg wrote @ Tue, 16 Aug 2005 14:33:13 +0200:
> On Tue, Aug 16, 2005 at 07:46:56AM -0000, Andreas Hauser wrote:

> > That seems to break SUSv3:
> >   The following data types shall be defined through typedef:
> >   FILE
> >       A structure containing information about a file.
> 
> FILE (!) is defined through typedef.

Yes, but it is typdef'ed to something incomplete.

Reading SUSv3 i would assume i was able to use sizeof(FILE).
It's not something for daily usage, but might be useful for
garbage collectors, or stuff that tries to keep memory below
a certain value. Might be necessary information for migrating
one process from one server to another.

Maybe if you point me to the discussion in the archives, i can
read up why this was necessary and what the pros and cons for
this solution are.

> > > The reason why I haven't fixed ruby is that I don't have any idea what
> > > they use it for.
> > 
> > I think, they just have generic ways to deal with objects and pointers.
> > The generic pointer structure contains a field for the size of the pointee.
> 
> So it can be replaced by 0 then? I take it that they want to do boundary
> checks, so 0 would satisfy the "Don't mess with the implementation"
> requirement.

It's hardly correct.
I don't dare make assumptions about how those generic pointer structure
might be used, but 0 seems to be an especially bad value for it.


Andy



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