[patch 10/16] host-HPUX10.patch
HP-UX 10.20 has no PREAD, and while it does support mmap(), there is
no system MAP_FAILED definition.
---
Makefile | 3 +++
git-compat-util.h | 5 ++++-
2 files changed, 7 insertions(+), 1 deletion(-)
Index: b/Makefile
===================================================================
--- a/Makefile
+++ b/Makefile
@@ -971,6 +971,9 @@ ifeq ($(uname_S),HP-UX)
NO_HSTRERROR = YesPlease
NO_SYS_SELECT_H = YesPlease
SNPRINTF_RETURNS_BOGUS = YesPlease
+ ifeq ($(uname_R),B.10.20)
+ NO_PREAD = YesPlease
+ endif
GIT_TEST_CMP = cmp
endif
ifeq ($(uname_S),Windows)
Index: b/git-compat-util.h
===================================================================
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -218,7 +218,6 @@ static inline const char *skip_prefix(co
#define PROT_READ 1
#define PROT_WRITE 2
#define MAP_PRIVATE 1
-#define MAP_FAILED ((void*)-1)
#endif
#define mmap git_mmap
@@ -247,6 +246,10 @@ extern int git_munmap(void *start, size_
#endif /* NO_MMAP */
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void*)-1)
+#endif
+
#ifdef NO_ST_BLOCKS_IN_STRUCT_STAT
#define on_disk_bytes(st) ((st).st_size)
#else
--
Gary V. Vaughan (gary@thewrittenword.com)