diff options
author | Tony Cook <tony@develop-help.com> | 2019-07-15 11:53:23 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2019-07-16 15:30:06 +1000 |
commit | 74b421cc877e412c4eda06757396a1e19fc756ba (patch) | |
tree | d51488c4218e0f6407eeac7a0d1dc586884c458d /util.h | |
parent | 0424723402ef153af8ee44222315d9b6a818d1ba (diff) | |
download | perl-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.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 |