* [PATCH] Port to HP NonStop
@ 2012-09-19 10:03 Joachim Schmitz
2012-09-19 17:48 ` Jan Engelhardt
0 siblings, 1 reply; 5+ messages in thread
From: Joachim Schmitz @ 2012-09-19 10:03 UTC (permalink / raw
To: 'Junio C Hamano'; +Cc: git, 'Jan Engelhardt'
Includes the addition of some new defines and their description for others to use.
Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
---
This needs my 4 compat-poll patches posted earlier, which are in pu currently
Makefile | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
git-compat-util.h | 17 +++++++++++++-
2 files changed, 83 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index e022fc4..3823968 100644
--- a/Makefile
+++ b/Makefile
@@ -145,6 +145,12 @@ all::
#
# Define NEEDS_LIBICONV if linking with libc is not enough (Darwin).
#
+# Define NEEDS_LIBINTL_BEFORE_LIBICONV if you need libintl before libiconv.
+#
+# Define NO_INTPTR_T if you don't have intptr_t nor uintptr_t.
+#
+# Define NO_UINTMAX_T if you don't have uintmax_t.
+#
# Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
# Patrick Mauritz).
#
@@ -1327,6 +1333,61 @@ ifeq ($(uname_S),Minix)
NO_CURL =
NO_EXPAT =
endif
+ifeq ($(uname_S),NONSTOP_KERNEL)
+ # Needs some C99 features, "inline" is just one of them.
+ # INLINE='' would just replace one set of warnings with another and
+ # still not compile in c89 mode, due to non-const array initializations.
+ CC = cc -c99
+ # Disable all optimization, seems to result in bad code, with -O or -O2
+ # or even -O1 (default), /usr/local/libexec/git-core/git-pack-objects
+ # abends on "git push". Needs more investigation.
+ CFLAGS = -g -O0
+ # We'd want it to be here.
+ prefix = /usr/local
+ # Our's are in ${prefix}/bin (perl might also be in /usr/bin/perl).
+ PERL_PATH = ${prefix}/bin/perl
+ PYTHON_PATH = ${prefix}/bin/python
+
+ # As detected by './configure'.
+ # Missdetected, hence commented out, see below.
+ #NO_CURL = YesPlease
+ # Added manually, see above.
+ NEEDS_SSL_WITH_CURL = YesPlease
+ HAVE_LIBCHARSET_H = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ NEEDS_LIBINTL_BEFORE_LIBICONV = YesPlease
+ NO_SYS_SELECT_H = UnfortunatelyYes
+ NO_D_TYPE_IN_DIRENT = YesPlease
+ NO_HSTRERROR = YesPlease
+ NO_STRCASESTR = YesPlease
+ NO_FNMATCH_CASEFOLD = YesPlease
+ NO_MEMMEM = YesPlease
+ NO_STRLCPY = YesPlease
+ NO_SETENV = YesPlease
+ NO_UNSETENV = YesPlease
+ NO_MKDTEMP = YesPlease
+ NO_MKSTEMPS = YesPlease
+ # Currently libiconv-1.9.1.
+ OLD_ICONV = UnfortunatelyYes
+ NO_REGEX = YesPlease
+ NO_PTHREADS = UnfortunatelyYes
+
+ # Not detected (nor checked for) by './configure'.
+ # We don't have SA_RESTART on NonStop, unfortunalety.
+ COMPAT_CFLAGS += -DSA_RESTART=0
+ # Apparently needed in compat/fnmatch/fnmatch.c.
+ COMPAT_CFLAGS += -DHAVE_STRING_H=1
+ NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
+ NO_NSEC = YesPlease
+ NO_PREAD = YesPlease
+ NO_MMAP = YesPlease
+ NO_POLL = YesPlease
+ NO_INTPTR_T = UnfortunatelyYes
+ # Bug report 10-120822-4477 submitted to HP NonStop development.
+ MKDIR_WO_TRAILING_SLASH = YesPlease
+ # RFE 10-120912-4693 submitted to HP NonStop development.
+ NO_SETITIMER = UnfortunatelyYes
+endif
ifneq (,$(findstring MINGW,$(uname_S)))
pathsep = ;
NO_PREAD = YesPlease
@@ -1563,6 +1624,9 @@ ifdef NEEDS_LIBICONV
else
ICONV_LINK =
endif
+ ifdef NEEDS_LIBINTL_BEFORE_LIBICONV
+ ICONV_LINK += -lintl
+ endif
EXTLIBS += $(ICONV_LINK) -liconv
endif
ifdef NEEDS_LIBGEN
@@ -1723,6 +1787,9 @@ endif
ifdef NO_IPV6
BASIC_CFLAGS += -DNO_IPV6
endif
+ifdef NO_INTPTR_T
+ COMPAT_CFLAGS += -DNO_INTPTR_T
+endif
ifdef NO_UINTMAX_T
BASIC_CFLAGS += -Duintmax_t=uint32_t
endif
diff --git a/git-compat-util.h b/git-compat-util.h
index 24b5432..2fbf1fd 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 for S_ISLNK() */
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
@@ -98,6 +99,9 @@
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
+#ifdef __TANDEM /* or HAVE_STRINGS_H or !NO_STRINGS_H? */
+#include <strings.h> /* for strcasecmp() */
+#endif
#include <errno.h>
#include <limits.h>
#include <sys/param.h>
@@ -141,6 +145,17 @@
#else
#include <stdint.h>
#endif
+#ifdef NO_INTPTR_T
+/*
+ * On I16LP32, ILP32 and LP64 "long" is the save bet, however
+ * on LLP86, IL33LLP64 and P64 it needs to be "long long",
+ * while on IP16 and IP16L32 it is "int" (resp. "short")
+ * Size needs to match (or exceed) 'sizeof(void *)'.
+ * We can't take "long long" here as not everybody has it.
+ */
+typedef long intptr_t;
+typedef unsigned long uintptr_t;
+#endif
#if defined(__CYGWIN__)
#undef _XOPEN_SOURCE
#include <grp.h>
--
1.7.12
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Port to HP NonStop
2012-09-19 10:03 [PATCH] Port to HP NonStop Joachim Schmitz
@ 2012-09-19 17:48 ` Jan Engelhardt
2012-09-19 17:54 ` Joachim Schmitz
0 siblings, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2012-09-19 17:48 UTC (permalink / raw
To: Joachim Schmitz; +Cc: 'Junio C Hamano', git
On Wednesday 2012-09-19 12:03, Joachim Schmitz wrote:
>+#ifdef NO_INTPTR_T
>+/*
>+ * On I16LP32, ILP32 and LP64 "long" is the save bet, however
>+ * on LLP86, IL33LLP64 and P64 it needs to be "long long",
>+ * while on IP16 and IP16L32 it is "int" (resp. "short")
>+ * Size needs to match (or exceed) 'sizeof(void *)'.
>+ * We can't take "long long" here as not everybody has it.
Are you trying to port git to DOS or why would you mention IP16? :-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] Port to HP NonStop
2012-09-19 17:48 ` Jan Engelhardt
@ 2012-09-19 17:54 ` Joachim Schmitz
2012-09-19 20:34 ` Jan Engelhardt
0 siblings, 1 reply; 5+ messages in thread
From: Joachim Schmitz @ 2012-09-19 17:54 UTC (permalink / raw
To: 'Jan Engelhardt'; +Cc: 'Junio C Hamano', git
> From: Jan Engelhardt [mailto:jengelh@inai.de]
> Sent: Wednesday, September 19, 2012 7:48 PM
> To: Joachim Schmitz
> Cc: 'Junio C Hamano'; git@vger.kernel.org
> Subject: Re: [PATCH] Port to HP NonStop
>
>
> On Wednesday 2012-09-19 12:03, Joachim Schmitz wrote:
> >+#ifdef NO_INTPTR_T
> >+/*
> >+ * On I16LP32, ILP32 and LP64 "long" is the save bet, however
> >+ * on LLP86, IL33LLP64 and P64 it needs to be "long long",
> >+ * while on IP16 and IP16L32 it is "int" (resp. "short")
> >+ * Size needs to match (or exceed) 'sizeof(void *)'.
> >+ * We can't take "long long" here as not everybody has it.
>
> Are you trying to port git to DOS or why would you mention IP16? :-)
Just for completness, nothing else ;-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] Port to HP NonStop
2012-09-19 17:54 ` Joachim Schmitz
@ 2012-09-19 20:34 ` Jan Engelhardt
2012-09-19 21:11 ` Joachim Schmitz
0 siblings, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2012-09-19 20:34 UTC (permalink / raw
To: Joachim Schmitz; +Cc: 'Junio C Hamano', git
On Wednesday 2012-09-19 19:54, Joachim Schmitz wrote:
>> From: Jan Engelhardt [mailto:jengelh@inai.de]
>> Sent: Wednesday, September 19, 2012 7:48 PM
>> To: Joachim Schmitz
>> Cc: 'Junio C Hamano'; git@vger.kernel.org
>> Subject: Re: [PATCH] Port to HP NonStop
>>
>>
>> On Wednesday 2012-09-19 12:03, Joachim Schmitz wrote:
>> >+#ifdef NO_INTPTR_T
>> >+/*
>> >+ * On I16LP32, ILP32 and LP64 "long" is the save bet, however
>> >+ * on LLP86, IL33LLP64 and P64 it needs to be "long long",
>> >+ * while on IP16 and IP16L32 it is "int" (resp. "short")
>> >+ * Size needs to match (or exceed) 'sizeof(void *)'.
>> >+ * We can't take "long long" here as not everybody has it.
>>
>> Are you trying to port git to DOS or why would you mention IP16? :-)
>
>Just for completness, nothing else ;-)
The problem would be that some, if not most, C environments in DOS offer
a P16P32 model - thanks to (near void *) and (far void *).
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] Port to HP NonStop
2012-09-19 20:34 ` Jan Engelhardt
@ 2012-09-19 21:11 ` Joachim Schmitz
0 siblings, 0 replies; 5+ messages in thread
From: Joachim Schmitz @ 2012-09-19 21:11 UTC (permalink / raw
To: 'Jan Engelhardt'; +Cc: 'Junio C Hamano', git
> From: Jan Engelhardt [mailto:jengelh@inai.de]
> Sent: Wednesday, September 19, 2012 10:34 PM
> To: Joachim Schmitz
> Cc: 'Junio C Hamano'; git@vger.kernel.org
> Subject: RE: [PATCH] Port to HP NonStop
>
> On Wednesday 2012-09-19 19:54, Joachim Schmitz wrote:
>
> >> From: Jan Engelhardt [mailto:jengelh@inai.de]
> >> Sent: Wednesday, September 19, 2012 7:48 PM
> >> To: Joachim Schmitz
> >> Cc: 'Junio C Hamano'; git@vger.kernel.org
> >> Subject: Re: [PATCH] Port to HP NonStop
> >>
> >>
> >> On Wednesday 2012-09-19 12:03, Joachim Schmitz wrote:
> >> >+#ifdef NO_INTPTR_T
> >> >+/*
> >> >+ * On I16LP32, ILP32 and LP64 "long" is the save bet, however
> >> >+ * on LLP86, IL33LLP64 and P64 it needs to be "long long",
> >> >+ * while on IP16 and IP16L32 it is "int" (resp. "short")
> >> >+ * Size needs to match (or exceed) 'sizeof(void *)'.
> >> >+ * We can't take "long long" here as not everybody has it.
> >>
> >> Are you trying to port git to DOS or why would you mention IP16? :-)
> >
> >Just for completness, nothing else ;-)
>
> The problem would be that some, if not most, C environments in DOS offer
> a P16P32 model - thanks to (near void *) and (far void *).
No problem. "long" would be big enough for these (wasting some space though)
Only LLP86, IL33LLP64 and P64 would need it bigger, "long long".
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-19 21:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-19 10:03 [PATCH] Port to HP NonStop Joachim Schmitz
2012-09-19 17:48 ` Jan Engelhardt
2012-09-19 17:54 ` Joachim Schmitz
2012-09-19 20:34 ` Jan Engelhardt
2012-09-19 21:11 ` Joachim Schmitz
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).