From: Ryan Bloom Date: Mon, 15 May 2000 21:41:56 +0000 (+0000) Subject: Make mod_so use ap_strerror instead of the old ap_os_dso_error. The X-Git-Tag: APACHE_2_0_ALPHA_4~151 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=534e7aa08f9ac1ea4ccf2d62cf11c4e98e8ab60e;p=apache Make mod_so use ap_strerror instead of the old ap_os_dso_error. The error codes for dso's will need to be added to strerror in order for this to work fully. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85218 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/mappers/mod_so.c b/modules/mappers/mod_so.c index e684d21dc7..f6cf9bf0f4 100644 --- a/modules/mappers/mod_so.c +++ b/modules/mappers/mod_so.c @@ -220,7 +220,7 @@ static ap_status_t unload_file(void *handle) static const char *load_module(cmd_parms *cmd, void *dummy, char *modname, char *filename) { - ap_status_t stat; + ap_status_t status; ap_dso_handle_t *modhandle; ap_dso_handle_sym_t modsym; module *modp; @@ -254,8 +254,9 @@ static const char *load_module(cmd_parms *cmd, void *dummy, /* * Load the file into the Apache address space */ - if ((stat = ap_dso_load(&modhandle, szModuleFile, cmd->pool )) != APR_SUCCESS) { - const char *my_error = ap_os_dso_error(); + if ((status = ap_dso_load(&modhandle, szModuleFile, cmd->pool )) != APR_SUCCESS) { + char my_error[256]; + ap_strerror(ap_canonical_error(status), my_error, 256); return ap_pstrcat (cmd->pool, "Cannot load ", szModuleFile, " into server: ", my_error ? my_error : "(reason unknown)", @@ -269,9 +270,11 @@ static const char *load_module(cmd_parms *cmd, void *dummy, * First with the hidden variant (prefix `AP_') and then with the plain * symbol name. */ - if ((stat = ap_dso_sym(&modsym, modhandle, modname)) != APR_SUCCESS) { + if ((status = ap_dso_sym(&modsym, modhandle, modname)) != APR_SUCCESS) { + char my_err[256]; return ap_pstrcat(cmd->pool, "Can't locate API module structure `", modname, - "' in file ", szModuleFile, ": ", ap_os_dso_error(), NULL); + "' in file ", szModuleFile, ": ", + ap_strerror(ap_canonical_error(status), my_err, 256), NULL); } modp = (module*) modsym; modp->dynamic_load_handle = (ap_dso_handle_t *)modhandle;