You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@locus.apache.org on 2000/10/06 20:28:28 UTC
cvs commit: apache-2.0/src/modules/mpm/prefork prefork.c
wrowe 00/10/06 11:28:28
Modified: src/modules/dav/fs repos.c
src/modules/file_cache cache_util.c file_garbage.c
src/modules/mpm/prefork prefork.c
Log:
Back out or finish up a few non-apr tests. Won't touch proxy at this
moment with a 10 foot pole. fs_dav is ok... the others need apr'ization
Revision Changes Path
1.22 +4 -2 apache-2.0/src/modules/dav/fs/repos.c
Index: repos.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/dav/fs/repos.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- repos.c 2000/10/06 17:52:44 1.21
+++ repos.c 2000/10/06 18:28:26 1.22
@@ -382,6 +382,7 @@
{
apr_finfo_t src_finfo; /* finfo for source file */
apr_finfo_t dst_state_finfo; /* finfo for STATE directory */
+ apr_status_t rv;
const char *src;
const char *dst;
@@ -399,8 +400,9 @@
/* ### do we need to deal with the umask? */
/* ensure that it exists */
- if (apr_make_dir(dst, APR_OS_DEFAULT, p) != 0) {
- if (APR_STATUS_IS_EEXIST(errno)) {
+ rv = apr_make_dir(dst, APR_OS_DEFAULT, p);
+ if (rv != APR_SUCCESS) {
+ if (APR_STATUS_IS_EEXIST(rv)) {
/* ### use something besides 500? */
return dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
"Could not create internal state directory");
1.7 +3 -3 apache-2.0/src/modules/file_cache/cache_util.c
Index: cache_util.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/file_cache/cache_util.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- cache_util.c 2000/10/06 17:52:45 1.6
+++ cache_util.c 2000/10/06 18:28:27 1.7
@@ -447,11 +447,11 @@
break;
*p = '\0';
#ifdef WIN32
- if (mkdir(file) < 0 && !APR_ERROR_IS_EEXIST(errno))
+ if (mkdir(file) < 0 && errno != EEXIST)
#elif defined(__TANDEM)
- if (mkdir(file, S_IRWXU | S_IRWXG | S_IRWXO) < 0 && !APR_ERROR_IS_EEXIST(errno))
+ if (mkdir(file, S_IRWXU | S_IRWXG | S_IRWXO) < 0 && errno != EEXIST)
#else
- if (mkdir(file, S_IREAD | S_IWRITE | S_IEXEC) < 0 && !APR_ERROR_IS_EEXIST(errno))
+ if (mkdir(file, S_IREAD | S_IWRITE | S_IEXEC) < 0 && errno != EEXIST)
#endif /* WIN32 */
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
"cache: error creating cache directory %s",
1.6 +1 -1 apache-2.0/src/modules/file_cache/file_garbage.c
Index: file_garbage.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/file_cache/file_garbage.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- file_garbage.c 2000/10/06 17:52:45 1.5
+++ file_garbage.c 2000/10/06 18:28:27 1.6
@@ -308,7 +308,7 @@
return 0;
}
if ((timefd = creat(filename, 0666)) == -1) {
- if (!APR_ERROR_IS_EEXIST(errno))
+ if (errno != EEXIST)
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"cache: creat(%s)", filename);
else
1.130 +1 -1 apache-2.0/src/modules/mpm/prefork/prefork.c
Index: prefork.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -r1.129 -r1.130
--- prefork.c 2000/10/06 17:52:45 1.129
+++ prefork.c 2000/10/06 18:28:27 1.130
@@ -214,7 +214,7 @@
apr_snprintf(buf, sizeof(buf), "%sgprof.%d", dir, (int)getpid());
}
dir = ap_server_root_relative(pconf, buf[0] ? buf : dir);
- if(mkdir(dir, 0755) < 0 && !APR_ERROR_IS_EEXIST(errno)) {
+ if(mkdir(dir, 0755) < 0 && errno != EEXIST) {
ap_log_error(APLOG_MARK, APLOG_ERR, errno, ap_server_conf,
"gprof: error creating directory %s", dir);
}