summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2019-07-15 11:53:23 +1000
committerTony Cook <tony@develop-help.com>2019-07-16 15:30:06 +1000
commit74b421cc877e412c4eda06757396a1e19fc756ba (patch)
treed51488c4218e0f6407eeac7a0d1dc586884c458d /util.h
parent0424723402ef153af8ee44222315d9b6a818d1ba (diff)
downloadperl-74b421cc877e412c4eda06757396a1e19fc756ba.tar.gz
(perl #134221) support O_APPEND for open ..., undef on VMS
VMS doesn't allow you to delete an open file like POSIXish systems do, but you can mark a file to be deleted once it's closed, but only when you open it. Since VMS doesn't (yet) have mkostemp() we can add our own flag to our mkostemp() emulation to pass the necessary magic to open() call to delete the file on close.
Diffstat (limited to 'util.h')
-rw-r--r--util.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/util.h b/util.h
index d8fa3e8396..d9df7b39c6 100644
--- a/util.h
+++ b/util.h
@@ -248,6 +248,17 @@ means arg not present, 1 is empty string/null byte */
int mkstemp(char*);
#endif
+#ifdef PERL_CORE
+# if defined(VMS)
+/* only useful for calls to our mkostemp() emulation */
+# define O_VMS_DELETEONCLOSE 0x40000000
+# ifdef HAS_MKOSTEMP
+# error 134221 will need a new solution for VMS
+# endif
+# else
+# define O_VMS_DELETEONCLOSE 0
+# endif
+#endif
#if defined(HAS_MKOSTEMP) && defined(PERL_CORE)
# define Perl_my_mkostemp(templte, flags) mkostemp(templte, flags)
#endif