Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am attempting to compile some perl code under Windows98 ActivePerl 5.6.1 Build 633 which was originally written for *nix. I am currently getting the following error when running the code:
Your vendor has not defined POSIX macro F_SETFL, used at mud line 436
Can anyone give me any insight into this error and possible work arounds?

Replies are listed 'Best First'.
Re: F_SETFL under Win32
by BrowserUk (Patriarch) on Sep 05, 2002 at 03:07 UTC

    F_SETFL is a constant exported by the POSIX.pm module who's value is derived from Fnctl.h (on *nix systems).

    It is used by the POSIX::Fnctl() function (which is identical to the perlfunc::fnctl). Basically, its used to control (non-blocking) locking on files (streams).

    It (sometimes, on some systems) equates to a value of 6.

    You could try replacing references to it with the value 6 and see if that gets you any further, but if the script is reliant on the POSIX::Fnctl() for its operation, it probably means that it won't function under AS.


    Well It's better than the Abottoire, but Yorkshire!
Re: F_SETFL under Win32
by spartacus9 (Beadle) on Sep 05, 2002 at 02:58 UTC
    I assume you are attempting to use some non-blocking I/O, correct? As far as I know, ActivePerl does not support F_SETFL at all, at least I have never been able to get it to work in the past, and my colleagues tell me the same. You are likely going to have to resort to another method altogether. You might look into IPC::Multiplex. I have not used this myself, but recall many references to it when I was looking at a similar problem. Hope this helps.