summaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorRyan Bloom <rbb@apache.org>2000-06-09 20:57:16 +0200
committerRyan Bloom <rbb@apache.org>2000-06-09 20:57:16 +0200
commit9803fc27fda4aee7dfb4da3d50f42004269f4834 (patch)
treea867a5cdaf128ab11107eafe89a02824c3c9a458 /os
parentPR: (diff)
downloadapache2-9803fc27fda4aee7dfb4da3d50f42004269f4834.tar.xz
apache2-9803fc27fda4aee7dfb4da3d50f42004269f4834.zip
Remove all occurances of strerror from Apache. ap_strerror works just
fine with standard errno values, and it is more portable. This also allows me to remove the check for strerror from Apache's configure script. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85486 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'os')
-rw-r--r--os/beos/beosd.c6
-rw-r--r--os/unix/unixd.c6
-rw-r--r--os/win32/os.h1
3 files changed, 8 insertions, 5 deletions
diff --git a/os/beos/beosd.c b/os/beos/beosd.c
index 93ec59fca1..09c8d1fa61 100644
--- a/os/beos/beosd.c
+++ b/os/beos/beosd.c
@@ -81,9 +81,10 @@ void beosd_detach(void)
/* close out the standard file descriptors */
if (freopen("/dev/null", "r", stdin) == NULL) {
+ char buf[120];
ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
"%s: unable to replace stdin with /dev/null: %s",
- ap_server_argv0, strerror(errno));
+ ap_server_argv0, ap_strerror(errno, buf, sizeof(buf)));
/* continue anyhow -- note we can't close out descriptor 0 because we
* have nothing to replace it with, and if we didn't have a descriptor
* 0 the next file would be created with that value ... leading to
@@ -91,9 +92,10 @@ void beosd_detach(void)
*/
}
if (freopen("/dev/null", "w", stdout) == NULL) {
+ char buf[120];
ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
"%s: unable to replace stdout with /dev/null: %s",
- ap_server_argv0, strerror(errno));
+ ap_server_argv0, ap_strerror(errno, buf, sizeof(buf)));
}
/* stderr is a tricky one, we really want it to be the error_log,
* but we haven't opened that yet. So leave it alone for now and it'll
diff --git a/os/unix/unixd.c b/os/unix/unixd.c
index 4409dd7f5d..5a933a8531 100644
--- a/os/unix/unixd.c
+++ b/os/unix/unixd.c
@@ -118,9 +118,10 @@ void unixd_detach(void)
/* close out the standard file descriptors */
if (freopen("/dev/null", "r", stdin) == NULL) {
+ char buf[120];
ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
"%s: unable to replace stdin with /dev/null: %s",
- ap_server_argv0, strerror(errno));
+ ap_server_argv0, ap_strerror(errno, buf, sizeof(buf)));
/* continue anyhow -- note we can't close out descriptor 0 because we
* have nothing to replace it with, and if we didn't have a descriptor
* 0 the next file would be created with that value ... leading to
@@ -128,9 +129,10 @@ void unixd_detach(void)
*/
}
if (freopen("/dev/null", "w", stdout) == NULL) {
+ char buf[120];
ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
"%s: unable to replace stdout with /dev/null: %s",
- ap_server_argv0, strerror(errno));
+ ap_server_argv0, ap_strerror(errno, buf, sizeof(buf)));
}
/* stderr is a tricky one, we really want it to be the error_log,
* but we haven't opened that yet. So leave it alone for now and it'll
diff --git a/os/win32/os.h b/os/win32/os.h
index 1b5deb3e4d..d20914d32f 100644
--- a/os/win32/os.h
+++ b/os/win32/os.h
@@ -118,7 +118,6 @@ typedef char * caddr_t;
#define HAVE_MEMMOVE
#define HAVE_STRCASECMP
#define HAVE_STRNCASECMP
-#define HAVE_STRERROR
#define HAVE_STRDUP
#define HAVE_STRSTR