From 987893d82df390d7ed72e46f0cf8340d140952c1 Mon Sep 17 00:00:00 2001 From: Michal Rokos Date: Mon, 7 Mar 2011 12:43:11 +0100 Subject: [PATCH 1/2] Makefile: add NO_FNMATCH_CASEFOLD to HP-UX section fnmatch() on HP-UX does not support the GNU FNM_CASEFOLD extension, so set NO_FNMATCH_CASEFOLD to use the internal fnmatch implementation. Signed-off-by: Michal Rokos Signed-off-by: Junio C Hamano --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 775ee838c..5f873986a 100644 --- a/Makefile +++ b/Makefile @@ -1041,6 +1041,7 @@ ifeq ($(uname_S),HP-UX) NO_UNSETENV = YesPlease NO_HSTRERROR = YesPlease NO_SYS_SELECT_H = YesPlease + NO_FNMATCH_CASEFOLD = YesPlease SNPRINTF_RETURNS_BOGUS = YesPlease NO_NSEC = YesPlease ifeq ($(uname_R),B.11.00) From b6ab349b184b3a33c7bcc03521dafed3f9df380a Mon Sep 17 00:00:00 2001 From: Michal Rokos Date: Mon, 7 Mar 2011 13:13:15 +0100 Subject: [PATCH 2/2] git-compat-util.h: Honor HP C's noreturn attribute HP C for Integrity servers (Itanium) gained support for noreturn attribute sometime in 2006. It was released in Compiler Version A.06.10 and made available in July 2006. The __HP_cc define detects the HP C compiler version. Precede the __GNUC__ check so it works well when compiling with HP C using -Agcc option that enables partial support for the GNU C dialect. The -Agcc defines the __GNUC__ too. Signed-off-by: Michal Rokos Signed-off-by: Junio C Hamano --- git-compat-util.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git-compat-util.h b/git-compat-util.h index d6d269f13..e2d7e5017 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -208,7 +208,10 @@ extern char *gitbasename(char *); #define is_dir_sep(c) ((c) == '/') #endif -#ifdef __GNUC__ +#if __HP_cc >= 61000 +#define NORETURN __attribute__((noreturn)) +#define NORETURN_PTR +#elif defined(__GNUC__) #define NORETURN __attribute__((__noreturn__)) #define NORETURN_PTR __attribute__((__noreturn__)) #elif defined(_MSC_VER)