On 08/22/2009 06:36 PM, Bruno Haible wrote:
Paolo Bonzini wrote:
Also, actually the flags can be accessed; it's undocumented but it can
be found.  See for example these files, taken from Perl and Ruby
respectively:

http://downloads.activestate.com/contrib.old/ntsock.cpp
http://www.google.com/codesearch/p#-ImLthoNrik/ruby-1.8.6/win32/win32.c

(search for _osfile).

In this code, _osfile() is defined as a macro that makes a lot of assumptions
about the internal structure of an MSVCRT internal array. Additionally you
see code that indicates that in certain newer versions of Windows, they have
to *search* for a handle in memory in order to correct these assumptions.

To me, this means: Poisoned! Don't touch!

You're right. However, after seeing that all three of Perl, Python (see http://bugs.python.org/file12950/__pioinfo.patch -- it's for different reasons) and Ruby do it, I'm starting to think that it is almost a necessity. :-(

Paolo


Reply via email to