]> 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>
Thu, 30 Sep 2010 00:05:50 +0000 (00:05 +0000)
committerGuenter Knauf <fuankg@apache.org>
Thu, 30 Sep 2010 00:05:50 +0000 (00:05 +0000)
this does not change code for any platform unless CROSS_COMPILE is defined.
Backport of r795971 - reviewed by trawick, rjung.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@1002901 13f79535-47bb-0310-9956-ffa450edef68

STATUS
server/gen_test_char.c

diff --git a/STATUS b/STATUS
index 9f63929e3e19f335e19a1f4762bb9d17129f20f8..2ca42e89bf7877bacb0eb8423088c355157b5757 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -122,14 +122,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * gen_test_char.c: enable building gen_test_char for running on build machine
-    when cross-compiling. The patch doesnt introduce code changes for any
-    platform unless CROSS_COMPILE is defined. 
-    Trunk patch: http://svn.apache.org/viewvc?view=rev&revision=795438
-    2.2.x patch: http://svn.apache.org/viewvc?view=rev&revision=795971
-    Backport: http://people.apache.org/~fuankg/diffs/gen_test_char.c_httpd_2_0_x-backport-r795971.diff
-    +1: fuankg, trawick, rjung
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ please place SVN revisions from trunk here, so it is easy to
     identify exactly what the proposed changes are!  Add all new
index 2f93f27f01d5cff8539c9a874fffa63c1f694a45..e606e13fe8e60b8d1670a2f577f1c3f5400b64af 100644 (file)
  * limitations under the License.
  */
 
+#ifdef CROSS_COMPILE
+
+#define apr_isalnum(c) (isalnum(((unsigned char)(c))))
+#define apr_isalpha(c) (isalpha(((unsigned char)(c))))
+#define apr_iscntrl(c) (iscntrl(((unsigned char)(c))))
+#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"
 
+#if defined(WIN32) || defined(OS2)
+#define WANT_WIN32_OS2
+#endif
+
+#endif
+
 #if APR_HAVE_STDIO_H
 #include <stdio.h>
 #endif
@@ -66,7 +84,7 @@ int main(int argc, char *argv[])
             printf("\n    ");
 
         /* escape_shell_cmd */
-#if defined(WIN32) || defined(OS2)
+#if defined(WANT_WIN32_OS2)
         /* Win32/OS2 have 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