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
This commit is contained in:
Guenter Knauf
2009-07-18 21:51:21 +00:00
parent 6a3d1394f3
commit 4280a3e7ed

View File

@ -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 <ctype.h>
#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 <stdio.h>
#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