]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
enabled building gen_test_char for running on build when cross-compiling;
authorGuenter Knauf <fuankg@apache.org>
Sat, 18 Jul 2009 21:51:21 +0000 (21:51 +0000)
committerGuenter Knauf <fuankg@apache.org>
Sat, 18 Jul 2009 21:51:21 +0000 (21:51 +0000)
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

server/gen_test_char.c

index 16d0c7ceb03153b289a0036d186509f66fb0e662..4e3fb47129b04f71f1408943154c99974debb314 100644 (file)
  * 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