in reply to Re^5: fcntl failure after eval
in thread fcntl failure after eval

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