You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by ro...@apache.org on 2006/10/26 18:22:57 UTC

svn commit: r468055 - in /apr/apr/trunk: CHANGES file_io/unix/mktemp.c

Author: rooneg
Date: Thu Oct 26 09:22:52 2006
New Revision: 468055

URL: http://svn.apache.org/viewvc?view=rev&rev=468055
Log:
Portably check for EEXIST in the mktemp code.

Submitted by: Kenneth Golomb <KGolomb TradeCard.com>
PR: 40818

* file_io/unix/mktemp.c
  (gettemp): Use APR_STATUS_IS_EEXIST instead of comparing directly against
   APR_EEXIST.

* CHANGES: Note change.

Modified:
    apr/apr/trunk/CHANGES
    apr/apr/trunk/file_io/unix/mktemp.c

Modified: apr/apr/trunk/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/trunk/CHANGES?view=diff&rev=468055&r1=468054&r2=468055
==============================================================================
--- apr/apr/trunk/CHANGES (original)
+++ apr/apr/trunk/CHANGES Thu Oct 26 09:22:52 2006
@@ -1,4 +1,6 @@
 Changes for APR 1.3.0
+  *) Portably check for EEXIST in mktemp code.  PR 40818
+     [Kenneth Golomb <KGolomb TradeCard.com>]
 
   *) Fix apr_socket_recvfrom() to ensure the peer's address is returned
      through the "from" parameter.  [Joe Orton]

Modified: apr/apr/trunk/file_io/unix/mktemp.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/mktemp.c?view=diff&rev=468055&r1=468054&r2=468055
==============================================================================
--- apr/apr/trunk/file_io/unix/mktemp.c (original)
+++ apr/apr/trunk/file_io/unix/mktemp.c Thu Oct 26 09:22:52 2006
@@ -142,7 +142,7 @@
         if ((rv = apr_file_open(doopen, path, flags,
                                 APR_UREAD | APR_UWRITE, p)) == APR_SUCCESS)
             return APR_SUCCESS;
-        if (rv != APR_EEXIST)
+        if (!APR_STATUS_IS_EEXIST(rv))
             return rv;
 
         /* If we have a collision, cycle through the space of filenames */