summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-19 16:18:46 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-19 16:18:46 +0000
commite1f775196788199aa205bfd047e37a8e188e06b2 (patch)
tree1b80176c05c5e6e42e12b75200bc7a2d8f817b7e
parentd0e85dcee87ca227273fd34b9a90f68c96b3d833 (diff)
parentd5374cbf8154953394e54aab9ae393cca31f237d (diff)
downloadperl-e1f775196788199aa205bfd047e37a8e188e06b2.tar.gz
integrate cfgperl contents into mainline
p4raw-id: //depot/perl@5146
-rwxr-xr-xConfigure83
-rw-r--r--config_h.SH6
-rw-r--r--ext/Fcntl/Fcntl.pm201
-rw-r--r--ext/Fcntl/Fcntl.xs225
-rw-r--r--ext/SDBM_File/sdbm/sdbm.c2
-rw-r--r--ext/Socket/Socket.pm114
-rw-r--r--ext/Socket/Socket.xs18
-rw-r--r--hints/hpux.sh140
-rw-r--r--perl.h32
-rw-r--r--pod/perldelta.pod7
-rw-r--r--pod/perlfunc.pod86
-rw-r--r--pod/perlopentut.pod12
-rw-r--r--t/lib/syslfs.t2
13 files changed, 780 insertions, 148 deletions
diff --git a/Configure b/Configure
index 28d19d6a49..f134f87a9d 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Wed Feb 16 01:07:15 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Thu Feb 17 01:07:48 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
@@ -653,6 +653,7 @@ i_sysioctl=''
i_syssockio=''
i_syslog=''
i_sysmman=''
+i_sysmode=''
i_sysmount=''
i_sysndir=''
i_sysparam=''
@@ -944,13 +945,12 @@ inclwanted=''
groupstype=''
: change the next line if compiling for Xenix/286 on Xenix/386
xlibpth='/usr/lib/386 /lib/386'
-
: Possible local library directories to search.
loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
: general looking path for locating libraries
-glibpth="/usr/lib/large /lib/pa1.1 /lib /usr/lib $xlibpth"
+glibpth="/usr/lib/large /lib /usr/lib $xlibpth"
glibpth="$glibpth /lib/large /usr/lib/small /lib/small"
glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
@@ -2611,21 +2611,23 @@ $undef$define) . ./whoa; eval "$var=\$tu";;
*) eval "$var=$val";;
esac'
+case "$usethreads" in
+$define|true|[yY]*) dflt='y';;
+*) dflt='n';;
+esac
cat <<EOM
Perl can be built to take advantage of threads on some systems.
-To do so, Configure must be run with -Dusethreads.
+To do so, Configure can be run with -Dusethreads.
Note that threading is a highly experimental feature, and
some known race conditions still remain. If you choose to try
it, be very sure to not actually deploy it for production
purposes. README.threads has more details, and is required
reading if you enable threads.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
EOM
-case "$usethreads" in
-$define|true|[yY]*) dflt='y';;
-*) dflt='n';;
-esac
rp='Build a threading Perl?'
. ./myread
case "$ans" in
@@ -2719,12 +2721,11 @@ This multiple interpreter support is required for interpreter-based threads.
EOM
val="$define"
;;
-*)
- echo 'Normally you do not need this and you should answer no.'
- case "$usemultiplicity" in
+*) case "$usemultiplicity" in
$define|true|[yY]*) dflt='y';;
*) dflt='n';;
esac
+ echo "If this doesn't make any sense to you, just accept the default '$dflt'."
rp='Build Perl for multiplicity?'
. ./myread
case "$ans" in
@@ -3058,7 +3059,7 @@ int main() {
exit(0);
}
EOM
-if $cc -o gccvers gccvers.c; then
+if $cc $ldflags -o gccvers gccvers.c; then
gccversion=`./gccvers`
case "$gccversion" in
'') echo "You are not using GNU cc." ;;
@@ -3662,18 +3663,17 @@ case "$firstmakefile" in
'') firstmakefile='makefile';;
esac
+case "$usesocks" in
+$define|true|[yY]*) dflt='y';;
+*) dflt='n';;
+esac
cat <<EOM
Perl can be built to use the SOCKS proxy protocol library. To do so,
Configure must be run with -Dusesocks.
-Normally you do not need this and you should answer no.
-
+If this doesn't make any sense to you, just accept the default '$dflt'.
EOM
-case "$usesocks" in
-$define|true|[yY]*) dflt='y';;
-*) dflt='n';;
-esac
rp='Build Perl for SOCKS?'
. ./myread
case "$ans" in
@@ -4284,17 +4284,17 @@ case "$lseeksize:$fpossize" in
You can have files larger than 2 gigabytes.
EOM
val="$define" ;;
-*) cat <<EOM
+*) case "$uselargefiles" in
+ "$undef"|false|[nN]*) dflt='n' ;;
+ *) dflt='y' ;;
+ esac
+ cat <<EOM
Perl can be built to understand large files (files larger than 2 gigabytes)
-on some systems. To do so, Configure must be run with -Duselargefiles.
+on some systems. To do so, Configure can be run with -Duselargefiles.
-If this doesn't make any sense to you, just accept the default 'y'.
+If this doesn't make any sense to you, just accept the default '$dflt'.
EOM
- case "$uselargefiles" in
- "$undef"|false|[nN]*) dflt='n' ;;
- *) dflt='y' ;;
- esac
rp='Try to understand large files, if available?'
. ./myread
case "$ans" in
@@ -4407,7 +4407,7 @@ EOM
cat <<EOM
Perl can be built to take advantage of 64-bit integer types
-on some systems. To do so, Configure must be run with -Duse64bits.
+on some systems. To do so, Configure can be run with -Duse64bits.
If this doesn't make any sense to you, just accept the default '$dflt'.
EOM
@@ -7012,14 +7012,6 @@ fi
set sqrtl d_sqrtl
eval $inlibc
-cat <<EOM
-
-Perl can be built to take advantage of long doubles which
-(if available) may give more accuracy and range for floating point numbers.
-
-If this doesn't make any sense to you, just accept the default 'n'.
-EOM
-
case "$ccflags" in
*-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
esac
@@ -7028,6 +7020,13 @@ case "$uselongdouble" in
$define|true|[yY]*) dflt='y';;
*) dflt='n';;
esac
+cat <<EOM
+
+Perl can be built to take advantage of long doubles which
+(if available) may give more accuracy and range for floating point numbers.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
+EOM
rp='Try to use long doubles if available?'
. ./myread
case "$ans" in
@@ -7069,6 +7068,10 @@ EOM
;;
esac
+case "$useperlio" in
+$define|true|[yY]*) dflt='y';;
+*) dflt='n';;
+esac
cat <<EOM
Previous version of $package used the standard IO mechanisms as defined
@@ -7079,12 +7082,8 @@ have sfio installed) or regular stdio. Using PerlIO with sfio may cause
problems with some extension modules. Using PerlIO with stdio is safe,
but it is slower than plain stdio and therefore is not the default.
-If this doesn't make any sense to you, just accept the default 'n'.
+If this doesn't make any sense to you, just accept the default '$dflt'.
EOM
-case "$useperlio" in
-$define|true|[yY]*) dflt='y';;
-*) dflt='n';;
-esac
rp='Use the experimental PerlIO abstraction layer?'
. ./myread
case "$ans" in
@@ -14106,6 +14105,11 @@ eval $setvar
set syslog.h i_syslog
eval $inhdr
+
+: see if this is a sys/mode.h system
+set sys/mode.h i_sysmode
+eval $inhdr
+
: see if sys/resource.h has to be included
set sys/resource.h i_sysresrc
eval $inhdr
@@ -14949,6 +14953,7 @@ i_sysin='$i_sysin'
i_sysioctl='$i_sysioctl'
i_syslog='$i_syslog'
i_sysmman='$i_sysmman'
+i_sysmode='$i_sysmode'
i_sysmount='$i_sysmount'
i_sysndir='$i_sysndir'
i_sysparam='$i_sysparam'
diff --git a/config_h.SH b/config_h.SH
index 17e4aa2837..9529129c3e 100644
--- a/config_h.SH
+++ b/config_h.SH
@@ -2975,6 +2975,12 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#define PERL_XS_APIVERSION "$xs_apiversion"
#define PERL_PM_APIVERSION "$pm_apiversion"
+/* I_SYSMODE:
+ * This symbol, if defined, indicates that <sys/mode.h> exists and
+ * should be included.
+ */
+#$i_sysmode I_SYSMODE /**/
+
/* I_SYS_UTSNAME:
* This symbol, if defined, indicates that <sys/utsname.h> exists and
* should be included.
diff --git a/ext/Fcntl/Fcntl.pm b/ext/Fcntl/Fcntl.pm
index 43bec9903e..8758359532 100644
--- a/ext/Fcntl/Fcntl.pm
+++ b/ext/Fcntl/Fcntl.pm
@@ -37,8 +37,21 @@ applications the newer versions of these constants are suggested
(O_APPEND, O_ASYNC, O_CREAT, O_DEFER, O_EXCL, O_NDELAY, O_NONBLOCK,
O_SYNC, O_TRUNC).
-Please refer to your native fcntl() and open() documentation to see
-what constants are implemented in your system.
+For ease of use also the SEEK_* constants (for seek() and sysseek(),
+e.g. SEEK_END) and the S_I* constants (for chmod() and stat()) are
+available for import. They can be imported either separately or using
+the tags C<:seek> and C<:mode>.
+
+Please refer to your native fcntl(2), open(2), fseek(3), lseek(2)
+(equal to Perl's seek() and sysseek(), respectively), and chmod(2)
+documentation to see what constants are implemented in your system.
+
+See L<perlopentut> to learn about the uses of the O_* constants
+with sysopen().
+
+See L<perlfunc/seek> and L<perlfunc/sysseek> about the SEEK_* constants.
+
+See L<perlfunc/stat> about the S_I* constants.
=cut
@@ -90,31 +103,32 @@ $VERSION = "1.03";
F_WRDNY
F_WRLCK
O_ACCMODE
+ O_ALIAS
O_APPEND
O_ASYNC
O_BINARY
O_CREAT
O_DEFER
+ O_DIRECT
+ O_DIRECTORY
O_DSYNC
O_EXCL
O_EXLOCK
O_LARGEFILE
O_NDELAY
O_NOCTTY
+ O_NOFOLLOW
O_NONBLOCK
O_RDONLY
O_RDWR
+ O_RSRC
O_RSYNC
O_SHLOCK
O_SYNC
+ O_TEMPORARY
O_TEXT
O_TRUNC
O_WRONLY
- O_ALIAS
- O_RSRC
- SEEK_SET
- SEEK_CUR
- SEEK_END
);
# Other items we are prepared to export if requested
@@ -135,14 +149,183 @@ $VERSION = "1.03";
LOCK_NB
LOCK_SH
LOCK_UN
+ S_ISUID S_ISGID S_ISVTX S_ISTXT
+ _S_IFMT S_IFREG S_IFDIR S_IFLNK
+ S_IFSOCK S_IFBLK S_IFCHR S_IFIFO S_IFWHT S_ENFMT
+ S_IRUSR S_IWUSR S_IXUSR S_IRWXU
+ S_IRGRP S_IWGRP S_IXGRP S_IRWXG
+ S_IROTH S_IWOTH S_IXOTH S_IRWXO
+ S_IREAD S_IWRITE S_IEXEC
+ &S_ISREG &S_ISDIR &S_ISLNK &S_ISSOCK &S_ISBLK &S_ISCHR &S_ISFIFO
+ &S_ISWHT &S_ISENFMT &S_IFMT &S_IMODE
+ SEEK_SET
+ SEEK_CUR
+ SEEK_END
);
# Named groups of exports
%EXPORT_TAGS = (
'flock' => [qw(LOCK_SH LOCK_EX LOCK_NB LOCK_UN)],
'Fcompat' => [qw(FAPPEND FASYNC FCREAT FDEFER FDSYNC FEXCL FLARGEFILE
- FNDELAY FNONBLOCK FRSYNC FSYNC FTRUNC)],
+ FNDELAY FNONBLOCK FRSYNC FSYNC FTRUNC)],
+ 'seek' => [qw(SEEK_SET SEEK_CUR SEEK_END)],
+ 'mode' => [qw(S_ISUID S_ISGID S_ISVTX S_ISTXT
+ _S_IFMT S_IFREG S_IFDIR S_IFLNK
+ S_IFSOCK S_IFBLK S_IFCHR S_IFIFO S_IFWHT S_ENFMT
+ S_IRUSR S_IWUSR S_IXUSR S_IRWXU
+ S_IRGRP S_IWGRP S_IXGRP S_IRWXG
+ S_IROTH S_IWOTH S_IXOTH S_IRWXO
+ S_IREAD S_IWRITE S_IEXEC
+ &S_ISREG &S_ISDIR &S_ISLNK &S_ISSOCK
+ &S_ISBLK &S_ISCHR &S_ISFIFO
+ &S_ISWHT &S_ISENFMT
+ &S_IFMT &S_IMODE
+ )],
);
+sub FD_CLOEXEC ();
+
+sub F_ALLOCSP ();
+sub F_ALLOCSP64 ();
+sub F_COMPAT ();
+sub F_DUP2FD ();
+sub F_DUPFD ();
+sub F_EXLCK ();
+sub F_FREESP ();
+sub F_FREESP64 ();
+sub F_FSYNC ();
+sub F_FSYNC64 ();
+sub F_GETFD ();
+sub F_GETFL ();
+sub F_GETLK ();
+sub F_GETLK64 ();
+sub F_GETOWN ();
+sub F_NODNY ();
+sub F_POSIX ();
+sub F_RDACC ();
+sub F_RDDNY ();
+sub F_RDLCK ();
+sub F_RWACC ();
+sub F_RWDNY ();
+sub F_SETFD ();
+sub F_SETFL ();
+sub F_SETLK ();
+sub F_SETLK64 ();
+sub F_SETLKW ();
+sub F_SETLKW64 ();
+sub F_SETOWN ();
+sub F_SHARE ();
+sub F_SHLCK ();
+sub F_UNLCK ();
+sub F_UNSHARE ();
+sub F_WRACC ();
+sub F_WRDNY ();
+sub F_WRLCK ();
+
+sub O_ACCMODE ();
+sub O_ALIAS ();
+sub O_APPEND ();
+sub O_ASYNC ();
+sub O_BINARY ();
+sub O_CREAT ();
+sub O_DEFER ();
+sub O_DIRECT ();
+sub O_DIRECTORY ();
+sub O_DSYNC ();
+sub O_EXCL ();
+sub O_EXLOCK ();
+sub O_LARGEFILE ();
+sub O_NDELAY ();
+sub O_NOCTTY ();
+sub O_NOFOLLOW ();
+sub O_NONBLOCK ();
+sub O_RDONLY ();
+sub O_RDWR ();
+sub O_RSRC ();
+sub O_RSYNC ();
+sub O_SHLOCK ();
+sub O_SYNC ();
+sub O_TEMPORARY ();
+sub O_TEXT ();
+sub O_TRUNC ();
+sub O_WRONLY ();
+
+sub FAPPEND ();
+sub FASYNC ();
+sub FCREAT ();
+sub FDEFER ();
+sub FDSYNC ();
+sub FEXCL ();
+sub FLARGEFILE ();
+sub FNDELAY ();
+sub FNONBLOCK ();
+sub FRSYNC ();
+sub FSYNC ();
+sub FTRUNC ();
+
+sub LOCK_EX ();
+sub LOCK_NB ();
+sub LOCK_SH ();
+sub LOCK_UN ();
+
+sub SEEK_SET ();
+sub SEEK_CUR ();
+sub SEEK_END ();
+
+sub S_ISUID ();
+sub S_ISGID ();
+sub S_ISVTX ();
+sub S_ISTXT ();
+sub _S_IFMT ();
+sub S_IFMT (;$);
+sub S_IMODE ($);
+sub S_IFREG ();
+sub S_IFDIR ();
+sub S_IFLNK ();
+sub S_IFSOCK ();
+sub S_IFBLK ();
+sub S_IFCHR ();
+sub S_IFIFO ();
+sub S_IFWHT ();
+sub S_ENFMT ();
+sub S_IRUSR ();
+sub S_IWUSR ();
+sub S_IXUSR ();
+sub S_IRWXU ();
+sub S_IRGRP ();
+sub S_IWGRP ();
+sub S_IXGRP ();
+sub S_IRWXG ();
+sub S_IROTH ();
+sub S_IWOTH ();
+sub S_IXOTH ();
+sub S_IRWXO ();
+sub S_IREAD ();
+sub S_IWRITE ();
+sub S_IEXEC ();
+
+sub S_IFREG ();
+sub S_IFDIR ();
+sub S_IFLNK ();
+sub S_IFSOCK ();
+sub S_IFBLK ();
+sub S_IFCHR ();
+sub S_IFIFO ();
+sub S_IFWHT ();
+sub S_IFENFMT ();
+
+sub S_IFMT (;$) { @_ ? ( $_[0] & _S_IFMT ) : _S_IFMT }
+sub S_IMODE ($) { $_[0] & 07777 }
+
+sub S_ISREG ($) { ( $_[0] & _S_IFMT ) == S_IFREG }
+sub S_ISDIR ($) { ( $_[0] & _S_IFMT ) == S_IFDIR }
+sub S_ISLNK ($) { ( $_[0] & _S_IFMT ) == S_IFLNK }
+sub S_ISSOCK ($) { ( $_[0] & _S_IFMT ) == S_IFSOCK }
+sub S_ISBLK ($) { ( $_[0] & _S_IFMT ) == S_IFBLK }
+sub S_ISCHR ($) { ( $_[0] & _S_IFMT ) == S_IFCHR }
+sub S_ISFIFO ($) { ( $_[0] & _S_IFMT ) == S_IFIFO }
+sub S_ISWHT ($) { ( $_[0] & _S_IFMT ) == S_ISWHT }
+sub S_ISENFMT ($) { ( $_[0] & _S_IFMT ) == S_ISENFMT }
+
sub AUTOLOAD {
(my $constname = $AUTOLOAD) =~ s/.*:://;
my $val = constant($constname, 0);
@@ -157,7 +340,7 @@ sub AUTOLOAD {
";
}
}
- *$AUTOLOAD = sub { $val };
+ *$AUTOLOAD = sub () { $val };
goto &$AUTOLOAD;
}
diff --git a/ext/Fcntl/Fcntl.xs b/ext/Fcntl/Fcntl.xs
index 08252b6538..8d4a073658 100644
--- a/ext/Fcntl/Fcntl.xs
+++ b/ext/Fcntl/Fcntl.xs
@@ -45,6 +45,14 @@ constant(char *name, int arg)
{
errno = 0;
switch (*name) {
+ case '_':
+ if (strEQ(name, "_S_IFMT")) /* Yes, _S_IFMT. */
+#ifdef S_IFMT
+ return S_IFMT;
+#else
+ goto not_there;
+#endif
+ break;
case 'F':
if (strnEQ(name, "F_", 2)) {
if (strEQ(name, "F_ALLOCSP"))
@@ -414,6 +422,18 @@ constant(char *name, int arg)
#else
goto not_there;
#endif
+ if (strEQ(name, "O_DIRECT"))
+#ifdef O_DIRECT
+ return O_DIRECT;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "O_DIRECTORY"))
+#ifdef O_DIRECTORY
+ return O_DIRECTORY;
+#else
+ goto not_there;
+#endif
if (strEQ(name, "O_DSYNC"))
#ifdef O_DSYNC
return O_DSYNC;
@@ -450,6 +470,12 @@ constant(char *name, int arg)
#else
goto not_there;
#endif
+ if (strEQ(name, "O_NOFOLLOW"))
+#ifdef O_NOFOLLOW
+ return O_NOFOLLOW;
+#else
+ goto not_there;
+#endif
if (strEQ(name, "O_NONBLOCK"))
#ifdef O_NONBLOCK
return O_NONBLOCK;
@@ -486,6 +512,12 @@ constant(char *name, int arg)
#else
goto not_there;
#endif
+ if (strEQ(name, "O_TEMPORARY"))
+#ifdef O_TEMPORARY
+ return O_TEMPORARY;
+#else
+ goto not_there;
+#endif
if (strEQ(name, "O_TEXT"))
#ifdef O_TEXT
return O_TEXT;
@@ -520,25 +552,198 @@ constant(char *name, int arg)
goto not_there;
break;
case 'S':
- if (strEQ(name, "SEEK_CUR"))
+ switch (name[1]) {
+ case '_':
+ if (strEQ(name, "S_ISUID"))
+#ifdef S_ISUID
+ return S_ISUID;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_ISGID"))
+#ifdef S_ISGID
+ return S_ISGID;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_ISVTX"))
+#ifdef S_ISVTX
+ return S_ISVTX;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_ISTXT"))
+#ifdef S_ISTXT
+ return S_ISTXT;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IFREG"))
+#ifdef S_IFREG
+ return S_IFREG;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IFDIR"))
+#ifdef S_IFDIR
+ return S_IFDIR;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IFLNK"))
+#ifdef S_IFLNK
+ return S_IFLNK;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IFSOCK"))
+#ifdef S_IFSOCK
+ return S_IFSOCK;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IFBLK"))
+#ifdef S_IFBLK
+ return S_IFBLK;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IFCHR"))
+#ifdef S_IFCHR
+ return S_IFCHR;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IFIFO"))
+#ifdef S_IFIFO
+ return S_IFIFO;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IFWHT"))
+#ifdef S_IFWHT
+ return S_IFWHT;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_ENFMT"))
+#ifdef S_ENFMT
+ return S_ENFMT;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IRUSR"))
+#ifdef S_IRUSR
+ return S_IRUSR;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IWUSR"))
+#ifdef S_IWUSR
+ return S_IWUSR;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IXUSR"))
+#ifdef S_IXUSR
+ return S_IXUSR;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IRWXU"))
+#ifdef S_IRWXU
+ return S_IRWXU;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IRGRP"))
+#ifdef S_IRGRP
+ return S_IRGRP;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IWGRP"))
+#ifdef S_IWGRP
+ return S_IWGRP;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IXGRP"))
+#ifdef S_IXGRP
+ return S_IXGRP;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IRWXG"))
+#ifdef S_IRWXG
+ return S_IRWXG;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IROTH"))
+#ifdef S_IROTH
+ return S_IROTH;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IWOTH"))
+#ifdef S_IWOTH
+ return S_IWOTH;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IXOTH"))
+#ifdef S_IXOTH
+ return S_IXOTH;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IRWXO"))
+#ifdef S_IRWXO
+ return S_IRWXO;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IREAD"))
+#ifdef S_IREAD
+ return S_IREAD;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IWRITE"))
+#ifdef S_IWRITE
+ return S_IWRITE;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "S_IEXEC"))
+#ifdef S_IEXEC
+ return S_IEXEC;
+#else
+ goto not_there;
+#endif
+ break;
+ case 'E':
+ if (strEQ(name, "SEEK_CUR"))
#ifdef SEEK_CUR
- return SEEK_CUR;
+ return SEEK_CUR;
#else
- goto not_there;
+ return 1;
#endif
- if (strEQ(name, "SEEK_END"))
+ if (strEQ(name, "SEEK_END"))
#ifdef SEEK_END
- return SEEK_END;
+ return SEEK_END;
#else
- goto not_there;
+ return 2;
#endif
- if (strEQ(name, "SEEK_SET"))
+ if (strEQ(name, "SEEK_SET"))
#ifdef SEEK_SET
- return SEEK_SET;
+ return SEEK_SET;
#else
- goto not_there;
+ return 0;
#endif
- break;
+ break;
+ }
}
errno = EINVAL;
return 0;
diff --git a/ext/SDBM_File/sdbm/sdbm.c b/ext/SDBM_File/sdbm/sdbm.c
index f58f4487c8..64c75cbb20 100644
--- a/ext/SDBM_File/sdbm/sdbm.c
+++ b/ext/SDBM_File/sdbm/sdbm.c
@@ -39,7 +39,7 @@ extern int errno;
extern Malloc_t malloc proto((MEM_SIZE));
extern Free_t free proto((Malloc_t));
-extern Off_t lseek(int, Off_t, int);
+
#endif
/*
diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm
index cec13ac47f..f83cb18399 100644
--- a/ext/Socket/Socket.pm
+++ b/ext/Socket/Socket.pm
@@ -244,6 +244,9 @@ use XSLoader ();
SCM_CREDS
SCM_RIGHTS
SCM_TIMESTAMP
+ SHUT_RD
+ SHUT_RDWR
+ SHUT_WR
SOCK_DGRAM
SOCK_RAW
SOCK_RDM
@@ -320,6 +323,115 @@ sub sockaddr_un {
}
}
+sub INADDR_ANY ();
+sub INADDR_BROADCAST ();
+sub INADDR_LOOPBACK ();
+sub INADDR_LOOPBACK ();
+
+sub AF_802 ();
+sub AF_APPLETALK ();
+sub AF_CCITT ();
+sub AF_CHAOS ();
+sub AF_DATAKIT ();
+sub AF_DECnet ();
+sub AF_DLI ();
+sub AF_ECMA ();
+sub AF_GOSIP ();
+sub AF_HYLINK ();
+sub AF_IMPLINK ();
+sub AF_INET ();
+sub AF_LAT ();
+sub AF_MAX ();
+sub AF_NBS ();
+sub AF_NIT ();
+sub AF_NS ();
+sub AF_OSI ();
+sub AF_OSINET ();
+sub AF_PUP ();
+sub AF_SNA ();
+sub AF_UNIX ();
+sub AF_UNSPEC ();
+sub AF_X25 ();
+sub IOV_MAX ();
+sub MSG_BCAST ();
+sub MSG_CTLFLAGS ();
+sub MSG_CTLIGNORE ();
+sub MSG_CTRUNC ();
+sub MSG_DONTROUTE ();
+sub MSG_DONTWAIT ();
+sub MSG_EOF ();
+sub MSG_EOR ();
+sub MSG_ERRQUEUE ();
+sub MSG_FIN ();
+sub MSG_MAXIOVLEN ();
+sub MSG_MCAST ();
+sub MSG_NOSIGNAL ();
+sub MSG_OOB ();
+sub MSG_PEEK ();
+sub MSG_PROXY ();
+sub MSG_RST ();
+sub MSG_SYN ();
+sub MSG_TRUNC ();
+sub MSG_URG ();
+sub MSG_WAITALL ();
+sub PF_802 ();
+sub PF_APPLETALK ();
+sub PF_CCITT ();
+sub PF_CHAOS ();
+sub PF_DATAKIT ();
+sub PF_DECnet ();
+sub PF_DLI ();
+sub PF_ECMA ();
+sub PF_GOSIP ();
+sub PF_HYLINK ();
+sub PF_IMPLINK ();
+sub PF_INET ();
+sub PF_LAT ();
+sub PF_MAX ();
+sub PF_NBS ();
+sub PF_NIT ();
+sub PF_NS ();
+sub PF_OSI ();
+sub PF_OSINET ();
+sub PF_PUP ();
+sub PF_SNA ();
+sub PF_UNIX ();
+sub PF_UNSPEC ();
+sub PF_X25 ();
+sub SCM_CONNECT ();
+sub SCM_CREDENTIALS ();
+sub SCM_CREDS ();
+sub SCM_RIGHTS ();
+sub SCM_TIMESTAMP ();
+sub SHUT_RD ();
+sub SHUT_RDWR ();
+sub SHUT_WR ();
+sub SOCK_DGRAM ();
+sub SOCK_RAW ();
+sub SOCK_RDM ();
+sub SOCK_SEQPACKET ();
+sub SOCK_STREAM ();
+sub SOL_SOCKET ();
+sub SOMAXCONN ();
+sub SO_ACCEPTCONN ();
+sub SO_BROADCAST ();
+sub SO_DEBUG ();
+sub SO_DONTLINGER ();
+sub SO_DONTROUTE ();
+sub SO_ERROR ();
+sub SO_KEEPALIVE ();
+sub SO_LINGER ();
+sub SO_OOBINLINE ();
+sub SO_RCVBUF ();
+sub SO_RCVLOWAT ();
+sub SO_RCVTIMEO ();
+sub SO_REUSEADDR ();
+sub SO_SNDBUF ();
+sub SO_SNDLOWAT ();
+sub SO_SNDTIMEO ();
+sub SO_TYPE ();
+sub SO_USELOOPBACK ();
+sub UIO_MAXIOV ();
sub AUTOLOAD {
my($constname);
@@ -329,7 +441,7 @@ sub AUTOLOAD {
my ($pack,$file,$line) = caller;
croak "Your vendor has not defined Socket macro $constname, used";
}
- eval "sub $AUTOLOAD { $val }";
+ eval "sub $AUTOLOAD () { $val }";
goto &$AUTOLOAD;
}
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs
index 6abc647c2f..752c3ddb10 100644
--- a/ext/Socket/Socket.xs
+++ b/ext/Socket/Socket.xs
@@ -662,6 +662,24 @@ constant(char *name, int arg)
#else
goto not_there;
#endif
+ if (strEQ(name, "SHUT_RD"))
+#ifdef SHUT_RD
+ return SHUT_RD;
+#else
+ return 0;
+#endif
+ if (strEQ(name, "SHUT_RDWR"))
+#ifdef SHUT_RDWR
+ return SHUT_RDWR;
+#else
+ return 2;
+#endif
+ if (strEQ(name, "SHUT_WR"))
+#ifdef SHUT_WR
+ return SHUT_WR;
+#else
+ return 1;
+#endif
if (strEQ(name, "SOCK_DGRAM"))
#ifdef SOCK_DGRAM
return SOCK_DGRAM;
diff --git a/hints/hpux.sh b/hints/hpux.sh
index 467ceb9f89..6ba51cf0b9 100644
--- a/hints/hpux.sh
+++ b/hints/hpux.sh
@@ -61,7 +61,7 @@
#
# Lastly, you may want to include the "-z" HP linker flag so that
# reading from a NULL pointer causes a SEGV.
-ccflags="$ccflags -D_HPUX_SOURCE -Wl,-z"
+ccflags="$ccflags -D_HPUX_SOURCE"
# Check if you're using the bundled C compiler. This compiler doesn't support
# ANSI C (the -Aa flag) nor can it produce shared libraries. Thus we have
@@ -101,11 +101,14 @@ EOM
;;
esac
-# Even if you use gcc, prefer the HP math library over the GNU one.
-
-case "`$cc -v 2>&1`" in
-"*gcc*" ) test -d /lib/pa1.1 && ccflags="$ccflags -L/lib/pa1.1" ;;
-esac
+# Backward compatibility (uselonglong is deprecated).
+case "$uselonglolong" in
+"$define"|true|[yY]*)
+ case "$use64bits" in
+ '') use64bits="$define" ;;
+ esac
+ ;;
+esac
# Determine the architecture type of this system.
# Keep leading tab below -- Configure Black Magic -- RAM, 03/02/97
@@ -139,6 +142,68 @@ else
selecttype='int *'
fi
+case "$use64bits" in
+$define|true|[yY]*)
+ if [ "$xxOsRevMajor" -lt 11 ]; then
+ cat <<EOM >&4
+
+64-bit compilation is not supported on HP-UX $xxOsRevMajor.
+You need at least HP-UX 11.0.
+Cannot continue, aborting.
+
+EOM
+ exit 1
+ fi
+
+ # Without the 64-bit libc we cannot do much.
+ if [ ! -f /lib/pa20_64/libc.sl ]; then
+ cat <<EOM >&4
+
+You do not seem to have the 64-bit libraries in /lib/pa20_64.
+Most importantly, I cannot find /lib/pa20_64/libc.sl.
+Cannot continue, aborting.
+
+EOM
+ exit 1
+ fi
+
+ ccflags="$ccflags +DD64"
+ ldflags="$ldflags +DD64"
+ loclibpth="$loclibpth /lib/pa20_64"
+ libscheck='case "`file $xxx`" in
+*LP64*|*PA-RISC2.0*) ;;
+*) xxx=/no/64-bit$xxx ;;
+esac'
+ ld=/usr/bin/ld
+ ar=/usr/bin/ar
+ full_ar=$ar
+
+ # The strict ANSI mode (-Aa) doesn't like the LL suffixes.
+ case "$ccflags" in
+ *-Aa*)
+ echo "(Changing from strict ANSI compilation to extended because of 64-bitness)"
+ ccflags=`echo $ccflags|sed 's@ -Aa @ -Ae @'`
+ ;;
+ esac
+
+ set `echo " $libswanted " | sed -e 's@ dl @ @'`
+ libswanted="$*"
+
+ case "`$cc -v 2>&1`" in
+ *gcc*) ccflags="$ccflags -L/lib/pa20_64" ;;
+ esac
+ ;;
+*) loclibpth="$loclibpth /lib/pa1.1"
+ case "`$cc -v 2>&1`" in
+ *gcc*) ccflags="$ccflags -L/lib/pa20_64" ;;
+ esac
+ ;;
+esac
+
+case "`getconf KERNEL_BITS 2>/dev/null`" in
+*64*) ldflags="$ldflags -Wl,+vnocompatwarnings" ;;
+esac
+
# Remove bad libraries that will cause problems
# (This doesn't remove libraries that don't actually exist)
# -lld is unneeded (and I can't figure out what it's used for anyway)
@@ -289,69 +354,6 @@ EOM
esac
EOCBU
-# This script UU/use64bits.cbu will get 'called-back' by Configure
-# after it has prompted the user for whether to use 64 bits.
-cat > UU/use64bits.cbu <<'EOCBU'
-case "$use64bits" in
-$define|true|[yY]*)
- if [ "$xxOsRevMajor" -lt 11 ]; then
- cat <<EOM >&4
-
-64-bit compilation is not supported on HP-UX $xxOsRevMajor.
-You need at least HP-UX 11.0.
-Cannot continue, aborting.
-
-EOM
- exit 1
- fi
-
- # Without the 64-bit libc we cannot do much.
- if [ ! -f /lib/pa20_64/libc.sl ]; then
- cat <<EOM >&4
-
-You do not seem to have the 64-bit libraries in /lib/pa20_64.
-Most importantly, I cannot find /lib/pa20_64/libc.sl.
-Cannot continue, aborting.
-
-EOM
- exit 1
- fi
-
- ld=/usr/bin/ld
- ar=/usr/bin/ar
- full_ar=$ar
-
- # The strict ANSI mode (-Aa) doesn't like the LL suffixes.
- case "$ccflags" in
- *-Aa*)
- echo "(Changing from strict ANSI compilation to extended because of 64-bitness)"
- ccflags=`echo $ccflags|sed 's@ -Aa @ -Ae @'`
- ;;
- esac
-
- set `echo " $libswanted " | sed -e 's@ dl @ @'`
- libswanted="$*"
-
- ;;
-esac
-EOCBU
-
-case "$use64bits" in
-$define|true|[yY]*)
- glibpth="`echo $glibpth|sed 's: /lib/pa1.1 : /lib/pa20_64 :'`"
- ccflags="$ccflags +DD64"
- ldflags="$ldflags +DD64"
- libscheck='case "`file $xxx`" in
-*LP64*|*PA-RISC2.0*) ;;
-*) xxx=/no/64-bit$xxx ;;
-esac'
- ;;
-esac
-
-case "`getconf KERNEL_BITS 2>/dev/null`" in
-*64*) ldflags="$ldflags -Wl,+vnocompatwarnings" ;;
-esac
-
# This script UU/uselfs.cbu will get 'called-back' by Configure
# after it has prompted the user for whether to use 64 bits.
cat > UU/uselfs.cbu <<'EOCBU'
diff --git a/perl.h b/perl.h
index b47745f41e..cb3e6eb251 100644
--- a/perl.h
+++ b/perl.h
@@ -821,6 +821,10 @@ struct perl_mstats {
* in the face of half-implementations.)
*/
+#ifdef I_SYSMODE
+#include <sys/mode.h>
+#endif
+
#ifndef S_IFMT
# ifdef _S_IFMT
# define S_IFMT _S_IFMT
@@ -915,6 +919,30 @@ struct perl_mstats {
# define S_ISGID 02000
#endif
+#ifndef S_IRWXU
+# define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
+#endif
+
+#ifndef S_IRWXG
+# define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
+#endif
+
+#ifndef S_IRWXO
+# define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
+#endif
+
+#ifndef S_IREAD
+# define S_IREAD S_IRUSR
+#endif
+
+#ifndef S_IWRITE
+# define S_IWRITE S_IWUSR
+#endif
+
+#ifndef S_IEXEC
+# define S_IEXEC S_IXUSR
+#endif
+
#ifdef ff_next
# undef ff_next
#endif
@@ -2059,9 +2087,9 @@ char *crypt (const char*, const char*);
# ifndef getenv
char *getenv (const char*);
# endif /* !getenv */
-#if !defined(EPOC) && !(defined(__hpux) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+# if !defined(EPOC) && !(defined(__hpux) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
Off_t lseek (int,Off_t,int);
-#endif
+# endif
# endif /* !DONT_DECLARE_STD */
char *getlogin (void);
#endif /* !__cplusplus */
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index eb44fc4adc..8327a6887d 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -1399,8 +1399,11 @@ large file (more than 4GB) access Note that the O_LARGEFILE is
automatically/transparently added to sysopen() flags if large file
support has been configured), Free/Net/OpenBSD locking behaviour flags
F_FLOCK, F_POSIX, Linux F_SHLCK, and O_ACCMODE: the combined mask of
-O_RDONLY, O_WRONLY, and O_RDWR. Also SEEK_SET, SEEK_CUR, and SEEK_END
-added for one-stop shopping of the seek/sysseek constants.
+O_RDONLY, O_WRONLY, and O_RDWR. The seek()/sysseek() constants
+SEEK_SET, SEEK_CUR, and SEEK_END are available via the C<:seek> tag.
+The chmod()/stat() S_IF* constants and S_IS* functions are available
+via the C<:mode> tag.
+
=item File::Compare
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index e79f97d1e4..d38424904b 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -427,7 +427,7 @@ modulo the caveats given in L<perlipc/"Signals">.
Returns the arctangent of Y/X in the range -PI to PI.
-For the tangent operation, you may use the C<POSIX::tan()>
+For the tangent operation, you may use the C<Math::Trig::tan>
function, or use the familiar relation:
sub tan { sin($_[0]) / cos($_[0]) }
@@ -563,6 +563,14 @@ successfully changed. See also L</oct>, if all you have is a string.
$mode = '0644'; chmod oct($mode), 'foo'; # this is better
$mode = 0644; chmod $mode, 'foo'; # this is best
+You can also import the symbolic C<S_I*> constants from the Fcntl
+module:
+
+ use Fcntl ':mode';
+
+ chmod S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH, @executables;
+ # This is identical to the chmod 0755 of the above example.
+
=item chomp VARIABLE
=item chomp LIST
@@ -770,7 +778,7 @@ to check the condition at the top of the loop.
Returns the cosine of EXPR (expressed in radians). If EXPR is omitted,
takes cosine of C<$_>.
-For the inverse cosine operation, you may use the C<POSIX::acos()>
+For the inverse cosine operation, you may use the C<Math::Trig::acos()>
function, or use this relation:
sub acos { atan2( sqrt(1 - $_[0] * $_[0]), $_[0] ) }
@@ -2323,7 +2331,7 @@ This scalar value is B<not> locale dependent, see L<perllocale>, but
instead a Perl builtin. Also see the C<Time::Local> module
(to convert the second, minutes, hours, ... back to seconds since the
stroke of midnight the 1st of January 1970, the value returned by
-time()), and the strftime(3) and mktime(3) function available via the
+time()), and the strftime(3) and mktime(3) functions available via the
POSIX module. To get somewhat similar but locale dependent date
strings, set up your locale environment variables appropriately
(please see L<perllocale>) and try for example:
@@ -3723,9 +3731,8 @@ filehandle. The values for WHENCE are C<0> to set the new position to
POSITION, C<1> to set it to the current position plus POSITION, and
C<2> to set it to EOF plus POSITION (typically negative). For WHENCE
you may use the constants C<SEEK_SET>, C<SEEK_CUR>, and C<SEEK_END>
-(start of the file, current position, end of the file) from any of the
-modules Fcntl, C<IO::Seekable>, or POSIX. Returns C<1> upon success,
-C<0> otherwise.
+(start of the file, current position, end of the file) from the Fcntl
+module. Returns C<1> upon success, C<0> otherwise.
If you want to position file for C<sysread> or C<syswrite>, don't use
C<seek>--buffering makes its effect on the file's system position
@@ -3974,7 +3981,7 @@ processes.
Returns the sine of EXPR (expressed in radians). If EXPR is omitted,
returns sine of C<$_>.
-For the inverse sine operation, you may use the C<POSIX::asin>
+For the inverse sine operation, you may use the C<Math::Trig::asin>
function, or use this relation:
sub asin { atan2($_[0], sqrt(1 - $_[0] * $_[0])) }
@@ -4503,7 +4510,8 @@ last stat or filetest are returned. Example:
print "$file is executable NFS file\n";
}
-(This works on machines only for which the device number is negative under NFS.)
+(This works on machines only for which the device number is negative
+under NFS.)
Because the mode contains both the file type and its permissions, you
should mask off the file type portion and (s)printf using a C<"%o">
@@ -4524,6 +4532,66 @@ The File::stat module provides a convenient, by-name access mechanism:
$filename, $sb->size, $sb->mode & 07777,
scalar localtime $sb->mtime;
+You can import symbolic mode constants (C<S_IF*>) and functions
+(C<S_IS*>) from the Fcntl module:
+
+ use Fcntl ':mode';
+
+ $mode = (stat($filename))[2];
+
+ $user_rwx = ($mode & S_IRWXU) >> 6;
+ $group_read = ($mode & S_IRGRP) >> 3;
+ $other_execute = $mode & S_IXOTH;
+
+ printf "Permissions are %04o\n", S_ISMODE($mode), "\n";
+
+ $is_setuid = $mode & S_ISUID;
+ $is_setgid = S_ISDIR($mode);
+
+You could write the last two using the C<-u> and C<-d> operators.
+The commonly available S_IF* constants are
+
+ # Permissions: read, write, execute, for user, group, others.
+
+ S_IRWXU S_IRUSR S_IWUSR S_IXUSR
+ S_IRWXG S_IRGRP S_IWGRP S_IXGRP
+ S_IRWXO S_IROTH S_IWOTH S_IXOTH
+
+ # Setuid/Setgid/Stickiness.
+
+ S_ISUID S_ISGID S_ISVTX S_ISTXT
+
+ # File types. Not necessarily all are available on your system.
+
+ S_IFREG S_IFDIR S_IFLNK S_IFBLK S_ISCHR S_IFIFO S_IFSOCK S_IFWHT S_ENFMT
+
+ # The following are compatibility aliases for S_IRUSR, S_IWUSR, S_IXUSR.
+
+ S_IREAD S_IWRITE S_IEXEC
+
+and the S_IF* functions are
+
+ S_IFMODE($mode) the part of $mode containg the permission bits
+ and the setuid/setgid/sticky bits
+
+ S_IFMT($mode) the part of $mode containing the file type
+ which can be bit-anded with e.g. S_IFREG
+ or with the following functions
+
+ # The operators -f, -d, -l, -b, -c, -p, and -s.
+
+ S_ISREG($mode) S_ISDIR($mode) S_ISLNK($mode)
+ S_ISBLK($mode) S_ISCHR($mode) S_ISFIFO($mode) S_ISSOCK($mode)
+
+ # No direct -X operator counterpart, but for the first one
+ # the -g operator is often equivalent. The ENFMT stands for
+ # record flocking enforcement, a platform-dependent feature.
+
+ S_ISENFMT($mode) S_ISWHT($mode)
+
+See your native chmod(2) and stat(2) documentation for more details
+about the S_* constants.
+
=item study SCALAR
=item study
@@ -4763,7 +4831,7 @@ POSITION, C<1> to set the it to the current position plus POSITION,
and C<2> to set it to EOF plus POSITION (typically negative). For
WHENCE, you may also use the constants C<SEEK_SET>, C<SEEK_CUR>, and
C<SEEK_END> (start of the file, current position, end of the file)
-from any of the modules Fcntl, C<IO::Seekable>, or POSIX.
+from the Fcntl module.
Returns the new position, or the undefined value on failure. A position
of zero is returned as the string C<"0 but true">; thus C<sysseek> returns
diff --git a/pod/perlopentut.pod b/pod/perlopentut.pod
index fd32bd9f49..cc9cf63ff2 100644
--- a/pod/perlopentut.pod
+++ b/pod/perlopentut.pod
@@ -303,11 +303,13 @@ from the Fcntl module, which supplies the following standard flags:
O_TRUNC Truncate the file
O_NONBLOCK Non-blocking access
-Less common flags that are sometimes available on some operating systems
-include C<O_BINARY>, C<O_TEXT>, C<O_SHLOCK>, C<O_EXLOCK>, C<O_DEFER>,
-C<O_SYNC>, C<O_ASYNC>, C<O_DSYNC>, C<O_RSYNC>, C<O_NOCTTY>, C<O_NDELAY>
-and C<O_LARGEFILE>. Consult your open(2) manpage or its local equivalent
-for details.
+Less common flags that are sometimes available on some operating
+systems include C<O_BINARY>, C<O_TEXT>, C<O_SHLOCK>, C<O_EXLOCK>,
+C<O_DEFER>, C<O_SYNC>, C<O_ASYNC>, C<O_DSYNC>, C<O_RSYNC>,
+C<O_NOCTTY>, C<O_NDELAY> and C<O_LARGEFILE>. Consult your open(2)
+manpage or its local equivalent for details. (Note: starting from
+Perl release 5.6 the O_LARGEFILE flag, if available, is automatically
+added to the sysopen() flags because large files are the the default.)
Here's how to use C<sysopen> to emulate the simple C<open> calls we had
before. We'll omit the C<|| die $!> checks for clarity, but make sure
diff --git a/t/lib/syslfs.t b/t/lib/syslfs.t
index 942bb4dad6..3b040dc6ac 100644
--- a/t/lib/syslfs.t
+++ b/t/lib/syslfs.t
@@ -11,7 +11,7 @@ BEGIN {
print "1..0\n# no 64-bit file offsets\n";
exit(0);
}
- require Fcntl; import Fcntl;
+ require Fcntl; import Fcntl qw(/^O_/ /^SEEK_/);
}
sub bye {