From: Jarkko Hietaniemi Date: Fri, 13 Aug 1999 09:56:25 +0000 (+0000) Subject: Use O_LARGEFILE if available. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a015af24b2d0b1531a3fb6be319dee296ef92ba5;p=p5sagit%2Fp5-mst-13.2.git Use O_LARGEFILE if available. p4raw-id: //depot/cfgperl@3977 --- diff --git a/t/lib/syslfs.t b/t/lib/syslfs.t index 2955397..076d06f 100644 --- a/t/lib/syslfs.t +++ b/t/lib/syslfs.t @@ -39,7 +39,11 @@ if ($^O eq 'win32' || $^O eq 'vms') { # consume less blocks than one megabyte (assuming nobody has # one megabyte blocks...) -sysopen(BIG, "big", O_WRONLY|O_CREAT|O_TRUNC) or +my $O_LARGEFILE; +eval { $O_LARGEFILE = O_LARGEFILE }; +$O_LARGEFILE = 0 unless defined $O_LARGEFILE; + +sysopen(BIG, "big", O_WRONLY|O_CREAT|O_TRUNC|$O_LARGEFILE) or do { warn "sysopen failed: $!\n"; bye }; sysseek(BIG, 1_000_000, SEEK_SET); syswrite(BIG, "big"); @@ -68,7 +72,7 @@ print "1..8\n"; my $fail = 0; -sysopen(BIG, "big", O_WRONLY|O_CREAT|O_TRUNC) or +sysopen(BIG, "big", O_WRONLY|O_CREAT|O_TRUNC|$O_LARGEFILE) or do { warn "sysopen failed: $!\n"; bye }; sysseek(BIG, 5_000_000_000, SEEK_SET); syswrite(BIG, "big");