From: Jarkko Hietaniemi Date: Sun, 27 May 2001 18:18:56 +0000 (+0000) Subject: O_APPEND and O_TRUNC are not portable. (Not available e.g. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d1da76111f983fdb229e2d4bbf81f9378abf9150;p=p5sagit%2Fp5-mst-13.2.git O_APPEND and O_TRUNC are not portable. (Not available e.g. for microperl.) p4raw-id: //depot/perl@10233 --- diff --git a/doio.c b/doio.c index e86862f..9c331f9 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" */