diff options
author | Brian Havard <bjh@apache.org> | 2009-08-26 10:56:13 +0200 |
---|---|---|
committer | Brian Havard <bjh@apache.org> | 2009-08-26 10:56:13 +0200 |
commit | 60fbe11de19b807cbc9e372eecd3a86ceed74893 (patch) | |
tree | 53cecd61ce8930955243e594a333d488758000b2 /modules/generators | |
parent | Update transform for core. (diff) | |
download | apache2-60fbe11de19b807cbc9e372eecd3a86ceed74893.tar.xz apache2-60fbe11de19b807cbc9e372eecd3a86ceed74893.zip |
Bring back OS/2 support.
Reverses r758929 with a little bit of conflict resolution.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@807930 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/generators')
-rw-r--r-- | modules/generators/mod_cgi.c | 5 | ||||
-rw-r--r-- | modules/generators/mod_cgid.c | 2 | ||||
-rw-r--r-- | modules/generators/mod_status.c | 12 |
3 files changed, 14 insertions, 5 deletions
diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index 359b3baa89..ce50608243 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -390,7 +390,12 @@ static apr_status_t run_cgi_child(apr_file_t **script_out, #endif #ifdef DEBUG_CGI +#ifdef OS2 + /* Under OS/2 need to use device con. */ + FILE *dbg = fopen("con", "w"); +#else FILE *dbg = fopen("/dev/tty", "w"); +#endif int i; #endif diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index cfa4157d19..27849eebe7 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -1369,7 +1369,7 @@ static int cgid_handler(request_rec *r) return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, "attempt to include NPH CGI script"); -#if defined(WIN32) +#if defined(OS2) || defined(WIN32) #error mod_cgid does not work on this platform. If you teach it to, look #error at mod_cgi.c for required code in this path. #else diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c index 7a2be8f8dc..8d10e437e2 100644 --- a/modules/generators/mod_status.c +++ b/modules/generators/mod_status.c @@ -425,8 +425,10 @@ static int status_handler(request_rec *r) count, kbcount); #ifdef HAVE_TIMES - ap_rprintf(r, "CPULoad: %g\n", - (tu + ts + tcu + tcs) / tick / up_time * 100.); + /* Allow for OS/2 not having CPU stats */ + if (ts || tu || tcu || tcs) + ap_rprintf(r, "CPULoad: %g\n", + (tu + ts + tcu + tcs) / tick / up_time * 100.); #endif ap_rprintf(r, "Uptime: %ld\n", (long) (up_time)); @@ -447,11 +449,13 @@ static int status_handler(request_rec *r) ap_rputs("</dt>\n", r); #ifdef HAVE_TIMES + /* Allow for OS/2 not having CPU stats */ ap_rprintf(r, "<dt>CPU Usage: u%g s%g cu%g cs%g", tu / tick, ts / tick, tcu / tick, tcs / tick); - ap_rprintf(r, " - %.3g%% CPU load</dt>\n", - (tu + ts + tcu + tcs) / tick / up_time * 100.); + if (ts || tu || tcu || tcs) + ap_rprintf(r, " - %.3g%% CPU load</dt>\n", + (tu + ts + tcu + tcs) / tick / up_time * 100.); #endif if (up_time > 0) { |