PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * easy proposals to synch 2.4.x and trunk
- - Use apr_file_printf(... "%pm"...) instead of explicit call to apr_strerror
- - remove unused variables
- - axe some useless assignments (clang scan-build)
- - Remove useless apr_pstrdup as done for other mod_auth modules in r1026660
- - Remove unused APXS setting from template for generated Makefile
- trunk patches:
- - https://svn.apache.org/viewvc?view=revision&revision=1464674
- - https://svn.apache.org/viewvc?view=revision&revision=1465084
- - https://svn.apache.org/viewvc?view=revision&revision=1534997
- - https://svn.apache.org/viewvc?view=revision&revision=1538149
- - https://svn.apache.org/viewvc?view=revision&revision=1535699
- 2.4.x patches: trunk patches work
- - the 3 first ones partially apply because of files which are not part of 2.4.x
- http://people.apache.org/~jim/patches/ez-2.4-v1.patch
- +1: jailletc36, jim, minfrin
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
return rv;
}
if (rv != APR_SUCCESS) {
- char errmsg[120];
- apr_file_printf(errfile, "Could not open directory %s: %s" APR_EOL_STR,
- dir, apr_strerror(rv, errmsg, sizeof errmsg));
+ apr_file_printf(errfile, "Could not open directory %s: %pm" APR_EOL_STR,
+ dir, &rv);
return rv;
}
const char *file = apr_pstrcat(pool, dir, "/", dirent.name, NULL);
rv = apr_file_remove(file, pool);
if (APR_SUCCESS != rv) {
- char errmsg[120];
apr_file_printf(errfile,
- "Could not remove file '%s': %s" APR_EOL_STR, file,
- apr_strerror(rv, errmsg, sizeof errmsg));
+ "Could not remove file '%s': %pm" APR_EOL_STR, file,
+ &rv);
break;
}
}
rv = APR_SUCCESS;
}
if (rv != APR_SUCCESS) {
- char errmsg[120];
- apr_file_printf(errfile, "Could not remove directory %s: %s" APR_EOL_STR,
- dir, apr_strerror(rv, errmsg, sizeof errmsg));
+ apr_file_printf(errfile, "Could not remove directory %s: %pm" APR_EOL_STR,
+ dir, &rv);
}
}
rv = apr_dir_open(&dirp, base, pool);
if (rv != APR_SUCCESS) {
- char errmsg[120];
- apr_file_printf(errfile, "Could not open directory %s: %s" APR_EOL_STR,
- base, apr_strerror(rv, errmsg, sizeof errmsg));
+ apr_file_printf(errfile, "Could not open directory %s: %pm" APR_EOL_STR,
+ base, &rv);
return rv;
}
remove = apr_pstrcat(pool, base, "/", header, NULL);
status = apr_file_remove(remove, pool);
if (status != APR_SUCCESS && !APR_STATUS_IS_ENOENT(status)) {
- char errmsg[120];
- apr_file_printf(errfile, "Could not remove file %s: %s" APR_EOL_STR,
- remove, apr_strerror(status, errmsg, sizeof errmsg));
+ apr_file_printf(errfile, "Could not remove file %s: %pm" APR_EOL_STR,
+ remove, &status);
rv = status;
}
remove = apr_pstrcat(pool, base, "/", data, NULL);
status = apr_file_remove(remove, pool);
if (status != APR_SUCCESS && !APR_STATUS_IS_ENOENT(status)) {
- char errmsg[120];
- apr_file_printf(errfile, "Could not remove file %s: %s" APR_EOL_STR,
- remove, apr_strerror(status, errmsg, sizeof errmsg));
+ apr_file_printf(errfile, "Could not remove file %s: %pm" APR_EOL_STR,
+ remove, &status);
rv = status;
}
static void log_pid(apr_pool_t *pool, const char *pidfilename, apr_file_t **pidfile)
{
apr_status_t status;
- char errmsg[120];
pid_t mypid = getpid();
if (APR_SUCCESS == (status = apr_file_open(pidfile, pidfilename,
else {
if (errfile) {
apr_file_printf(errfile,
- "Could not write the pid file '%s': %s" APR_EOL_STR,
- pidfilename,
- apr_strerror(status, errmsg, sizeof errmsg));
+ "Could not write the pid file '%s': %pm" APR_EOL_STR,
+ pidfilename, &status);
}
exit(1);
}
char opt;
const char *arg;
char *proxypath, *path, *pidfilename;
- char errmsg[1024];
interrupted = 0;
repeat = 0;
}
proxypath = apr_pstrdup(pool, arg);
if ((status = apr_filepath_set(proxypath, pool)) != APR_SUCCESS) {
- usage(apr_psprintf(pool, "Could not set filepath to '%s': %s",
- proxypath, apr_strerror(status, errmsg, sizeof errmsg)));
+ usage(apr_psprintf(pool, "Could not set filepath to '%s': %pm",
+ proxypath, &status));
}
break;
}
if (apr_filepath_get(&path, 0, pool) != APR_SUCCESS) {
- usage(apr_psprintf(pool, "Could not get the filepath: %s",
- apr_strerror(status, errmsg, sizeof errmsg)));
+ usage(apr_psprintf(pool, "Could not get the filepath: %pm", &status));
}
baselen = strlen(path);