diff options
author | Garrett Rooney <rooneg@apache.org> | 2006-10-26 16:22:52 +0000 |
---|---|---|
committer | Garrett Rooney <rooneg@apache.org> | 2006-10-26 16:22:52 +0000 |
commit | 49e1dd5b81f2f260550beb20f72697843d6add9a (patch) | |
tree | 30bfa3d189c2b9d78a3892d607515d1607b5bd28 /file_io | |
parent | a3f42085153d3a7533ee7fd8dc283644439f43d2 (diff) | |
download | apr-49e1dd5b81f2f260550beb20f72697843d6add9a.tar.gz |
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.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@468055 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r-- | file_io/unix/mktemp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/file_io/unix/mktemp.c b/file_io/unix/mktemp.c index e481014e5..73c61dcfc 100644 --- a/file_io/unix/mktemp.c +++ b/file_io/unix/mktemp.c @@ -142,7 +142,7 @@ static int gettemp(char *path, apr_file_t **doopen, apr_int32_t flags, apr_pool_ 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 */ |