apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <sterl...@covalent.net>
Subject [PATCH] apr_file_mktemp should APR_CREATE the tmp file
Date Wed, 16 Jan 2002 03:04:00 GMT
this patch fixes it... Also -

should it really DELONCLOSE by default?  I don't think that's consistent
with most implementations of mkstemp - worst case we should document it
(and since the consumer can pass their own flags its not a big deal).

sterling

Index: srclib/apr/file_io/unix/mktemp.c
===================================================================
RCS file: /home/cvspublic/apr/file_io/unix/mktemp.c,v
retrieving revision 1.19
diff -u -r1.19 mktemp.c
--- srclib/apr/file_io/unix/mktemp.c	8 Jan 2002 12:29:38 -0000	1.19
+++ srclib/apr/file_io/unix/mktemp.c	16 Jan 2002 18:22:55 -0000
@@ -207,7 +207,8 @@
 #ifdef HAVE_MKSTEMP
     int fd;
 #endif
-    flags = (!flags) ? APR_READ | APR_WRITE | APR_EXCL | APR_DELONCLOSE : flags;
+    flags = (!flags) ? APR_CREATE | APR_READ | APR_WRITE |
+        APR_EXCL | APR_DELONCLOSE : flags;
 #ifndef HAVE_MKSTEMP
     return gettemp(template, fp, flags, p);
 #else


Mime
View raw message