Integrating Win32 changes

Per Bothner per@bothner.com
Sat Apr 1 00:00:00 GMT 2000


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/


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /