Does perl not know what this type is, as it's been compiled for the system on which it's running? If not (or there's no way for my script to get the information from the interpreter),

$ perl -V:ldflags ldflags='-s -L"c:\perl\5.14.1\lib\MSWin32-x86-multi-thread\CORE" -L"C: +\MinGW\lib"'; $ perl -V:archlib archlib='c:\perl\5.14.1\lib\MSWin32-x86-multi-thread'; $ grep -ri "define off_t " C:\perl\5.14.1\lib\MSWin32-x86-multi-thread +\CORE C:\perl\5.14.1\lib\MSWin32-x86-multi-thread\CORE/config.h:#define Off_ +t long long /* <offset> type */ C:\perl\5.14.1\lib\MSWin32-x86-multi-thread\CORE/perl.h:# define + Off_t off64_t C:\perl\5.14.1\lib\MSWin32-x86-multi-thread\CORE/uconfig.h:#define Off +_t int /* <offset> type */
You want to read $Config::Config{archlib}/CORE/config.h
/* Off_t: * This symbol holds the type used to declare offsets in the kernel +. * It can be int, long, off_t, etc... It may be necessary to includ +e * <sys/types.h> to get any typedef'ed information. */ /* LSEEKSIZE: * This symbol holds the number of bytes used by the Off_t. */ /* Off_t_size: * This symbol holds the number of bytes used by the Off_t. */ #define Off_t long long /* <offset> type */ #define LSEEKSIZE 8 /* <offset> size */ #define Off_t_size 8 /* <offset> size */
$ perl "-V:.+?seek.+?" d_fseeko='undef'; d_lseekproto='define'; d_seekdir='define'; lseeksize='8'; lseektype='long long';
See also Convert::Binary::C/ccconfig

In reply to Re^6: fcntl failure after eval by Anonymous Monk
in thread fcntl failure after eval by flipper

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.