From: Guenter Knauf Date: Sat, 18 Jul 2009 21:51:21 +0000 (+0000) Subject: enabled building gen_test_char for running on build when cross-compiling; X-Git-Tag: 2.3.3~430 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4280a3e7ed747227d3efc100a69dc9e8787a86d9;p=thirdparty%2Fapache%2Fhttpd.git enabled building gen_test_char for running on build when cross-compiling; this does not change code for any platform unless CROSS_COMPILE is defined. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@795438 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/gen_test_char.c b/server/gen_test_char.c index 16d0c7ceb03..4e3fb47129b 100644 --- a/server/gen_test_char.c +++ b/server/gen_test_char.c @@ -14,9 +14,31 @@ * limitations under the License. */ +#ifdef CROSS_COMPILE + +/** @see isalnum */ +#define apr_isalnum(c) (isalnum(((unsigned char)(c)))) +/** @see isalpha */ +#define apr_isalpha(c) (isalpha(((unsigned char)(c)))) +/** @see iscntrl */ +#define apr_iscntrl(c) (iscntrl(((unsigned char)(c)))) +/** @see isprint */ +#define apr_isprint(c) (isprint(((unsigned char)(c)))) +#include +#define APR_HAVE_STDIO_H 1 +#define APR_HAVE_STRING_H 1 + +#else + #include "apr.h" #include "apr_lib.h" +#ifdef WIN32 +#define WANT_WIN32 +#endif + +#endif + #if APR_HAVE_STDIO_H #include #endif @@ -62,7 +84,7 @@ int main(int argc, char *argv[]) printf("\n "); /* escape_shell_cmd */ -#if defined(WIN32) +#if defined(WANT_WIN32) /* Win32 has many of the same vulnerable characters * as Unix sh, plus the carriage return and percent char. * The proper escaping of these characters varies from unix