From: "Joachim Schmitz" <jojo@schmitz-digital.de>
To: <git@vger.kernel.org>
Subject: [RFC] Support for HP NonStop
Date: Fri, 24 Aug 2012 21:22:04 +0200 [thread overview]
Message-ID: <005501cd822d$bf844bb0$3e8ce310$@schmitz-digital.de> (raw)
In-Reply-To:
Hi folks
On top of the patches Ive 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
Id need advice on how to properly add those. The #ifdef __TANDEM
#endif
works fine for me, but doesnt 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 reply other threads:[~2012-08-24 19:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-24 19:22 Joachim Schmitz [this message]
2012-08-24 20:12 ` [RFC] Support for HP NonStop Junio C Hamano
2012-08-24 20:43 ` Joachim Schmitz
2012-08-24 21:50 ` Junio C Hamano
2012-08-25 8:03 ` Joachim Schmitz
2012-09-19 7:24 ` Jan Engelhardt
2012-09-19 8:16 ` Joachim Schmitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='005501cd822d$bf844bb0$3e8ce310$@schmitz-digital.de' \
--to=jojo@schmitz-digital.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).