On Thu, May 12, 2016 at 10:43 PM, Timothy Madden <terminatorul@gmail.com> wrote: > - My class has an entry with an open device handle. How can my C code > get the file description (fd) for this handle please ? I can see sv_2io() > in perlapi, but there is no documentation about what do to next with the > resulting IO * value. I ended up calling the perl fileno() from my C code, > and I would like to know if there is a better / straigthforward way ? > You can use something like: PerlIO_fileno(IoIFP(sv_2io(value))); > - To my surprise I noticed system calls for read() / ioctl() /.. are > overriden by <perl.h> with a macro. Should I worry about this ? Can I find > some more information ? I would like to use these calls in my extension and > I would like to know if I should try to avoid the re-definition, maybe with > a separate .c file that still exports the original function pointers. > AFAIK this only happens on Windows (or actually, IMPLICIT_SYS systems), and can be disabled by defining NO_XSLOCKS. LeonThread Previous