From: Junio C Hamano Date: Tue, 15 Mar 2011 21:21:47 +0000 (-0700) Subject: Merge branch 'mr/hpux' X-Git-Tag: v1.7.5-rc0~79 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/848e219fe696b45d36353d12cdb47870cae2559e?hp=-c Merge branch 'mr/hpux' * mr/hpux: git-compat-util.h: Honor HP C's noreturn attribute Makefile: add NO_FNMATCH_CASEFOLD to HP-UX section --- 848e219fe696b45d36353d12cdb47870cae2559e diff --combined Makefile index ade79232f4,5f873986a9..5c2b797554 --- a/Makefile +++ b/Makefile @@@ -435,7 -435,6 +435,7 @@@ TEST_PROGRAMS_NEED_X += test-subproces TEST_PROGRAMS_NEED_X += test-svn-fe TEST_PROGRAMS_NEED_X += test-treap TEST_PROGRAMS_NEED_X += test-index-version +TEST_PROGRAMS_NEED_X += test-mktemp TEST_PROGRAMS = $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X)) @@@ -1042,6 -1041,7 +1042,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) diff --combined git-compat-util.h index 9c23622ed5,e2d7e50179..bf947b1ec3 --- a/git-compat-util.h +++ b/git-compat-util.h @@@ -31,9 -31,6 +31,9 @@@ #define maximum_signed_value_of_type(a) \ (INTMAX_MAX >> (bitsizeof(intmax_t) - bitsizeof(a))) +#define maximum_unsigned_value_of_type(a) \ + (UINTMAX_MAX >> (bitsizeof(uintmax_t) - bitsizeof(a))) + /* * Signed integer overflow is undefined in C, so here's a helper macro * to detect if the sum of two integers will overflow. @@@ -43,9 -40,6 +43,9 @@@ #define signed_add_overflows(a, b) \ ((b) > maximum_signed_value_of_type(a) - (a)) +#define unsigned_add_overflows(a, b) \ + ((b) > maximum_unsigned_value_of_type(a) - (a)) + #ifdef __GNUC__ #define TYPEOF(x) (__typeof__(x)) #else @@@ -214,7 -208,10 +214,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)