Merge branch 'mk/old-expat'
authorJunio C Hamano <gitster@pobox.com>
Fri, 15 Feb 2013 00:06:08 +0000 (16:06 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 15 Feb 2013 00:06:08 +0000 (16:06 -0800)
* mk/old-expat:
Allow building with xmlparse.h

Makefile
config.mak.uname
http-push.c
index b4af30d271296bafd6a60f39a67647b1caa70612..951dc7d2d7ea5fcc430c65a183948b53a6166acf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -43,6 +43,9 @@ all::
 # Define EXPATDIR=/foo/bar if your expat header and library files are in
 # /foo/bar/include and /foo/bar/lib directories.
 #
+# Define EXPAT_NEEDS_XMLPARSE_H if you have an old version of expat (e.g.,
+# 1.1 or 1.2) that provides xmlparse.h instead of expat.h.
+#
 # Define NO_GETTEXT if you don't want Git output to be translated.
 # A translated Git requires GNU libintl or another gettext implementation,
 # plus libintl-perl at runtime.
@@ -1118,6 +1121,9 @@ else
                else
                        EXPAT_LIBEXPAT = -lexpat
                endif
+               ifdef EXPAT_NEEDS_XMLPARSE_H
+                       BASIC_CFLAGS += -DEXPAT_NEEDS_XMLPARSE_H
+               endif
        endif
 endif
 
index bea34f05111d6394281d984bd84e3043f2ca2442..8743a6d0af8f193c22eab4bf3791c3a8cc876502 100644 (file)
@@ -523,6 +523,7 @@ endif
 endif
 ifeq ($(uname_S),QNX)
        COMPAT_CFLAGS += -DSA_RESTART=0
+       EXPAT_NEEDS_XMLPARSE_H = YesPlease
        HAVE_STRINGS_H = YesPlease
        NEEDS_SOCKET = YesPlease
        NO_FNMATCH_CASEFOLD = YesPlease
index 3e72e84e8414644fb521711dd9645bf0bd6738a8..bd66f6ab6edd24946d2bc84e117a2b97417b1503 100644 (file)
 #include "list-objects.h"
 #include "sigchain.h"
 
+#ifdef EXPAT_NEEDS_XMLPARSE_H
+#include <xmlparse.h>
+#else
 #include <expat.h>
+#endif
 
 static const char http_push_usage[] =
 "git http-push [--all] [--dry-run] [--force] [--verbose] <remote> [<head>...]\n";