5 Fcntl - load the C Fcntl.h defines
13 This module is just a translation of the C F<fnctl.h> file.
14 Unlike the old mechanism of requiring a translated F<fnctl.ph>
15 file, this uses the B<h2xs> program (see the Perl source distribution)
16 and your native C compiler. This means that it has a
17 far more likely chance of getting the numbers right.
21 Only C<#define> symbols get translated; you must still correctly
22 pack up your own arguments to pass as args for locking functions, etc.
29 @ISA = qw(Exporter DynaLoader);
30 $VERSION = $VERSION = "1.00";
31 # Items to export into callers namespace by default
32 # (move infrequently used names to @EXPORT_OK below)
35 F_DUPFD F_GETFD F_GETLK F_SETFD F_GETFL F_SETFL F_SETLK F_SETLKW
36 FD_CLOEXEC F_RDLCK F_UNLCK F_WRLCK
37 O_CREAT O_EXCL O_NOCTTY O_TRUNC
40 O_RDONLY O_RDWR O_WRONLY
42 # Other items we are prepared to export if requested
48 ($constname = $AUTOLOAD) =~ s/.*:://;
49 $val = constant($constname, @_ ? $_[0] : 0);
51 if ($! =~ /Invalid/) {
52 $AutoLoader::AUTOLOAD = $AUTOLOAD;
53 goto &AutoLoader::AUTOLOAD;
56 ($pack,$file,$line) = caller;
57 die "Your vendor has not defined Fcntl macro $constname, used at $file line $line.
61 eval "sub $AUTOLOAD { $val }";
67 # Preloaded methods go here. Autoload methods go after __END__, and are
68 # processed by the autosplit program.
69 package Fcntl; # return to package Fcntl so AutoSplit is happy