summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-05-27 18:18:56 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-27 18:18:56 +0000
commitd1da76111f983fdb229e2d4bbf81f9378abf9150 (patch)
tree457f16303f9fc24e523ddf44bc51ef8b80a0aa3c /doio.c
parentc6f7b413036791fab1bc70a20478e35308cb125e (diff)
downloadperl-d1da76111f983fdb229e2d4bbf81f9378abf9150.tar.gz
O_APPEND and O_TRUNC are not portable. (Not available e.g.
for microperl.) p4raw-id: //depot/perl@10233
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/doio.c b/doio.c
index e86862f108..9c331f961f 100644
--- a/doio.c
+++ b/doio.c
@@ -143,7 +143,14 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
if (num_svs != 0) {
Perl_croak(aTHX_ "panic: sysopen with multiple args");
}
- if (rawmode & (O_WRONLY|O_RDWR|O_APPEND|O_CREAT|O_TRUNC))
+ if (rawmode & (O_WRONLY|O_RDWR|O_CREAT
+#ifdef O_APPEND /* Not fully portable. */
+ |O_APPEND
+#endif
+#ifdef O_TRUNC /* Not fully portable. */
+ |O_TRUNC
+#endif
+ ))
TAINT_PROPER("sysopen");
mode[ix++] = '#'; /* Marker to openn to use numeric "sysopen" */