2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml">
5 <title>Fcntl - load the C Fcntl.h defines
</title>
6 <meta http-equiv=
"content-type" content=
"text/html; charset=utf-8" />
7 <link rev=
"made" href=
"mailto:" />
10 <body style=
"background-color: white">
11 <table border=
"0" width=
"100%" cellspacing=
"0" cellpadding=
"3">
12 <tr><td class=
"block" style=
"background-color: #cccccc" valign=
"middle">
13 <big><strong><span class=
"block"> Fcntl - load the C Fcntl.h defines
</span></strong></big>
17 <p><a name=
"__index__"></a></p>
22 <li><a href=
"#name">NAME
</a></li>
23 <li><a href=
"#synopsis">SYNOPSIS
</a></li>
24 <li><a href=
"#description">DESCRIPTION
</a></li>
25 <li><a href=
"#note">NOTE
</a></li>
26 <li><a href=
"#exported_symbols">EXPORTED SYMBOLS
</a></li>
33 <h1><a name=
"name">NAME
</a></h1>
34 <p>Fcntl - load the C Fcntl.h defines
</p>
38 <h1><a name=
"synopsis">SYNOPSIS
</a></h1>
41 use Fcntl qw(:DEFAULT :flock);
</pre>
45 <h1><a name=
"description">DESCRIPTION
</a></h1>
46 <p>This module is just a translation of the C
<em>fcntl.h
</em> file.
47 Unlike the old mechanism of requiring a translated
<em>fcntl.ph
</em>
48 file, this uses the
<strong>h2xs
</strong> program (see the Perl source distribution)
49 and your native C compiler. This means that it has a
50 far more likely chance of getting the numbers right.
</p>
54 <h1><a name=
"note">NOTE
</a></h1>
55 <p>Only
<code>#define
</code> symbols get translated; you must still correctly
56 pack up your own arguments to pass as args for locking functions, etc.
</p>
60 <h1><a name=
"exported_symbols">EXPORTED SYMBOLS
</a></h1>
61 <p>By default your system's F_* and O_* constants (eg, F_DUPFD and
62 O_CREAT) and the FD_CLOEXEC constant are exported into your namespace.
</p>
63 <p>You can request that the
<code>flock()
</code> constants (LOCK_SH, LOCK_EX, LOCK_NB
64 and LOCK_UN) be provided by using the tag
<code>:flock
</code>. See
<a href=
"file://C|\msysgit\mingw\html/lib/Exporter.html">the Exporter manpage
</a>.
</p>
65 <p>You can request that the old constants (FAPPEND, FASYNC, FCREAT,
66 FDEFER, FEXCL, FNDELAY, FNONBLOCK, FSYNC, FTRUNC) be provided for
67 compatibility reasons by using the tag
<code>:Fcompat
</code>. For new
68 applications the newer versions of these constants are suggested
69 (O_APPEND, O_ASYNC, O_CREAT, O_DEFER, O_EXCL, O_NDELAY, O_NONBLOCK,
71 <p>For ease of use also the SEEK_* constants (for
<code>seek()
</code> and sysseek(),
72 e.g. SEEK_END) and the S_I* constants (for
<code>chmod()
</code> and
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_stat"><code>stat())
</code></a> are
73 available for import. They can be imported either separately or using
74 the tags
<code>:seek
</code> and
<code>:mode
</code>.
</p>
75 <p>Please refer to your native fcntl(
2), open(
2), fseek(
3),
<code>lseek(
2)
</code>
76 (equal to Perl's
<code>seek()
</code> and sysseek(), respectively), and
<code>chmod(
2)
</code>
77 documentation to see what constants are implemented in your system.
</p>
78 <p>See
<a href=
"file://C|\msysgit\mingw\html/pod/perlopentut.html">the perlopentut manpage
</a> to learn about the uses of the O_* constants
80 <p>See
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#seek">seek in the perlfunc manpage
</a> and
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#sysseek">sysseek in the perlfunc manpage
</a> about the SEEK_* constants.
</p>
81 <p>See
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_stat">stat in the perlfunc manpage
</a> about the S_I* constants.
</p>
82 <table border=
"0" width=
"100%" cellspacing=
"0" cellpadding=
"3">
83 <tr><td class=
"block" style=
"background-color: #cccccc" valign=
"middle">
84 <big><strong><span class=
"block"> Fcntl - load the C Fcntl.h defines
</span></strong></big>