Re: AIX and gcc (moving targets)
[p5sagit/p5-mst-13.2.git] / doio.c
diff --git a/doio.c b/doio.c
index e86862f..9c331f9 100644 (file)
--- 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" */