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

[RFC] Support for HP NonStop

From
Joachim Schmitz <jojo@schmitz-digital.de>
Date
Aug 24, 2012, 19:22 UTC
Message-ID
<005501cd822d$bf844bb0$3e8ce310$@schmitz-digital.de>
Hi folks

On top of the patches I’ve submitted so far, which were needed for HP NonStop, but possibly useful for other platforms too, here is one that is at least in parts NonStop specific

diff --git a/git-compat-util.h b/git-compat-util.h
index a047221..d6a142a 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -74,7 +74,8 @@
# define _XOPEN_SOURCE 500
# endif
#elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && \
-      !defined(_M_UNIX) && !defined(__sgi) && !defined(__DragonFly__)
+      !defined(_M_UNIX) && !defined(__sgi) && !defined(__DragonFly__) && \
+      !defined(__TANDEM)
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 fo
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
+#ifdef __TANDEM /* or HAVE_STRINGS_H ? */
+#include <strings.h> /* for strcasecmp() */
+#endif
#include <errno.h>
#include <limits.h>
#include <sys/param.h>
@@ -141,6 +145,10 @@
#else
#include <stdint.h>
#endif
+#ifdef __TANDEM /* or NO_INTPTR_T resp. NO_UINTPTR_T? */
+typedef int intptr_t;
+typedef unsigned int uintptr_t;
+#endif
#if defined(__CYGWIN__)
#undef _XOPEN_SOURCE
#include <grp.h>

The 1st hunk avoids a ‘is already defined with a different value warning, and I
believe this is the only and right way to fix this, but on the 2nd and 3rd hunk 
I’d need advice on how to properly add those. The #ifdef __TANDEM…#endif 
works fine for me, but doesn’t seem 100% clean to me.
In the comment I mention alternatives.

strcasecamp() is declared in <strings.h> as per C99/POSIX, and in C99 mode a prototype has 
to be seen by the compiler.

intptr_t and uintprt_t seem to be optional in C99 and are not provided for NonStop

What do you think?

Bye, Jojo
Next: Junio C Hamano
Message 1 of 7 in “[RFC] Support for HP NonStop”
  1. Joachim SchmitzAug 24, 2012
  2. Junio C HamanoAug 24, 2012
  3. Joachim SchmitzAug 24, 2012
  4. Junio C HamanoAug 24, 2012
  5. Joachim SchmitzAug 25, 2012
  6. Jan EngelhardtSep 19, 2012
  7. Joachim SchmitzSep 19, 2012

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.