This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Integrating Win32 changes


Jeff Sturm <jsturm@sigma6.com> writes:

> Yuck.  Then we need extra code to allocate unique fd's, make it
> thread-safe, etc.  I'd prefer to just cast HFILE to/from int, which is a
> safe thing to do on any Win32 platform currently in use.

I think you misunderstand.  If the "handle" you want to use is an int,
just use that.  If the "handle" is a pointer, then using an int field
is bad.  That is what the RawData feature is for. I don't see anything
that would require us to allocate unique fd's or whatever.

For example, I think it would make sense to implement a
natFileDescriptorStdio.cc.   That would be more portable
than natFileDescriptorPosix.cc (though less efficient).
natFileDescriptorStdio would need to store the (FILE*) in a
RawData handle rather than an int fd.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]