提交 081fd8d0 编写于 作者: M Matt Kraai 提交者: Junio C Hamano

Allow building with xmlparse.h

expat 1.1 and 1.2 provide xmlparse.h instead of expat.h.  Include the
former on systems that define the EXPAT_NEEDS_XMLPARSE_H variable and
define that variable on QNX systems, which ship with expat 1.1.
Signed-off-by: NMatt Kraai <matt.kraai@amo.abbott.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 aa398289
...@@ -43,6 +43,9 @@ all:: ...@@ -43,6 +43,9 @@ all::
# Define EXPATDIR=/foo/bar if your expat header and library files are in # Define EXPATDIR=/foo/bar if your expat header and library files are in
# /foo/bar/include and /foo/bar/lib directories. # /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. # Define NO_GETTEXT if you don't want Git output to be translated.
# A translated Git requires GNU libintl or another gettext implementation, # A translated Git requires GNU libintl or another gettext implementation,
# plus libintl-perl at runtime. # plus libintl-perl at runtime.
...@@ -1089,6 +1092,9 @@ else ...@@ -1089,6 +1092,9 @@ else
else else
EXPAT_LIBEXPAT = -lexpat EXPAT_LIBEXPAT = -lexpat
endif endif
ifdef EXPAT_NEEDS_XMLPARSE_H
BASIC_CFLAGS += -DEXPAT_NEEDS_XMLPARSE_H
endif
endif endif
endif endif
......
...@@ -523,6 +523,7 @@ endif ...@@ -523,6 +523,7 @@ endif
endif endif
ifeq ($(uname_S),QNX) ifeq ($(uname_S),QNX)
COMPAT_CFLAGS += -DSA_RESTART=0 COMPAT_CFLAGS += -DSA_RESTART=0
EXPAT_NEEDS_XMLPARSE_H = YesPlease
HAVE_STRINGS_H = YesPlease HAVE_STRINGS_H = YesPlease
NEEDS_SOCKET = YesPlease NEEDS_SOCKET = YesPlease
NO_FNMATCH_CASEFOLD = YesPlease NO_FNMATCH_CASEFOLD = YesPlease
......
...@@ -11,7 +11,11 @@ ...@@ -11,7 +11,11 @@
#include "list-objects.h" #include "list-objects.h"
#include "sigchain.h" #include "sigchain.h"
#ifdef EXPAT_NEEDS_XMLPARSE_H
#include <xmlparse.h>
#else
#include <expat.h> #include <expat.h>
#endif
static const char http_push_usage[] = static const char http_push_usage[] =
"git http-push [--all] [--dry-run] [--force] [--verbose] <remote> [<head>...]\n"; "git http-push [--all] [--dry-run] [--force] [--verbose] <remote> [<head>...]\n";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册