This is the mail archive of the java@gcc.gnu.org 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]
Other format: [Raw text]

Re: WIN-28: fix POSIX file descriptor numbering assumptions


>>>>> "Adam" == Adam Megacz <gcj@lists.megacz.com> writes:

Adam> I assume I should _Jv_Malloc(sizeof(file_descriptor_type)),
Adam> right? It would be cool if I could assume that a file descriptor
Adam> is never larger than a pointer (no malloc needed), but this is
Adam> probably too ugly.

I think it depends on the platform.

For POSIX we know a file descriptor is an int.  We don't want to
malloc anything in this case; we just want to cast the int back and
forth with RawData.

For Windows assuming that a file descriptor is a pointer is probably
safe.  So again no allocation required.

Tom


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