Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Fcntl constants missing

by puudeli (Pilgrim)
on Mar 24, 2009 at 11:32 UTC ( [id://752834]=note: print w/replies, xml ) Need Help??


in reply to Fcntl constants missing

Maybe fcntl.h is not included in your compilation of Perl?. Fcntl is a simple translation of the fcntl.h C header file. Try 'perl -V' to see the compile time flags.

--
seek $her, $from, $everywhere if exists $true{love};

Replies are listed 'Best First'.
Re^2: Fcntl constants missing
by rovf (Priest) on Mar 24, 2009 at 12:10 UTC

    Being the user the OP was talking about, let me drop into this discussion.

    The error appears on the standard ActiveState distribution of Perl, both 5.8.8 and 5.10. The compiler flags, as shown by perl -V, are:

    cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D +_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTO +MIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SY +S -DUSE_PERLIO -DPERL_MSVCRT_READFIX', optimize='-MD -Zi -DNDEBUG -O1', cppflags='-DWIN32' ccversion='12.00.8804', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64 +', lseeksize=8 alignbytes=8, prototype=define
    Update: Maybe this part of perl -V is also important:
    Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_SITECUSTOMIZE
    But can we see from this whether it was compiled with fcntl.h?

    Some other Fcntl macros work well - for instance, O_CREAT.

    Even if O_NONBLOCK is not defined, I wonder why the error message is issued on a line, where only the existence is tested, i.e.

    if(exists $Fcntl::{'O_NONBLOCK')) { ... }
    -- 
    Ronald Fischer <ynnor@mm.st>

      Have you tried FNONBLOCK instead? You can export the old constants by using the tag :Fcompat,

      --
      seek $her, $from, $everywhere if exists $true{love};

        Same effect.

        I suspect this is not a restriction of ActiveState Perl, but of Windows. I tried the same under Cygwin Perl, and got the same error message.

        $ perl -lwe "use Fcntl qw(:Fcompat); FNONBLOCK " Your vendor has not defined Fcntl macro FNONBLOCK, used at -e line 1.

        -- 
        Ronald Fischer <ynnor@mm.st>

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://752834]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (1)
As of 2024-04-25 01:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found