git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[patch 08/15] host-HPUX10.patch

From
GVGary V. Vaughan <git@mlists.thewrittenword.com>
Date
Mar 16, 2010, 05:42 UTC
Message-ID
<20100316054337.190506000@mlists.thewrittenword.com>
In-Reply-To
<20100316054220.075676000@mlists.thewrittenword.com>
HP-UX 10.20 has no PREAD, and while it does support mmap(), there is
no system MAP_FAILED definition.
---
 Makefile          |    1 +
 git-compat-util.h |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
Index: b/Makefile
===================================================================
--- a/Makefile
+++ b/Makefile
@@ -929,6 +929,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
@@ -217,7 +217,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
@@ -246,6 +245,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)
Previous: Gary V. VaughanNext: Gary V. Vaughan
Message 24 of 37 in “Portability Patches v3”
  1. 00/15 Portability Patches v3Gary V. Vaughan, Mar 16, 2010
  2. 01/15 user-cppflags.patchGary V. Vaughan, Mar 16, 2010
  3. Junio C HamanoMar 16, 2010
  4. 02/15 const-expr.patchGary V. Vaughan, Mar 16, 2010
  5. Johannes SixtMar 16, 2010
  6. Gary V. VaughanMar 16, 2010
  7. Avery PennarunMar 16, 2010
  8. Gary V. VaughanApr 25, 2010
  9. 03/15 pthread.patchGary V. Vaughan, Mar 16, 2010
  10. Junio C HamanoMar 16, 2010
  11. 04/15 diff-export.patchGary V. Vaughan, Mar 16, 2010
  12. Junio C HamanoMar 16, 2010
  13. 05/15 diff-test_cmp.patchGary V. Vaughan, Mar 16, 2010
  14. Junio C HamanoMar 16, 2010
  15. Gary V. VaughanApr 25, 2010
  16. 06/15 diff-defaults.patchGary V. Vaughan, Mar 16, 2010
  17. Junio C HamanoMar 16, 2010
  18. Gary V. VaughanApr 25, 2010
  19. 07/15 host-IRIX.patchGary V. Vaughan, Mar 16, 2010
  20. Junio C HamanoMar 16, 2010
  21. Gary V. VaughanApr 25, 2010
  22. Brandon CaseyMar 16, 2010
  23. Gary V. VaughanApr 25, 2010
  24. 08/15 host-HPUX10.patchGary V. Vaughan, Mar 16, 2010
  25. 09/15 host-HPUX11.patchGary V. Vaughan, Mar 16, 2010
  26. 10/15 host-OSF1.patchGary V. Vaughan, Mar 16, 2010
  27. 11/15 no-hstrerror.patchGary V. Vaughan, Mar 16, 2010
  28. Junio C HamanoMar 16, 2010
  29. Gary V. VaughanApr 25, 2010
  30. 12/15 no-inet_ntop.patchGary V. Vaughan, Mar 16, 2010
  31. 13/15 no-socklen_t.patchGary V. Vaughan, Mar 16, 2010
  32. Junio C HamanoMar 16, 2010
  33. Gary V. VaughanApr 25, 2010
  34. 14/15 no-ss_family.patchGary V. Vaughan, Mar 16, 2010
  35. 15/15 no-inline.patchGary V. Vaughan, Mar 16, 2010
  36. Sverre RabbelierMar 16, 2010
  37. Brandon CaseyMar 16, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.