]> granicus.if.org Git - apache/commitdiff
Force all Apache functions to be linked into the executable, whether they
authorRyan Bloom <rbb@apache.org>
Tue, 19 Dec 2000 17:05:48 +0000 (17:05 +0000)
committerRyan Bloom <rbb@apache.org>
Tue, 19 Dec 2000 17:05:48 +0000 (17:05 +0000)
are used or not.  This uses the same mechanism that is used for APR
and APR-util.  This may not be the correct solution, but it works, and that
is what I really care about.  This also renames CHARSET_EBCDIC to
AP_CHARSET_EBCDIC.  This is for namespace correctness, but it also makes
the exports script a bit easier.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87424 13f79535-47bb-0310-9956-ffa450edef68

25 files changed:
CHANGES
Makefile.in
acinclude.m4
build/buildexports.awk
build/buildexports.sh
include/ap_config.h
include/ap_listen.h
include/http_config.h
include/httpd.h
include/util_ebcdic.h
modules/experimental/mod_charset_lite.c
modules/filters/mod_include.h
modules/proxy/mod_proxy.h
modules/proxy/proxy_ftp.c
modules/proxy/proxy_util.c
os/bs2000/ebcdic.c
os/tpf/ebcdic.c
server/Makefile.in
server/main.c
server/util.c
server/util_ebcdic.c
server/util_md5.c
server/util_script.c
support/htdigest.c
support/htpasswd.c

diff --git a/CHANGES b/CHANGES
index f745427ba3858104e2f37f9c8d34f6e8c910e686..00c48b2d04c1cabf3e8e4db9f6d823cbb6900064 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,11 @@
 Changes with Apache 2.0b1
+  *) Get the functions in server/linked into the server, regardless of
+     which modules linked into the server.  This uses the same hack 
+     for Apache that we use for APR and apr-util to ensure all of the
+     necessary functions are linked.  As a part of thise, the CHARSET_EBCIDC
+     was renamed to AP_CHARSET_EBCDIC for namespace protection, and to make
+     the scripts a bit easier.
+     [Ryan Bloom]
 
   *) Rework the RFC1413 handling to make it thread-safe, use a timeout
      on the query, and remove IPv4 dependencies.  [Jeff Trawick]
index d7438578fdea1b3ae080e5d569f692d806646a42..dfa123b9b387cd6985826a9f56b4d023c49c5a98 100644 (file)
@@ -12,7 +12,7 @@ PROGRAM_DEPENDENCIES = \
   $(AP_LIBS)
 
 PROGRAMS        = $(PROGRAM_NAME)
-targets         = $(PROGRAMS)
+targets         = $(PROGRAMS) 
 phony_targets   = $(srcdir)/buildmark.c
 install_targets = install-conf install-htdocs install-icons install-other \
        install-cgi install-include install-support
index f08f1746832990d252e875c6b7da4b837a4d7ad4..2391b5de50192d76b6fcf9ec5062795c9e961f17 100644 (file)
@@ -66,6 +66,7 @@ AC_DEFUN(APACHE_GEN_CONFIG_VARS,[
   APACHE_SUBST(sysconfdir)
   APACHE_SUBST(progname)
   APACHE_SUBST(prefix)
+  APACHE_SUBST(AWK)
   APACHE_SUBST(CC)
   APACHE_SUBST(CFLAGS)
   APACHE_SUBST(CPPFLAGS)
@@ -216,7 +217,7 @@ int main(void) {
   ac_cv_ebcdic="no"
 ])])
   if test "$ac_cv_ebcdic" = "yes"; then
-    AC_DEFINE(CHARSET_EBCDIC,, [Define if system uses EBCDIC])
+    AC_DEFINE(AP_CHARSET_EBCDIC,, [Define if system uses EBCDIC])
   fi
 ])
 
index 78f373065f826ec2b5c8d938f1002ce4d4d8679b..d0d692fe35e483e76b763a6ec996e4430f2d2928 100644 (file)
@@ -1,3 +1,3 @@
-/^APR_/     { print "#if", $1 }
+/^(APR?_|defined)/     { print "#if", $1 }
 /^\t*apr?_/ { print "const void *ap_hack_" $1 " = (const void *)" $1 ";" }
-/^\/APR_/   { print "#endif /*", substr($1,2), "*/" }
+/^\/(APR?_|defined)/   { print "#endif /*", substr($1,2), "*/" }
index b1ac43ccd5d798190b2c30d538b7136c3d90e876..38ffbd66b199840da7fa6048bfdf6f1b9cb86f53 100755 (executable)
@@ -1,9 +1,9 @@
 #! /bin/sh
 
 if test -z "$1"; then
-    echo "USAGE: $0 SRCLIB-DIRECTORY"
+    echo "USAGE: $0 HTTPD-DIRECTORY"
     echo ""
-    echo "for example: $0 ../srclib"
+    echo "for example: $0 .."
     exit 1
 fi
 
@@ -12,9 +12,10 @@ echo " * link all of the APR functions into server regardless of whether"
 echo " * the base server uses them."
 echo " */"
 echo ""
+echo "#define CORE_PRIVATE"
 
 cur_dir="`pwd`"
-for dir in $1/apr/include $1/apr-util/include
+for dir in $1/srclib/apr/include $1/srclib/apr-util/include $1/include
 do
     cd $dir
     for file in *.h; do
index e5f4e0ad7e700255145e5d2d186729388571d5f4..5c458ba070bb351124def5008e891fb83316131d 100644 (file)
@@ -243,7 +243,7 @@ AP_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(AP,ret,name,args_decl,args_use,decline)
 #define AP_HAVE_RELIABLE_PIPED_LOGS TRUE
 #endif
 
-#if defined(CHARSET_EBCDIC) && !defined(APACHE_XLATE)
+#if defined(AP_CHARSET_EBCDIC) && !defined(APACHE_XLATE)
 #define APACHE_XLATE
 #endif
 
index 8beee07aa8b6539eb4edf353077b47cab42a2b5d..e723224a5435afd1cc247516390d1c8e77587361 100644 (file)
@@ -56,6 +56,7 @@
 #define AP_LISTEN_H
 
 #include "apr_network_io.h"
+#include "httpd.h"
 #include "http_config.h"
 
 /**
@@ -114,7 +115,10 @@ void ap_listen_pre_config(void);
  * Prefork or SPMT_OS2 MPMs.
  */ 
 int ap_setup_listeners(server_rec *s);
-#else
+#endif
+/* Split into two #if's to make the exports scripts easier.
+ */
+#if defined(WIN32) || defined(SPMT_OS2_MPM)
 /**
  * Create and open a socket on the specified port.  This includes listening
  * and binding the socket.
index de322b4573fa61bc4b53804e7c456b6b85439e4d..a977776b0e98667211b6c27184790b4e314cbbbc 100644 (file)
@@ -447,6 +447,7 @@ struct module_struct {
                                NULL, \
                                MODULE_MAGIC_COOKIE
 
+#if AP_RBB_HACK
 /**
  * Generic accessors for other modules to get at their own module-specific
  * data
@@ -457,6 +458,8 @@ struct module_struct {
  * @deffunc void *ap_get_module_config(void *conf_vector, module *m)
  */
 AP_DECLARE(void *) ap_get_module_config(void *conf_vector, module *m);
+#endif
+#if AP_RBB_HACK
 /**
  * Generic accessors for other modules to set at their own module-specific
  * data
@@ -467,6 +470,7 @@ AP_DECLARE(void *) ap_get_module_config(void *conf_vector, module *m);
  * @deffunc void ap_set_module_config(void *conf_vector, module *m, void *val)
  */
 AP_DECLARE(void) ap_set_module_config(void *conf_vector, module *m, void *val);
+#endif
 
 #define ap_get_module_config(v,m)      \
     (((void **)(v))[(m)->module_index])
index 62f9cd7ed22c43f4c3f927b77ee6cf264cbdc980..46ed224ddf9409c655c2ef681e131c125a6b3e04 100644 (file)
@@ -517,11 +517,11 @@ struct ap_method_list_t {
 #define DIR_MAGIC_TYPE "httpd/unix-directory"
 
 /* Just in case your linefeed isn't the one the other end is expecting. */
-#ifndef CHARSET_EBCDIC
+#ifndef AP_CHARSET_EBCDIC
 #define LF 10
 #define CR 13
 #define CRLF "\015\012"
-#else /* CHARSET_EBCDIC */
+#else /* AP_CHARSET_EBCDIC */
 /* For platforms using the EBCDIC charset, the transition ASCII->EBCDIC is done
  * in the buff package (bread/bputs/bwrite).  Everywhere else, we use
  * "native EBCDIC" CR and NL characters. These are therefore
@@ -531,7 +531,7 @@ struct ap_method_list_t {
 #define CR '\r'
 #define LF '\n'
 #define CRLF "\r\n"
-#endif /* CHARSET_EBCDIC */                                   
+#endif /* AP_CHARSET_EBCDIC */                                   
 
 /* Possible values for request_rec.read_body (set by handling module):
  *    REQUEST_NO_BODY          Send 413 error if message has any body
index 97998237906065bd9942c23f398b8b3d71abe6c7..149784069fa2c5f7a843b764dd3ce929b14f8981 100644 (file)
@@ -59,7 +59,6 @@
 #ifndef APACHE_UTIL_EBCDIC_H
 #define APACHE_UTIL_EBCDIC_H
 
-#ifdef CHARSET_EBCDIC
 
 #ifdef __cplusplus
 extern "C" {
@@ -73,6 +72,8 @@ extern "C" {
  * @package Utilities for EBCDIC conversion
  */
 
+#ifdef AP_CHARSET_EBCDIC
+
 /**
  * Setup all of the global translation handlers
  * @param pool pool to allocate out of
@@ -99,11 +100,11 @@ void ap_xlate_proto_from_ascii(char *buffer, apr_size_t len);
 }
 #endif
 
-#else   /* CHARSET_EBCDIC */
+#else   /* AP_CHARSET_EBCDIC */
 
 #define ap_xlate_proto_to_ascii(x,y)          /* NOOP */
 #define ap_xlate_proto_from_ascii(x,y)        /* NOOP */
 
-#endif  /* CHARSET_EBCDIC */
+#endif  /* AP_CHARSET_EBCDIC */
     
 #endif  /* !APACHE_UTIL_EBCDIC_H */
index c9e7b02878ea9460ef9a0cd9de54818dc9eb8592..999704463bdade53e69182e4f03b997eb7238883 100644 (file)
@@ -291,7 +291,7 @@ static int find_code_page(request_rec *r)
  */
              
     if (strncasecmp(mime_type, "text/", 5) &&
-#ifdef CHARSET_EBCDIC
+#ifdef AP_CHARSET_EBCDIC
         /* On an EBCDIC machine, be willing to translate mod_autoindex-
          * generated output.  Otherwise, it doesn't look too cool.
          *
index 32db22b1714b1f84307a505ffbcdf8ddc2958a94..8777cf73bd4b87cb7e65a7448ef93a5152b2b6a0 100644 (file)
 #define SIZEFMT_BYTES 0
 #define SIZEFMT_KMG 1
 #define TMP_BUF_SIZE 1024
-#ifdef CHARSET_EBCDIC
+#ifdef AP_CHARSET_EBCDIC
 #define RAW_ASCII_CHAR(ch)  apr_xlate_conv_byte(ap_hdrs_from_ascii, (unsigned char)ch)
-#else /*CHARSET_EBCDIC*/
+#else /*AP_CHARSET_EBCDIC*/
 #define RAW_ASCII_CHAR(ch)  (ch)
-#endif /*CHARSET_EBCDIC*/
+#endif /*AP_CHARSET_EBCDIC*/
 
 module AP_MODULE_DECLARE_DATA includes_module;
 
index 9ab5296f60e3cffbed36114c4c6a0091f71e6bfd..afc6e9c44bf8db501be165dd367a4cafe8a29eee 100644 (file)
@@ -142,11 +142,11 @@ enum enctype {
 #define HDR_APP (0)            /* append header, for proxy_add_header() */
 #define HDR_REP (1)            /* replace header, for proxy_add_header() */
 
-#ifdef CHARSET_EBCDIC
+#ifdef AP_CHARSET_EBCDIC
 #define CRLF   "\r\n"
-#else /*CHARSET_EBCDIC*/
+#else /*AP_CHARSET_EBCDIC*/
 #define CRLF   "\015\012"
-#endif /*CHARSET_EBCDIC*/
+#endif /*AP_CHARSET_EBCDIC*/
 
 #define        DEFAULT_FTP_DATA_PORT   20
 #define        DEFAULT_FTP_PORT        21
index a2f45fa6e1318ebab79394b58fcef6baffcb3303..2bf43ed18547946d14a3e1ecb3fd7c0b3f947f65 100644 (file)
@@ -110,11 +110,11 @@ static int ftp_check_string(const char *x)
            ch = ap_proxy_hex2c(&x[i + 1]);
            i += 2;
        }
-#ifndef CHARSET_EBCDIC
+#ifndef AP_CHARSET_EBCDIC
         if (ch == '\015' || ch == '\012' || (ch & 0x80))
-#else /*CHARSET_EBCDIC*/
+#else /*AP_CHARSET_EBCDIC*/
         if (ch == '\r' || ch == '\n' || (os_toascii[ch] & 0x80))
-#endif /*CHARSET_EBCDIC*/
+#endif /*AP_CHARSET_EBCDIC*/
         return 0;
     }
     return 1;
@@ -602,9 +602,9 @@ int ap_proxy_ftp_handler(request_rec *r, ap_cache_el *c, char *url)
     ap_bpush_socket(f, sock);
 /* shouldn't we implement telnet control options here? */
 
-#ifdef CHARSET_EBCDIC
+#ifdef AP_CHARSET_EBCDIC
     ap_bsetflag(f, B_ASCII2EBCDIC|B_EBCDIC2ASCII, 1);
-#endif /*CHARSET_EBCDIC*/
+#endif /*AP_CHARSET_EBCDIC*/
 
 /* possible results: */
     /* 120 Service ready in nnn minutes. */
index 1cb27a03d365b25e7e3904158c481423fcd92bcd..af097f853a35aa2665618b32c274124cded57411 100644 (file)
@@ -78,7 +78,7 @@ int ap_proxy_hex2c(const char *x)
 {
     int i, ch;
 
-#ifndef CHARSET_EBCDIC
+#ifndef AP_CHARSET_EBCDIC
     ch = x[0];
     if (apr_isdigit(ch))
        i = ch - '0';
@@ -96,14 +96,14 @@ int ap_proxy_hex2c(const char *x)
     else
        i += ch - ('a' - 10);
     return i;
-#else /*CHARSET_EBCDIC*/
+#else /*AP_CHARSET_EBCDIC*/
     return (1 == sscanf(x, "%2x", &i)) ? os_toebcdic[i&0xFF] : 0;
-#endif /*CHARSET_EBCDIC*/
+#endif /*AP_CHARSET_EBCDIC*/
 }
 
 void ap_proxy_c2hex(int ch, char *x)
 {
-#ifndef CHARSET_EBCDIC
+#ifndef AP_CHARSET_EBCDIC
     int i;
 
     x[0] = '%';
@@ -118,14 +118,14 @@ void ap_proxy_c2hex(int ch, char *x)
        x[2] = ('A' - 10) + i;
     else
        x[2] = '0' + i;
-#else /*CHARSET_EBCDIC*/
+#else /*AP_CHARSET_EBCDIC*/
     static const char ntoa[] = { "0123456789ABCDEF" };
     ch &= 0xFF;
     x[0] = '%';
     x[1] = ntoa[(os_toascii[ch]>>4)&0x0F];
     x[2] = ntoa[os_toascii[ch]&0x0F];
     x[3] = '\0';
-#endif /*CHARSET_EBCDIC*/
+#endif /*AP_CHARSET_EBCDIC*/
 }
 
 /*
@@ -480,7 +480,7 @@ long int ap_proxy_send_fb(proxy_completion *completion, BUFF *f, request_rec *r,
     if (c) ap_cache_el_data(c, &cachefp);
 
 #if 0
-#ifdef CHARSET_EBCDIC
+#ifdef AP_CHARSET_EBCDIC
     /* The cache copy is ASCII, not EBCDIC, even for text/html) */
     ap_bsetflag(f, B_ASCII2EBCDIC|B_EBCDIC2ASCII, 0);
     if (c != NULL && c->fp != NULL)
index 70b6f150146b5ad37d23423bd77db4dad1437283..879b35050d1f078408ef59c8d6a2428a3b5d6093 100644 (file)
@@ -56,7 +56,7 @@
  * University of Illinois, Urbana-Champaign.
  */
 
-#ifdef CHARSET_EBCDIC
+#ifdef AP_CHARSET_EBCDIC
 #include "ap_config.h"
 #include "ebcdic.h"
 /*
@@ -249,4 +249,4 @@ ascii2ebcdic(unsigned char *dest, const unsigned char *srce, size_t count)
                *dest++ = os_toebcdic[*srce++];
        }
 }
-#endif /*CHARSET_EBCDIC*/
+#endif /*AP_CHARSET_EBCDIC*/
index c266f644a23497f4fa57becb9d7a96dd110b886b..0d44053a8a747c17f401389c58d53b9a76336999 100644 (file)
@@ -56,7 +56,7 @@
  * University of Illinois, Urbana-Champaign.
  */
 
-#ifdef CHARSET_EBCDIC
+#ifdef AP_CHARSET_EBCDIC
 #include "ap_config.h"
 #include "ebcdic.h"
 /*
@@ -217,5 +217,5 @@ ascii2ebcdic(void *dest, const void *srce, size_t count)
                 *udest++ = os_toebcdic[*usrce++];
     }
 }
-#endif /*CHARSET_EBCDIC*/
+#endif /*AP_CHARSET_EBCDIC*/
  
index 77cda7dc3e9b6a22e77298a17500fcd0b6bc5f12..f5857a864b493161974b6ecfaf6fa1391d9514ac 100644 (file)
@@ -1,8 +1,9 @@
 
-CLEANFILES = gen_test_char gen_uri_delims test_char.h uri_delims.h
+CLEANFILES = gen_test_char gen_uri_delims test_char.h uri_delims.h apache.exports
 
 SUBDIRS = mpm
 
+TARGET_EXPORTS    = apache.exports
 LTLIBRARY_NAME    = libmain.la
 LTLIBRARY_SOURCES = \
     uri_delims.h test_char.h \
@@ -31,7 +32,21 @@ test_char.h: gen_test_char
 util_uri.lo: uri_delims.h
 util.lo: test_char.h
 
-EXPORT_FILES = ../srclib/apr/apr.exports ../srclib/apr-util/aprutil.exports
+EXPORT_FILES = ../srclib/apr/apr.exports ../srclib/apr-util/aprutil.exports apache.exports
 
-exports.c: $(EXPORT_FILES)
-       (cat $(EXPORT_FILES) | ../build/buildexports.sh ../srclib) > $@
+delete-exports:
+       @if test -f $(TARGET_EXPORTS); then \
+                   headers="`find include/*.h -newer $(TARGET_EXPORTS)`" ; \
+                   if test -n "$$headers"; then \
+                       echo Found newer headers. Will rebuild $(TARGET_EXPORTS). ; \
+                       echo $(RM) -f $(TARGET_EXPORTS) ; \
+                       $(RM) -f $(TARGET_EXPORTS) ; \
+                   fi \
+       fi
+
+
+$(TARGET_EXPORTS):
+       $(AWK) -f $(top_srcdir)/srclib/apr/helpers/make_export.awk $(top_srcdir)/include/*.h > $@ ; \
+
+exports.c: delete-exports $(EXPORT_FILES)
+       (cat $(EXPORT_FILES) | ../build/buildexports.sh ..) > $@
index 58d2cfd1757cbe1bf85cfb0fdeedc8f27093cc87..e0bc3b6d0e4c17d4b90975f2e02f6f0577a4c71b 100644 (file)
@@ -156,8 +156,8 @@ static void show_compile_settings(void)
        printf(" -D PIPE_BUF=%ld\n",(long)PIPE_BUF);
 #endif
 #endif
-#ifdef CHARSET_EBCDIC
-    printf(" -D CHARSET_EBCDIC\n");
+#ifdef AP_CHARSET_EBCDIC
+    printf(" -D AP_CHARSET_EBCDIC\n");
 #endif
 #ifdef APACHE_XLATE
     printf(" -D APACHE_XLATE\n");
@@ -308,7 +308,7 @@ int main(int argc, const char * const argv[])
     pconf = process->pconf;
     ap_server_argv0 = process->short_name;
 
-#ifdef CHARSET_EBCDIC
+#ifdef AP_CHARSET_EBCDIC
     if (ap_init_ebcdic(pglobal) != APR_SUCCESS) {
         destroy_and_exit_process(process, 1);
     }
index a9fc058a1d439bc0a2d1cb01d9a41e6b1f1d495c..6947b35f79388a51e87c42d629d5c83b55d9761f 100644 (file)
@@ -1495,11 +1495,11 @@ static char x2c(const char *what)
 {
     register char digit;
 
-#ifndef CHARSET_EBCDIC
+#ifndef AP_CHARSET_EBCDIC
     digit = ((what[0] >= 'A') ? ((what[0] & 0xdf) - 'A') + 10 : (what[0] - '0'));
     digit *= 16;
     digit += (what[1] >= 'A' ? ((what[1] & 0xdf) - 'A') + 10 : (what[1] - '0'));
-#else /*CHARSET_EBCDIC*/
+#else /*AP_CHARSET_EBCDIC*/
     char xstr[5];
     xstr[0]='0';
     xstr[1]='x';
@@ -1507,7 +1507,7 @@ static char x2c(const char *what)
     xstr[3]=what[1];
     xstr[4]='\0';
     digit = apr_xlate_conv_byte(ap_hdrs_from_ascii, 0xFF & strtol(xstr, NULL, 16));
-#endif /*CHARSET_EBCDIC*/
+#endif /*AP_CHARSET_EBCDIC*/
     return (digit);
 }
 
@@ -1583,9 +1583,9 @@ static const char c2x_table[] = "0123456789abcdef";
 
 static apr_inline unsigned char *c2x(unsigned what, unsigned char *where)
 {
-#ifdef CHARSET_EBCDIC
+#ifdef AP_CHARSET_EBCDIC
     what = apr_xlate_conv_byte(ap_hdrs_to_ascii, (unsigned char)what);
-#endif /*CHARSET_EBCDIC*/
+#endif /*AP_CHARSET_EBCDIC*/
     *where++ = '%';
     *where++ = c2x_table[what >> 4];
     *where++ = c2x_table[what & 0xf];
index 51830d77c2e1939b10d24363e5fd9fa0582e6fa9..0089b4e88b8987fa28e00dd230d506f851b244bf 100644 (file)
@@ -58,7 +58,7 @@
 
 #include "ap_config.h"
 
-#ifdef CHARSET_EBCDIC
+#ifdef AP_CHARSET_EBCDIC
 
 #include "apr_strings.h"
 #include "httpd.h"
@@ -141,4 +141,4 @@ void ap_xlate_proto_from_ascii(char *buffer, apr_size_t len)
                           buffer, &outbytes_left);
 }
 
-#endif /* CHARSET_EBCDIC */
+#endif /* AP_CHARSET_EBCDIC */
index b1957a84270d1a12b3ecc9c5558e871921875c27..211997d255d87a88b4bb36d3bc3e2945e96cb217 100644 (file)
@@ -105,7 +105,7 @@ AP_DECLARE(char *) ap_md5_binary(apr_pool_t *p, const unsigned char *buf, int le
      */
 
     apr_MD5Init(&my_md5);
-#ifdef CHARSET_EBCDIC
+#ifdef AP_CHARSET_EBCDIC
     apr_MD5SetXlate(&my_md5, ap_hdrs_to_ascii);
 #endif
     apr_MD5Update(&my_md5, buf, (unsigned int)length);
index 786a005cc55eca0a0b91ed583c267e3a9067c35d..2ad5a54f5443f23bca9f86ab6b3353611d0104e2 100644 (file)
@@ -462,7 +462,7 @@ AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
 
        /* if we see a bogus header don't ignore it. Shout and scream */
 
-#ifdef CHARSET_EBCDIC
+#ifdef AP_CHARSET_EBCDIC
            /* Chances are that we received an ASCII header text instead of
             * the expected EBCDIC header lines. Try to auto-detect:
             */
@@ -487,7 +487,7 @@ AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
                                       w, &inbytes_left, w, &outbytes_left);
            }
        }
-#endif /*CHARSET_EBCDIC*/
+#endif /*AP_CHARSET_EBCDIC*/
        if (!(l = strchr(w, ':'))) {
            char malformed[(sizeof MALFORMED_MESSAGE) + 1
                           + MALFORMED_HEADER_LENGTH_TO_SHOW];
index c7a179ae76262e7c5f0b8fc5ba0116171d8e2813..9ed7dbacf8d0f5ec88998a7f91c617f2dcd49ec6 100644 (file)
 #endif
 
 #if 'A' == 0xC1
-#define CHARSET_EBCDIC
+#define AP_CHARSET_EBCDIC
 #endif
 
-#ifdef CHARSET_EBCDIC
+#ifdef AP_CHARSET_EBCDIC
 #define LF '\n'
 #define CR '\r'
 #else
 #define LF 10
 #define CR 13
-#endif /* CHARSET_EBCDIC */
+#endif /* AP_CHARSET_EBCDIC */
 
 #define MAX_STRING_LEN 256
 
 char *tn;
 apr_pool_t *cntxt;
-#ifdef CHARSET_EBCDIC
+#ifdef AP_CHARSET_EBCDIC
 apr_xlate_t *to_ascii;
 #endif
 
@@ -192,7 +192,7 @@ static void add_password(char *user, char *realm, apr_file_t *f)
     sprintf(string, "%s:%s:%s", user, realm, pw);
 
     apr_MD5Init(&context);
-#ifdef CHARSET_EBCDIC
+#ifdef AP_CHARSET_EBCDIC
     apr_MD5SetXlate(&context, to_ascii);
 #endif
     apr_MD5Update(&context, (unsigned char *) string, strlen(string));
@@ -241,7 +241,7 @@ int main(int argc, char *argv[])
     atexit(apr_terminate); 
     apr_create_pool(&cntxt, NULL);
 
-#ifdef CHARSET_EBCDIC
+#ifdef AP_CHARSET_EBCDIC
     rv = apr_xlate_open(&to_ascii, "ISO8859-1", APR_DEFAULT_CHARSET, cntxt);
     if (rv) {
         fprintf(stderr, "apr_xlate_open(): %s (%d)\n",
index 3d9bfbe91387e5cd5a8bbd5ebadf9e99fdd2be43..4ef063f950c5f854de2c4388d31b329ae0f5d7a8 100644 (file)
 #define unlink _unlink
 #endif
 
-#ifndef CHARSET_EBCDIC
+#ifndef AP_CHARSET_EBCDIC
 #define LF 10
 #define CR 13
-#else /*CHARSET_EBCDIC*/
+#else /*AP_CHARSET_EBCDIC*/
 #define LF '\n'
 #define CR '\r'
-#endif /*CHARSET_EBCDIC*/
+#endif /*AP_CHARSET_EBCDIC*/
 
 #define MAX_STRING_LEN 256
 #define ALG_PLAIN 0
@@ -384,7 +384,7 @@ int main(int argc, char *argv[])
     int noninteractive = 0;
     int i;
     int args_left = 2;
-#ifdef CHARSET_EBCDIC
+#ifdef AP_CHARSET_EBCDIC
     apr_pool_t *pool;
     apr_status_t rv;
     apr_xlate_t *to_ascii;
@@ -408,7 +408,7 @@ int main(int argc, char *argv[])
         fprintf(stderr, "apr_MD5InitEBCDIC()->%d\n", rv);
         exit(1);
     }
-#endif /*CHARSET_EBCDIC*/
+#endif /*AP_CHARSET_EBCDIC*/
 
     tempfilename = NULL;
     signal(SIGINT, (void (*)(int)) interrupted);