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: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Tue, 9 Aug 2005 20:11:43 +0200
Mail-followup-to: bugs@crater.dragonflybsd.org

On Tue, Aug 09, 2005 at 04:49:24PM +0100, Stefan Krüger wrote:
> hi folks,
> 
> I tried to compile ruby18 today and well... it failed...

Yes, I know.

> here's some code which did not compile:
> 
> #include <openssl/md5.h>
> int main() { return 0; }
> 
> -------
> 
> #include <stdio.h>
> int main() { sizeof(FILE); return 0; }
> 
> anyone else seeing this?

You are not supposed to access FILE directly, it's opaque simply to
avoid any stupid uses. E.g. you can't copy a FILE object to a different
location and expect it work, you can't just access it (because the
layout is opaque), the only valid way to create a FILE is via stdio --
so what should sizeof(FILE) be allowed for?

The reason why I haven't fixed ruby is that I don't have any idea what
they use it for.

Joerg



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