summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2003-11-26 03:09:25 +0100
committerJeff Trawick <trawick@apache.org>2003-11-26 03:09:25 +0100
commit1dc6636640d9da366889f6017b2f873cdc8bd38c (patch)
tree15cd6c4ead1c866284695aa04dce115e46eb8f48
parentSync with APACHE_2_0_BRANCH. (diff)
downloadapache2-1dc6636640d9da366889f6017b2f873cdc8bd38c.tar.xz
apache2-1dc6636640d9da366889f6017b2f873cdc8bd38c.zip
tidy up some charset recoding issues
the "need" for APACHE_XLATE went away some years ago when BUFF went POOF and charset recoding (translation) of non-protocol data could no longer be performed by the core... git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101894 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--include/ap_config.h4
-rw-r--r--include/util_charset.h18
-rw-r--r--server/main.c4
-rw-r--r--server/util_charset.c19
-rw-r--r--server/util_ebcdic.c14
5 files changed, 8 insertions, 51 deletions
diff --git a/include/ap_config.h b/include/ap_config.h
index 86ec5dc224..a951d0fbd5 100644
--- a/include/ap_config.h
+++ b/include/ap_config.h
@@ -284,8 +284,4 @@
#define AP_HAVE_RELIABLE_PIPED_LOGS TRUE
#endif
-#if APR_CHARSET_EBCDIC && !defined(APACHE_XLATE)
-#define APACHE_XLATE
-#endif
-
#endif /* AP_CONFIG_H */
diff --git a/include/util_charset.h b/include/util_charset.h
index ae4608cc96..fb7f889f9e 100644
--- a/include/util_charset.h
+++ b/include/util_charset.h
@@ -59,8 +59,6 @@
#ifndef APACHE_UTIL_CHARSET_H
#define APACHE_UTIL_CHARSET_H
-#ifdef APACHE_XLATE
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -68,6 +66,10 @@ extern "C" {
/**
* @package charset conversion
*/
+#include "apr.h"
+
+#if APR_CHARSET_EBCDIC
+
#include "apr_xlate.h"
/** On EBCDIC machine this is a translation handle used to translate the
@@ -78,19 +80,11 @@ extern apr_xlate_t *ap_hdrs_to_ascii;
* headers from ASCII to the local machine format after network transmission.
* On an ASCII machine this is NULL */
extern apr_xlate_t *ap_hdrs_from_ascii;
-/** On EBCDIC machine this is a translation handle used to translate the
- * content from the local machine format to ASCII for network transmission.
- * On an ASCII machine this is NULL */
-extern apr_xlate_t *ap_locale_to_ascii;
-/** On EBCDIC machine this is a translation handle used to translate the
- * content from ASCII to the local machine format after network transmission.
- * On an ASCII machine this is NULL */
-extern apr_xlate_t *ap_locale_from_ascii;
+#endif /* APR_CHARSET_EBCDIC */
+
#ifdef __cplusplus
}
#endif
-#endif /* APACHE_XLATE */
-
#endif /* !APACHE_UTIL_CHARSET_H */
diff --git a/server/main.c b/server/main.c
index 5cc84f86af..c404c06467 100644
--- a/server/main.c
+++ b/server/main.c
@@ -195,10 +195,6 @@ static void show_compile_settings(void)
printf(" -D APR_CHARSET_EBCDIC\n");
#endif
-#ifdef APACHE_XLATE
- printf(" -D APACHE_XLATE\n");
-#endif
-
#ifdef NEED_HASHBANG_EMUL
printf(" -D NEED_HASHBANG_EMUL\n");
#endif
diff --git a/server/util_charset.c b/server/util_charset.c
index af203857b2..4a90fdf9c4 100644
--- a/server/util_charset.c
+++ b/server/util_charset.c
@@ -58,7 +58,7 @@
#include "ap_config.h"
-#ifdef APACHE_XLATE
+#if APR_CHARSET_EBCDIC
#include "httpd.h"
#include "http_log.h"
@@ -81,19 +81,4 @@
apr_xlate_t *ap_hdrs_to_ascii, *ap_hdrs_from_ascii;
-/* ap_locale_to_ascii, ap_locale_from_ascii
- *
- * These handles are used for the translation of content, unless a
- * configuration module overrides them.
- *
- * For an EBCDIC machine, these are valid handles which are set up at
- * initialization to translate between ISO-8859-1 and the code page of
- * the httpd process's locale.
- *
- * For an ASCII machine, these remain NULL so that no translation is
- * performed (unless a configuration module does something, of course).
- */
-
-apr_xlate_t *ap_locale_to_ascii, *ap_locale_from_ascii;
-
-#endif /*APACHE_XLATE*/
+#endif /*APR_CHARSET_EBCDIC */
diff --git a/server/util_ebcdic.c b/server/util_ebcdic.c
index 342d6a9e8e..e603a11cc3 100644
--- a/server/util_ebcdic.c
+++ b/server/util_ebcdic.c
@@ -85,20 +85,6 @@ apr_status_t ap_init_ebcdic(apr_pool_t *pool)
return rv;
}
- rv = apr_xlate_open(&ap_locale_to_ascii, "ISO8859-1", APR_LOCALE_CHARSET, pool);
- if (rv) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
- "apr_xlate_open() failed");
- return rv;
- }
-
- rv = apr_xlate_open(&ap_locale_from_ascii, APR_LOCALE_CHARSET, "ISO8859-1", pool);
- if (rv) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
- "apr_xlate_open() failed");
- return rv;
- }
-
rv = apr_MD5InitEBCDIC(ap_hdrs_to_ascii);
if (rv) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,