xref: /openbsd-src/gnu/usr.bin/perl/ext/Fcntl/Fcntl.pm (revision 3d61058aa5c692477b6d18acfbbdb653a9930ff9)
1package Fcntl;
2
3=head1 NAME
4
5Fcntl - various flag constants and helper functions from C's fcntl.h
6
7=head1 SYNOPSIS
8
9    use Fcntl;
10    use Fcntl qw(:DEFAULT :flock);
11    use Fcntl qw(F_GETFD F_SETFD FD_CLOEXEC);
12
13=head1 DESCRIPTION
14
15This module provides flags and helper functions for use with L<perlfunc/chmod>
16(S_*), L<perlfunc/fcntl> (F_*), L<perlfunc/flock> (LOCK_*), L<perlfunc/seek>
17(SEEK_*), L<perlfunc/stat> (S_*), L<perlfunc/sysopen> (O_*), and
18L<perlfunc/sysseek> (SEEK_*). They correspond to the C macros defined in
19F<fcntl.h>.
20
21Not all symbols are available on all systems. Except where noted otherwise,
22the constants and functions provided by this module will throw a runtime
23exception if the corresponding C macro is not available. Consult your system
24documentation to see the full description of each symbol and whether it is
25available on your platform: L<chmod(2)>, L<fcntl(2)>, L<flock(2)>,
26L<lseek(2)>, L<open(2)>, L<stat(2)>.
27
28(In particular, some of the F_* symbols are highly non-portable because they
29only exist on a single platform or require system-specific C data structures to
30be passed as the third argument to C<fcntl>, which can't be portably
31constructed in pure Perl.)
32
33=head1 EXPORTED SYMBOLS
34
35=head2 Default exports and export tags
36
37The full list of default exports can be found below in L</APPENDIX A>.
38
39In addition, the following export tags are available (see L<Exporter> for more
40information on export tags):
41
42=over
43
44=item C<:DEFAULT>
45
46Equivalent to the list of default export symbols (see L</APPENDIX A>).
47
48=item C<:flock>
49
50Equivalent to all LOCK_* symbols listed below.
51
52=item C<:mode>
53
54Equivalent to all S_* symbols listed below.
55
56=item C<:seek>
57
58Equivalent to all SEEK_* symbols listed below.
59
60=item C<:Fcompat>
61
62Equivalent to C<qw(FAPPEND FASYNC FCREAT FDEFER FDSYNC FEXCL FLARGEFILE FNDELAY
63FNONBLOCK FRSYNC FSYNC FTRUNC)>. These only exist for compatibility with old
64code (if your platform defines them at all) and should not be used in new code.
65
66=back
67
68=head2 Symbols for use with C<fcntl>
69
70=over
71
72=item C<F_ALLOCSP>
73
74File storage manipulation.
75
76=item C<F_ALLOCSP64>
77
78File storage manipulation.
79
80=item C<F_DUP2FD>
81
82Duplicate a file descriptor to the number specified in the third argument to
83C<fcntl> (if it refers to an open file, it is automatically closed first).
84
85=item C<F_DUPFD>
86
87Duplicate a file descriptor to the lowest unused number greater than or equal
88to the third argument of C<fcntl>.
89
90=item C<F_FREESP>
91
92File storage manipulation.
93
94=item C<F_FREESP64>
95
96File storage manipulation.
97
98=item C<F_FSYNC>
99
100Synchronize file data to disk.
101
102=item C<F_FSYNC64>
103
104Synchronize file data to disk.
105
106=item C<F_GETFD>
107
108Return (as a number) the set of file descriptor flags, in which the following
109bits may be set:
110
111=over
112
113=item C<FD_CLOEXEC>
114
115During a successful C<exec> call, the file descriptor will be closed
116automatically.
117
118=back
119
120=item C<F_GETFL>
121
122Return (as a number) the set of file description status flags (O_*) as set by
123C<open> and C<fcntl>. To determine the file access mode, perform a bitwise AND
124with L</C<O_ACCMODE>> and see whether the result is equal to C<O_RDONLY>,
125C<O_WRONLY>, or C<O_RDWR>.
126
127=item C<F_GETLEASE>
128
129Indicate the type of lease associated with the filehandle (if any) by returning
130one of the following flags:
131
132=over
133
134=item C<F_RDLCK>
135
136A read lease.
137
138=item C<F_WRLCK>
139
140A write lease.
141
142=item C<F_UNLCK>
143
144No lease.
145
146=back
147
148=item C<F_GETLK>
149
150Test for the existence of record locks on the file.
151
152=item C<F_GETLK64>
153
154Test for the existence of record locks on the file.
155
156=item C<F_GETOWN>
157
158Return the ID of the process (as a positive number) or group (as a negative
159number) that is currently receiving signals for events on the file descriptor.
160
161=item C<F_GETPIPE_SZ>
162
163Return the capacity of the pipe associated with the filehandle.
164
165=item C<F_GETSIG>
166
167Return the number of the signal sent when input or output becomes possible on
168the filehandle. A return value of C<0> means C<SIGIO>.
169
170=item C<F_NOTIFY>
171
172File and directory change notification with signals.
173
174=over
175
176=item C<DN_ACCESS>
177
178=item C<DN_ATTRIB>
179
180=item C<DN_CREATE>
181
182=item C<DN_DELETE>
183
184=item C<DN_MODIFY>
185
186=item C<DN_MULTISHOT>
187
188=item C<DN_RENAME>
189
190=back
191
192Z<>
193
194=item C<F_SETFD>
195
196Set the file descriptor flags. See L</C<F_GETFD>> for the list of available
197flags.
198
199=item C<F_SETFL>
200
201Set the file description status flags (O_*). Only some flags can be changed
202this way.
203
204=item C<F_SETLEASE>
205
206Set a file lease as specified by the third C<fnctl> argument, which must be one
207of the following:
208
209=over
210
211=item C<F_RDLCK>
212
213Set a read lease.
214
215=item C<F_WRLCK>
216
217Set a write lease.
218
219=item C<F_UNLCK>
220
221Remove a lease.
222
223=back
224
225=item C<F_SETLK>
226
227Acquire a record lock.
228
229=item C<F_SETLK64>
230
231Acquire a record lock.
232
233=item C<F_SETLKW>
234
235Acquire a record lock and wait for conflicting locks to be released.
236
237=item C<F_SETLKW64>
238
239Acquire a record lock and wait for conflicting locks to be released.
240
241=item C<F_SETOWN>
242
243Set the ID of the process (as a positive number) or group (as a negative
244number) that will receive signals for events on the file descriptor.
245
246=item C<F_SETPIPE_SZ>
247
248Set the capacity of the pipe associated with the filehandle. Return the actual
249capacity reserved for the pipe, which may be higher than requested.
250
251=item C<F_SETSIG>
252
253Set the number of the signal sent when input or output becomes possible on the
254filehandle. An argument of C<0> means C<SIGIO>.
255
256=item C<F_SHARE>
257
258Set share reservation.
259
260=item C<F_UNSHARE>
261
262Remove share reservation.
263
264=item C<F_COMPAT>
265
266=item C<F_EXLCK>
267
268=item C<F_NODNY>
269
270=item C<F_POSIX>
271
272=item C<F_RDACC>
273
274=item C<F_RDDNY>
275
276=item C<F_RWACC>
277
278=item C<F_RWDNY>
279
280=item C<F_SHLCK>
281
282=item C<F_WRACC>
283
284=item C<F_WRDNY>
285
286=back
287
288=head2 Symbols for use with C<flock>
289
290=over
291
292=item C<LOCK_EX>
293
294Request an exclusive lock.
295
296=item C<LOCK_MAND>
297
298Request a mandatory lock.
299
300=item C<LOCK_NB>
301
302Make lock request non-blocking (can be combined with other LOCK_* flags using bitwise OR).
303
304=item C<LOCK_READ>
305
306With C<LOCK_MAND>: Allow concurrent reads.
307
308=item C<LOCK_RW>
309
310With C<LOCK_MAND>: Allow concurrent reads and writes.
311
312=item C<LOCK_SH>
313
314Request a shared lock.
315
316=item C<LOCK_UN>
317
318Release a held lock.
319
320=item C<LOCK_WRITE>
321
322With C<LOCK_MAND>: Allow concurrent writes.
323
324=back
325
326=head2 Symbols for use with C<sysopen>
327
328=over
329
330=item C<O_ACCMODE>
331
332Bit mask for extracting the file access mode (read-only, write-only, or
333read/write) from the other flags. This is mainly useful in combination with
334L</C<F_GETFL>>.
335
336=item C<O_ALIAS>
337
338(Mac OS) Open alias file (instead of the file that the alias refers to).
339
340=item C<O_ALT_IO>
341
342(NetBSD) Use alternative I/O semantics.
343
344=item C<O_APPEND>
345
346Open the file in append mode. Writes always go to the end of the file.
347
348=item C<O_ASYNC>
349
350Enable signal-based I/O. When the file becomes readable or writable, a signal
351is sent.
352
353=item C<O_BINARY>
354
355(Windows) Open the file in binary mode.
356
357=item C<O_CREAT>
358
359If the file to be opened does not exist yet, create it.
360
361=item C<O_DEFER>
362
363(AIX) Changes to the file are kept in memory and not written to disk until the
364program performs an explicit L<< C<< $fh->sync() >>|IO::Handle/$io->sync >>.
365
366=item C<O_DIRECT>
367
368Perform direct I/O to/from user-space buffers; avoid caching at the OS level.
369
370=item C<O_DIRECTORY>
371
372Fail if the filename to be opened does not refer to a directory.
373
374=item C<O_DSYNC>
375
376Synchronize file data immediately, like calling L<fdatasync(2)> after each
377write.
378
379=item C<O_EVTONLY>
380
381(Mac OS) Open the file for event notifications, not reading or writing.
382
383=item C<O_EXCL>
384
385If the file already exists, fail and set C<$!> to L<C<EEXIST>|Errno> (this only
386makes sense in combination with C<O_CREAT>).
387
388=item C<O_EXLOCK>
389
390When the file is opened, atomically obtain an exclusive lock.
391
392=item C<O_IGNORE_CTTY>
393
394(Hurd) If the file to be opened is the controlling terminal for this process,
395don't recognize it as such. Operations on this filehandle won't trigger job
396control signals.
397
398=item C<O_LARGEFILE>
399
400On 32-bit platforms, allow opening files whose size exceeds 2 GiB
401(2,147,483,647 bytes).
402
403=item C<O_NDELAY>
404
405Compatibility symbol. Use C<O_NONBLOCK> instead.
406
407=item C<O_NOATIME>
408
409Don't update the access time of the file when reading from it.
410
411=item C<O_NOCTTY>
412
413If the process does not have a controlling terminal and the file to be opened
414is a terminal device, don't make it the controlling terminal of the process.
415
416=item C<O_NOFOLLOW>
417
418If the final component of the filename is a symbolic link, fail and set C<$!>
419to L<C<ELOOP>|Errno>.
420
421=item C<O_NOINHERIT>
422
423(Windows) Don't let child processes inherit the opened file descriptor.
424
425=item C<O_NOLINK>
426
427(Hurd) If the file to be opened is a symbolic link, don't follow it; open the
428link itself.
429
430=item C<O_NONBLOCK>
431
432Open the file in non-blocking mode. Neither the open itself nor any read/write
433operations on the filehandle will block. (This is mainly useful for pipes and
434sockets. It has no effect on regular files.)
435
436=item C<O_NOSIGPIPE>
437
438If the file to be opened is a pipe, then don't raise C<SIGPIPE> for write
439operations when the read end of the pipe is closed; make the write fail with
440C<EPIPE> instead.
441
442=item C<O_NOTRANS>
443
444(Hurd) If the file to be opened is specially translated, don't invoke the
445translator; open the bare file itself.
446
447=item C<O_RANDOM>
448
449(Windows) Indicate that the program intends to access the file contents
450randomly (without a predictable pattern). This is an optimization hint for the
451file cache (but may cause excessive memory use on large files).
452
453=item C<O_RAW>
454
455(Windows) Same as C<O_BINARY>.
456
457=item C<O_RDONLY>
458
459Open the file for reading (only).
460
461=item C<O_RDWR>
462
463Open the file for reading and writing.
464
465=item C<O_RSRC>
466
467(Mac OS) Open the resource fork of the file.
468
469=item C<O_RSYNC>
470
471Extend the effects of C<O_SYNC> and C<O_DSYNC> to read operations. In
472particular, reading from a filehandle opened with C<O_SYNC | O_RSYNC> will wait
473until the access time of the file has been modified on disk.
474
475=item C<O_SEQUENTIAL>
476
477(Windows) Indicate that the program intends to access the file contents
478sequentially. This is an optimization hint for the file cache.
479
480=item C<O_SHLOCK>
481
482When the file is opened, atomically obtain a shared lock.
483
484=item C<O_SYMLINK>
485
486If the file to be opened is a symbolic link, don't follow it; open the link
487itself.
488
489=item C<O_SYNC>
490
491Synchronize file data and metadata immediately, like calling L<fsync(2)> after
492each write.
493
494=item C<O_TEMPORARY>
495
496(Windows) Delete the file when its last open file descriptor is closed.
497
498=item C<O_TEXT>
499
500(Windows) Open the file in text mode.
501
502=item C<O_TMPFILE>
503
504Create an unnamed temporary file. The filename argument specifies the directory
505the unnamed file should be placed in.
506
507=item C<O_TRUNC>
508
509If the file already exists, truncate its contents to length 0.
510
511=item C<O_TTY_INIT>
512
513If the file to be opened is a terminal that is not already open in any process,
514initialize its L<termios|POSIX/C<POSIX::Termios>> parameters.
515
516=item C<O_WRONLY>
517
518Open the file for writing (only).
519
520=item C<FAPPEND>
521
522Compatibility symbol. Use C<O_APPEND> instead.
523
524=item C<FASYNC>
525
526Compatibility symbol. Use C<O_ASYNC> instead.
527
528=item C<FCREAT>
529
530Compatibility symbol. Use C<O_CREAT> instead.
531
532=item C<FDEFER>
533
534Compatibility symbol. Use C<O_DEFER> instead.
535
536=item C<FDSYNC>
537
538Compatibility symbol. Use C<O_DSYNC> instead.
539
540=item C<FEXCL>
541
542Compatibility symbol. Use C<O_EXCL> instead.
543
544=item C<FLARGEFILE>
545
546Compatibility symbol. Use C<O_LARGEFILE> instead.
547
548=item C<FNDELAY>
549
550Compatibility symbol. Use C<O_NDELAY> instead.
551
552=item C<FNONBLOCK>
553
554Compatibility symbol. Use C<O_NONBLOCK> instead.
555
556=item C<FRSYNC>
557
558Compatibility symbol. Use C<O_RSYNC> instead.
559
560=item C<FSYNC>
561
562Compatibility symbol. Use C<O_SYNC> instead.
563
564=item C<FTRUNC>
565
566Compatibility symbol. Use C<O_TRUNC> instead.
567
568=back
569
570=head2 Symbols for use with C<seek> and C<sysseek>
571
572=over
573
574=item C<SEEK_CUR>
575
576File offsets are relative to the current position in the file.
577
578=item C<SEEK_END>
579
580File offsets are relative to the end of the file (i.e. mostly negative).
581
582=item C<SEEK_SET>
583
584File offsets are absolute (i.e. relative to the beginning of the file).
585
586=back
587
588=head2 Symbols for use with C<stat> and C<chmod>
589
590=over
591
592=item C<S_ENFMT>
593
594Enforce mandatory file locks. (This symbol typically shares its value with
595C<S_ISGID>.)
596
597=item C<S_IEXEC>
598
599Compatibility symbol. Use C<S_IXUSR> instead.
600
601=item C<S_IFBLK>
602
603File type: Block device.
604
605=item C<S_IFCHR>
606
607File type: Character device.
608
609=item C<S_IFDIR>
610
611File type: Directory.
612
613=item C<S_IFIFO>
614
615File type: Fifo/pipe.
616
617=item C<S_IFLNK>
618
619File type: Symbolic link.
620
621=item C<S_IFMT>
622
623Bit mask for extracting the file type bits. This symbol can also be used as a
624function: C<S_IFMT($mode)> acts like C<$mode & S_IFMT>. The result will be
625equal to one of the other S_IF* constants.
626
627=item C<_S_IFMT>
628
629Bit mask for extracting the file type bits. This symbol is an actual constant
630and cannot be used as a function; otherwise it is identical to C<S_IFMT>.
631
632=item C<S_IFREG>
633
634File type: Regular file.
635
636=item C<S_IFSOCK>
637
638File type: Socket.
639
640=item C<S_IFWHT>
641
642File type: Whiteout file (used to mark the absence/deletion of a file in overlays).
643
644=item C<S_IMODE>
645
646Function for extracting the permission bits from a file mode.
647
648=item C<S_IREAD>
649
650Compatibility symbol. Use C<S_IRUSR> instead.
651
652=item C<S_IRGRP>
653
654Permissions: Readable by group.
655
656=item C<S_IROTH>
657
658Permissions: Readable by others.
659
660=item C<S_IRUSR>
661
662Permissions: Readable by owner.
663
664=item C<S_IRWXG>
665
666Bit mask for extracting group permissions.
667
668=item C<S_IRWXO>
669
670Bit mask for extracting other permissions.
671
672=item C<S_IRWXU>
673
674Bit mask for extracting owner ("user") permissions.
675
676=item C<S_ISBLK>
677
678Convenience function to check for block devices: C<S_ISBLK($mode)> is
679equivalent to C<S_IFMT($mode) == S_IFBLK>.
680
681=item C<S_ISCHR>
682
683Convenience function to check for character  devices: C<S_ISCHR($mode)> is
684equivalent to C<S_IFMT($mode) == S_IFCHR>.
685
686=item C<S_ISDIR>
687
688Convenience function to check for directories: C<S_ISDIR($mode)> is
689equivalent to C<S_IFMT($mode) == S_IFDIR>.
690
691=item C<S_ISENFMT>
692
693Broken function; do not use. (C<S_ISENFMT($mode)> should always return false,
694anyway.)
695
696=item C<S_ISFIFO>
697
698Convenience function to check for fifos: C<S_ISFIFO($mode)> is
699equivalent to C<S_IFMT($mode) == S_IFIFO>.
700
701=item C<S_ISGID>
702
703Permissions: Set effective group ID from file (when running executables);
704mandatory locking (on non-group-executable files); new files inherit their
705group from the directory (on directories).
706
707=item C<S_ISLNK>
708
709Convenience function to check for symbolic links: C<S_ISLNK($mode)> is
710equivalent to C<S_IFMT($mode) == S_IFLNK>.
711
712=item C<S_ISREG>
713
714Convenience function to check for regular files: C<S_ISREG($mode)> is
715equivalent to C<S_IFMT($mode) == S_IFREG>.
716
717=item C<S_ISSOCK>
718
719Convenience function to check for sockets: C<S_ISSOCK($mode)> is
720equivalent to C<S_IFMT($mode) == S_IFSOCK>.
721
722=item C<S_ISTXT>
723
724Compatibility symbol. Use C<S_ISVTX> instead.
725
726=item C<S_ISUID>
727
728Permissions: Set effective user ID from file (when running executables).
729
730=item C<S_ISVTX>
731
732Permissions: Files in this directory can only be deleted/renamed by their owner
733(or the directory's owner), even if other users have write permissions to the
734directory ("sticky bit").
735
736=item C<S_ISWHT>
737
738Convenience function to check for whiteout files: C<S_ISWHT($mode)> is
739equivalent to C<S_IFMT($mode) == S_IFWHT>.
740
741=item C<S_IWGRP>
742
743Permissions: Writable by group.
744
745=item C<S_IWOTH>
746
747Permissions: Writable by others.
748
749=item C<S_IWRITE>
750
751Compatibility symbol. Use C<S_IWUSR> instead.
752
753=item C<S_IWUSR>
754
755Permissions: Writable by owner.
756
757=item C<S_IXGRP>
758
759Permissions: Executable/searchable by group.
760
761=item C<S_IXOTH>
762
763Permissions: Executable/searchable by others.
764
765=item C<S_IXUSR>
766
767Permissions: Executable/searchable by owner.
768
769=back
770
771=head1 SEE ALSO
772
773L<perlfunc/chmod>, L<chmod(2)>,
774L<perlfunc/fcntl>, L<fcntl(2)>,
775L<perlfunc/flock>, L<flock(2)>,
776L<perlfunc/seek>, L<fseek(3)>,
777L<perlfunc/stat>, L<stat(2)>,
778L<perlfunc/sysopen>, L<open(2)>,
779L<perlfunc/sysseek>, L<lseek(2)>
780
781=head1 APPENDIX A
782
783By default, if you say C<use Fcntl;>, the following symbols are exported:
784
785    FD_CLOEXEC
786    F_ALLOCSP
787    F_ALLOCSP64
788    F_COMPAT
789    F_DUP2FD
790    F_DUPFD
791    F_EXLCK
792    F_FREESP
793    F_FREESP64
794    F_FSYNC
795    F_FSYNC64
796    F_GETFD
797    F_GETFL
798    F_GETLK
799    F_GETLK64
800    F_GETOWN
801    F_NODNY
802    F_POSIX
803    F_RDACC
804    F_RDDNY
805    F_RDLCK
806    F_RWACC
807    F_RWDNY
808    F_SETFD
809    F_SETFL
810    F_SETLK
811    F_SETLK64
812    F_SETLKW
813    F_SETLKW64
814    F_SETOWN
815    F_SHARE
816    F_SHLCK
817    F_UNLCK
818    F_UNSHARE
819    F_WRACC
820    F_WRDNY
821    F_WRLCK
822    O_ACCMODE
823    O_ALIAS
824    O_APPEND
825    O_ASYNC
826    O_BINARY
827    O_CREAT
828    O_DEFER
829    O_DIRECT
830    O_DIRECTORY
831    O_DSYNC
832    O_EXCL
833    O_EXLOCK
834    O_LARGEFILE
835    O_NDELAY
836    O_NOCTTY
837    O_NOFOLLOW
838    O_NOINHERIT
839    O_NONBLOCK
840    O_RANDOM
841    O_RAW
842    O_RDONLY
843    O_RDWR
844    O_RSRC
845    O_RSYNC
846    O_SEQUENTIAL
847    O_SHLOCK
848    O_SYNC
849    O_TEMPORARY
850    O_TEXT
851    O_TRUNC
852    O_WRONLY
853
854=cut
855
856use strict;
857
858use Exporter 'import';
859require XSLoader;
860our $VERSION = '1.18';
861
862XSLoader::load();
863
864# Named groups of exports
865our %EXPORT_TAGS = (
866    'flock'   => [qw(LOCK_SH LOCK_EX LOCK_NB LOCK_UN)],
867    'Fcompat' => [qw(FAPPEND FASYNC FCREAT FDEFER FDSYNC FEXCL FLARGEFILE
868		     FNDELAY FNONBLOCK FRSYNC FSYNC FTRUNC)],
869    'seek'    => [qw(SEEK_SET SEEK_CUR SEEK_END)],
870    'mode'    => [qw(S_ISUID S_ISGID S_ISVTX S_ISTXT
871		     _S_IFMT S_IFREG S_IFDIR S_IFLNK
872		     S_IFSOCK S_IFBLK S_IFCHR S_IFIFO S_IFWHT S_ENFMT
873		     S_IRUSR S_IWUSR S_IXUSR S_IRWXU
874		     S_IRGRP S_IWGRP S_IXGRP S_IRWXG
875		     S_IROTH S_IWOTH S_IXOTH S_IRWXO
876		     S_IREAD S_IWRITE S_IEXEC
877		     S_ISREG S_ISDIR S_ISLNK S_ISSOCK
878		     S_ISBLK S_ISCHR S_ISFIFO
879		     S_ISWHT S_ISENFMT
880		     S_IFMT S_IMODE
881                  )],
882);
883
884# Items to export into callers namespace by default
885# (move infrequently used names to @EXPORT_OK below)
886our @EXPORT =
887  qw(
888	FD_CLOEXEC
889	F_ALLOCSP
890	F_ALLOCSP64
891	F_COMPAT
892	F_DUP2FD
893	F_DUPFD
894	F_EXLCK
895	F_FREESP
896	F_FREESP64
897	F_FSYNC
898	F_FSYNC64
899	F_GETFD
900	F_GETFL
901	F_GETLK
902	F_GETLK64
903	F_GETOWN
904	F_NODNY
905	F_POSIX
906	F_RDACC
907	F_RDDNY
908	F_RDLCK
909	F_RWACC
910	F_RWDNY
911	F_SETFD
912	F_SETFL
913	F_SETLK
914	F_SETLK64
915	F_SETLKW
916	F_SETLKW64
917	F_SETOWN
918	F_SHARE
919	F_SHLCK
920	F_UNLCK
921	F_UNSHARE
922	F_WRACC
923	F_WRDNY
924	F_WRLCK
925	O_ACCMODE
926	O_ALIAS
927	O_APPEND
928	O_ASYNC
929	O_BINARY
930	O_CREAT
931	O_DEFER
932	O_DIRECT
933	O_DIRECTORY
934	O_DSYNC
935	O_EXCL
936	O_EXLOCK
937	O_LARGEFILE
938	O_NDELAY
939	O_NOCTTY
940	O_NOFOLLOW
941	O_NOINHERIT
942	O_NONBLOCK
943	O_RANDOM
944	O_RAW
945	O_RDONLY
946	O_RDWR
947	O_RSRC
948	O_RSYNC
949	O_SEQUENTIAL
950	O_SHLOCK
951	O_SYNC
952	O_TEMPORARY
953	O_TEXT
954	O_TRUNC
955	O_WRONLY
956     );
957
958# Other items we are prepared to export if requested
959our @EXPORT_OK = (qw(
960	DN_ACCESS
961	DN_ATTRIB
962	DN_CREATE
963	DN_DELETE
964	DN_MODIFY
965	DN_MULTISHOT
966	DN_RENAME
967	F_ADD_SEALS
968	F_GETLEASE
969	F_GETPIPE_SZ
970	F_GET_SEALS
971	F_GETSIG
972	F_NOTIFY
973	F_SEAL_FUTURE_WRITE
974	F_SEAL_GROW
975	F_SEAL_SEAL
976	F_SEAL_SHRINK
977	F_SEAL_WRITE
978	F_SETLEASE
979	F_SETPIPE_SZ
980	F_SETSIG
981	LOCK_MAND
982	LOCK_READ
983	LOCK_RW
984	LOCK_WRITE
985        O_ALT_IO
986        O_EVTONLY
987	O_IGNORE_CTTY
988	O_NOATIME
989	O_NOLINK
990        O_NOSIGPIPE
991	O_NOTRANS
992        O_SYMLINK
993        O_TMPFILE
994        O_TTY_INIT
995), map {@{$_}} values %EXPORT_TAGS);
996
9971;
998