Install Perl 5.8.8
[msysgit.git] / mingw / html / lib / Fcntl.html
blob37ba5afed0e6a7055b987833b3efff0022dbddd2
1 <?xml version="1.0" ?>
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">
4 <head>
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:" />
8 </head>
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">&nbsp;Fcntl - load the C Fcntl.h defines</span></strong></big>
14 </td></tr>
15 </table>
17 <p><a name="__index__"></a></p>
18 <!-- INDEX BEGIN -->
20 <ul>
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>
27 </ul>
28 <!-- INDEX END -->
30 <hr />
31 <p>
32 </p>
33 <h1><a name="name">NAME</a></h1>
34 <p>Fcntl - load the C Fcntl.h defines</p>
35 <p>
36 </p>
37 <hr />
38 <h1><a name="synopsis">SYNOPSIS</a></h1>
39 <pre>
40 use Fcntl;
41 use Fcntl qw(:DEFAULT :flock);</pre>
42 <p>
43 </p>
44 <hr />
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>
51 <p>
52 </p>
53 <hr />
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>
57 <p>
58 </p>
59 <hr />
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,
70 O_SYNC, O_TRUNC).</p>
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
79 with sysopen().</p>
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">&nbsp;Fcntl - load the C Fcntl.h defines</span></strong></big>
85 </td></tr>
86 </table>
88 </body>
90 </html>