In win32.c there is a function definition

DllExport int win32_open_osfhandle(intptr_t handle, int flags) { #ifdef USE_FIXED_OSFHANDLE if (IsWin95()) return my_open_osfhandle(handle, flags); #endif return _open_osfhandle(handle, flags); }

Which since I'm not using Win95 (is anyone anymore?), suggests I should have an _open_osfhandle() definition somewhere. But a grep of the sources shows no such thing:

\perl\src\perl-5.8.8\lib\CORE\perlhost.h: return win32_open_osfhand +le(osfhandle, flags); \perl\src\perl-5.8.8\lib\CORE\win32.h:/* Define USE_FIXED_OSFHANDLE to + fix MSVCRT's _open_osfhandle() on W95. \perl\src\perl-5.8.8\lib\CORE\win32iop.h:DllExport int win32_ +open_osfhandle(intptr_t handle, int flags); \perl\src\perl-5.8.8\lib\CORE\win32iop.h:#define _open_osfhandle + win32_open_osfhandle \perl\src\perl-5.8.8\makedef.pl: win32_open +_osfhandle \perl\src\perl-5.8.8\makedef.pl: nw_open_osfhan +dle \perl\src\perl-5.8.8\NetWare\nw5.c:nw_open_osfhandle(long handle, int +flags) \perl\src\perl-5.8.8\NetWare\nw5iop.h:int nw_open_osfhan +dle(long handle, int flags); \perl\src\perl-5.8.8\NetWare\nwperlhost.h: return nw_open_osfhandle +(osfhandle, flags); \perl\src\perl-5.8.8\NetWare\nwperlsys.h: return nw_open_osfhandle( +osfhandle, flags); \perl\src\perl-5.8.8\win32\perldll.def: win32_open_osfhandle \perl\src\perl-5.8.8\win32\perlhost.h: return win32_open_osfhandle( +osfhandle, flags); \perl\src\perl-5.8.8\win32\win32.c:*int my_open_osfhandle(intptr_t osf +handle, int flags) - open C Runtime file handle \perl\src\perl-5.8.8\win32\win32.c: int fh = _open_osfhandle((intpt +r_t)hF, 0); \perl\src\perl-5.8.8\win32\win32.c:my_open_osfhandle(intptr_t osfhandl +e, int flags) \perl\src\perl-5.8.8\win32\win32.c: int fd = win32_open +_osfhandle((intptr_t)fh, 0); \perl\src\perl-5.8.8\win32\win32.c:win32_open_osfhandle(intptr_t handl +e, int flags) \perl\src\perl-5.8.8\win32\win32.c: return my_open_osfhandle(handle +, flags); \perl\src\perl-5.8.8\win32\win32.c: return _open_osfhandle(handle, +flags); \perl\src\perl-5.8.8\win32\win32.h:/* Define USE_FIXED_OSFHANDLE to fi +x MSVCRT's _open_osfhandle() on W95. \perl\src\perl-5.8.8\win32\win32io.c: fd = win32_open_osfhandle +((intptr_t) h, PerlIOUnix_oflags(tmode)); \perl\src\perl-5.8.8\win32\win32io.c: int fd = win32_open_osfha +ndle((intptr_t) new, PerlIOUnix_oflags(PerlIO_modestr(o,mode))); \perl\src\perl-5.8.8\win32\win32iop.h:DllExport int win32_ +open_osfhandle(intptr_t handle, int flags); \perl\src\perl-5.8.8\win32\win32iop.h:#define _open_osfhandle + win32_open_osfhandle \perl\src\perl-5.8.8\win32\win32sck.c:# define OPEN_SOCKET(x) win32_ +open_osfhandle(x,O_RDWR|O_BINARY) \perl\src\perl-5.8.8\wince\perlhost.h: return win32_open_osfhandle( +osfhandle, flags); \perl\src\perl-5.8.8\wince\win32.h:/* Define USE_FIXED_OSFHANDLE to fi +x MSVCRT's _open_osfhandle() on W95. \perl\src\perl-5.8.8\wince\win32io.c: fd = win32_open_osfhandle((intp +tr_t) h, PerlIOUnix_oflags(tmode)); \perl\src\perl-5.8.8\wince\win32io.c: int fd = win32_open_osfhandle( +(intptr_t) new, PerlIOUnix_oflags(PerlIO_modestr(o,mode))); \perl\src\perl-5.8.8\wince\win32iop.h:DllExport int win32_ +open_osfhandle(long handle, int flags); \perl\src\perl-5.8.8\wince\win32iop.h:#define _open_osfhandle + win32_open_osfhandle \perl\src\perl-5.8.8\wince\wince.c: int fd = win32_open_os +fhandle((intptr_t)fh, 0); \perl\src\perl-5.8.8\wince\wince.c:win32_open_osfhandle(intptr_t osfha +ndle, int flags) \perl\src\perl-5.8.8\wince\wince.c: Perl_croak_nocontext("win32_ope +n_osfhandle() TBD on this platform");

The only resolution for win32_open_osfhandle() I can see is

\perl\src\perl-5.8.8\win32\win32iop.h:#define _open_osfhandle + win32_open_osfhandle

Which doesn't help much. What am I missing?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Perl source diving confusion by BrowserUk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.