{"thread":{"id":"31603","subject":"[PATCH] Port to HP NonStop","startedAt":"2012-09-19T10:03:30Z","lastAt":"2012-09-19T21:11:08Z","messageCount":5,"participants":["Joachim Schmitz","Jan Engelhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"199456","messageId":"000101cd964e$06a255d0$13e70170$@schmitz-digital.de","threadId":"31603","inReplyTo":null,"subject":"[PATCH] Port to HP NonStop","fromName":"Joachim Schmitz","fromEmail":"jojo@schmitz-digital.de","sentAt":"2012-09-19T10:03:30Z","receivedAt":"2012-09-19T10:03:30Z","isPatch":true,"sender":{"key":"jojo@schmitz-digital.de","avatar":"https://avatars.githubusercontent.com/u/1786669?v=4"},"body":"Includes the addition of some new defines and their description for others to use.\n\nSigned-off-by: Joachim Schmitz <jojo@schmitz-digital.de>\n---\nThis needs my 4 compat-poll patches posted earlier, which are in pu currently\n\n Makefile          | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++\n git-compat-util.h | 17 +++++++++++++-\n 2 files changed, 83 insertions(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex e022fc4..3823968 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -145,6 +145,12 @@ all::\n #\n # Define NEEDS_LIBICONV if linking with libc is not enough (Darwin).\n #\n+# Define NEEDS_LIBINTL_BEFORE_LIBICONV if you need libintl before libiconv.\n+#\n+# Define NO_INTPTR_T if you don't have intptr_t nor uintptr_t.\n+#\n+# Define NO_UINTMAX_T if you don't have uintmax_t.\n+#\n# Define NEEDS_SOCKET if linking with libc is not enough (SunOS,\n # Patrick Mauritz).\n #\n@@ -1327,6 +1333,61 @@ ifeq ($(uname_S),Minix)\n \tNO_CURL =\n \tNO_EXPAT =\n endif\n+ifeq ($(uname_S),NONSTOP_KERNEL)\n+\t# Needs some C99 features, \"inline\" is just one of them.\n+\t# INLINE='' would just replace one set of warnings with another and\n+\t# still not compile in c89 mode, due to non-const array initializations.\n+\tCC = cc -c99\n+\t# Disable all optimization, seems to result in bad code, with -O or -O2\n+\t# or even -O1 (default), /usr/local/libexec/git-core/git-pack-objects\n+\t# abends on \"git push\". Needs more investigation.\n+\tCFLAGS = -g -O0\n+\t# We'd want it to be here.\n+\tprefix = /usr/local\n+\t# Our's are in ${prefix}/bin (perl might also be in /usr/bin/perl).\n+\tPERL_PATH = ${prefix}/bin/perl\n+\tPYTHON_PATH = ${prefix}/bin/python\n+\n+\t# As detected by './configure'.\n+\t# Missdetected, hence commented out, see below.\n+\t#NO_CURL = YesPlease\n+\t# Added manually, see above.\n+\tNEEDS_SSL_WITH_CURL = YesPlease\n+\tHAVE_LIBCHARSET_H = YesPlease\n+\tNEEDS_LIBICONV = YesPlease\n+\tNEEDS_LIBINTL_BEFORE_LIBICONV = YesPlease\n+\tNO_SYS_SELECT_H = UnfortunatelyYes\n+\tNO_D_TYPE_IN_DIRENT = YesPlease\n+\tNO_HSTRERROR = YesPlease\n+\tNO_STRCASESTR = YesPlease\n+\tNO_FNMATCH_CASEFOLD = YesPlease\n+\tNO_MEMMEM = YesPlease\n+\tNO_STRLCPY = YesPlease\n+\tNO_SETENV = YesPlease\n+\tNO_UNSETENV = YesPlease\n+\tNO_MKDTEMP = YesPlease\n+\tNO_MKSTEMPS = YesPlease\n+\t# Currently libiconv-1.9.1.\n+\tOLD_ICONV = UnfortunatelyYes\n+\tNO_REGEX = YesPlease\n+\tNO_PTHREADS = UnfortunatelyYes\n+\n+\t# Not detected (nor checked for) by './configure'.\n+\t# We don't have SA_RESTART on NonStop, unfortunalety.\n+\tCOMPAT_CFLAGS += -DSA_RESTART=0\n+\t# Apparently needed in compat/fnmatch/fnmatch.c.\n+\tCOMPAT_CFLAGS += -DHAVE_STRING_H=1\n+\tNO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease\n+\tNO_NSEC = YesPlease\n+\tNO_PREAD = YesPlease\n+\tNO_MMAP = YesPlease\n+\tNO_POLL = YesPlease\n+\tNO_INTPTR_T = UnfortunatelyYes\n+\t# Bug report 10-120822-4477 submitted to HP NonStop development.\n+\tMKDIR_WO_TRAILING_SLASH = YesPlease\n+\t# RFE 10-120912-4693 submitted to HP NonStop development.\n+\tNO_SETITIMER = UnfortunatelyYes\n+endif\n ifneq (,$(findstring MINGW,$(uname_S)))\n \tpathsep = ;\n \tNO_PREAD = YesPlease\n@@ -1563,6 +1624,9 @@ ifdef NEEDS_LIBICONV\n \telse\n \t\tICONV_LINK =\n \tendif\n+\tifdef NEEDS_LIBINTL_BEFORE_LIBICONV\n+\t\tICONV_LINK += -lintl\n+\tendif\n \tEXTLIBS += $(ICONV_LINK) -liconv\n endif\n ifdef NEEDS_LIBGEN\n@@ -1723,6 +1787,9 @@ endif\n ifdef NO_IPV6\n \tBASIC_CFLAGS += -DNO_IPV6\n endif\n+ifdef NO_INTPTR_T\n+\tCOMPAT_CFLAGS += -DNO_INTPTR_T\n+endif\n ifdef NO_UINTMAX_T\n \tBASIC_CFLAGS += -Duintmax_t=uint32_t\n endif\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 24b5432..2fbf1fd 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -74,7 +74,8 @@\n # define _XOPEN_SOURCE 500\n # endif\n #elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && \\\n-      !defined(_M_UNIX) && !defined(__sgi) && !defined(__DragonFly__)\n+      !defined(_M_UNIX) && !defined(__sgi) && !defined(__DragonFly__) && \\\n+      !defined(__TANDEM)\n #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */\n #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */\n #endif\n@@ -98,6 +99,9 @@\n #include <stdlib.h>\n #include <stdarg.h>\n #include <string.h>\n+#ifdef __TANDEM /* or HAVE_STRINGS_H or !NO_STRINGS_H? */\n+#include <strings.h> /* for strcasecmp() */\n+#endif\n #include <errno.h>\n #include <limits.h>\n #include <sys/param.h>\n@@ -141,6 +145,17 @@\n #else\n #include <stdint.h>\n #endif\n+#ifdef NO_INTPTR_T\n+/*\n+ * On I16LP32, ILP32 and LP64 \"long\" is the save bet, however\n+ * on LLP86, IL33LLP64 and P64 it needs to be \"long long\",\n+ * while on IP16 and IP16L32 it is \"int\" (resp. \"short\")\n+ * Size needs to match (or exceed) 'sizeof(void *)'.\n+ * We can't take \"long long\" here as not everybody has it.\n+ */\n+typedef long intptr_t;\n+typedef unsigned long uintptr_t;\n+#endif\n #if defined(__CYGWIN__)\n #undef _XOPEN_SOURCE\n #include <grp.h>\n--\n1.7.12\n"},{"id":"199496","messageId":"alpine.LNX.2.01.1209191945160.19536@nerf07.vanv.qr","threadId":"31603","inReplyTo":"000101cd964e$06a255d0$13e70170$@schmitz-digital.de","subject":"Re: [PATCH] Port to HP NonStop","fromName":"Jan Engelhardt","fromEmail":"jengelh@inai.de","sentAt":"2012-09-19T17:48:21Z","receivedAt":"2012-09-19T17:48:21Z","isPatch":true,"sender":{"key":"jengelh@inai.de","avatar":"https://avatars.githubusercontent.com/u/8861948?v=4"},"body":"\nOn Wednesday 2012-09-19 12:03, Joachim Schmitz wrote:\n>+#ifdef NO_INTPTR_T\n>+/*\n>+ * On I16LP32, ILP32 and LP64 \"long\" is the save bet, however\n>+ * on LLP86, IL33LLP64 and P64 it needs to be \"long long\",\n>+ * while on IP16 and IP16L32 it is \"int\" (resp. \"short\")\n>+ * Size needs to match (or exceed) 'sizeof(void *)'.\n>+ * We can't take \"long long\" here as not everybody has it.\n\nAre you trying to port git to DOS or why would you mention IP16? :-)\n"},{"id":"199498","messageId":"001601cd968f$d8d91ed0$8a8b5c70$@schmitz-digital.de","threadId":"31603","inReplyTo":"alpine.LNX.2.01.1209191945160.19536@nerf07.vanv.qr","subject":"RE: [PATCH] Port to HP NonStop","fromName":"Joachim Schmitz","fromEmail":"jojo@schmitz-digital.de","sentAt":"2012-09-19T17:54:41Z","receivedAt":"2012-09-19T17:54:41Z","isPatch":true,"sender":{"key":"jojo@schmitz-digital.de","avatar":"https://avatars.githubusercontent.com/u/1786669?v=4"},"body":"> From: Jan Engelhardt [mailto:jengelh@inai.de]\n> Sent: Wednesday, September 19, 2012 7:48 PM\n> To: Joachim Schmitz\n> Cc: 'Junio C Hamano'; git@vger.kernel.org\n> Subject: Re: [PATCH] Port to HP NonStop\n> \n> \n> On Wednesday 2012-09-19 12:03, Joachim Schmitz wrote:\n> >+#ifdef NO_INTPTR_T\n> >+/*\n> >+ * On I16LP32, ILP32 and LP64 \"long\" is the save bet, however\n> >+ * on LLP86, IL33LLP64 and P64 it needs to be \"long long\",\n> >+ * while on IP16 and IP16L32 it is \"int\" (resp. \"short\")\n> >+ * Size needs to match (or exceed) 'sizeof(void *)'.\n> >+ * We can't take \"long long\" here as not everybody has it.\n> \n> Are you trying to port git to DOS or why would you mention IP16? :-)\n\nJust for completness, nothing else ;-)\n"},{"id":"199532","messageId":"alpine.LNX.2.01.1209192232590.19536@nerf07.vanv.qr","threadId":"31603","inReplyTo":"001601cd968f$d8d91ed0$8a8b5c70$@schmitz-digital.de","subject":"RE: [PATCH] Port to HP NonStop","fromName":"Jan Engelhardt","fromEmail":"jengelh@inai.de","sentAt":"2012-09-19T20:34:13Z","receivedAt":"2012-09-19T20:34:13Z","isPatch":true,"sender":{"key":"jengelh@inai.de","avatar":"https://avatars.githubusercontent.com/u/8861948?v=4"},"body":"On Wednesday 2012-09-19 19:54, Joachim Schmitz wrote:\n\n>> From: Jan Engelhardt [mailto:jengelh@inai.de]\n>> Sent: Wednesday, September 19, 2012 7:48 PM\n>> To: Joachim Schmitz\n>> Cc: 'Junio C Hamano'; git@vger.kernel.org\n>> Subject: Re: [PATCH] Port to HP NonStop\n>> \n>> \n>> On Wednesday 2012-09-19 12:03, Joachim Schmitz wrote:\n>> >+#ifdef NO_INTPTR_T\n>> >+/*\n>> >+ * On I16LP32, ILP32 and LP64 \"long\" is the save bet, however\n>> >+ * on LLP86, IL33LLP64 and P64 it needs to be \"long long\",\n>> >+ * while on IP16 and IP16L32 it is \"int\" (resp. \"short\")\n>> >+ * Size needs to match (or exceed) 'sizeof(void *)'.\n>> >+ * We can't take \"long long\" here as not everybody has it.\n>> \n>> Are you trying to port git to DOS or why would you mention IP16? :-)\n>\n>Just for completness, nothing else ;-)\n\nThe problem would be that some, if not most, C environments in DOS offer \na P16P32 model - thanks to (near void *) and (far void *).\n"},{"id":"199538","messageId":"001e01cd96ab$4a9d9df0$dfd8d9d0$@schmitz-digital.de","threadId":"31603","inReplyTo":"alpine.LNX.2.01.1209192232590.19536@nerf07.vanv.qr","subject":"RE: [PATCH] Port to HP NonStop","fromName":"Joachim Schmitz","fromEmail":"jojo@schmitz-digital.de","sentAt":"2012-09-19T21:11:08Z","receivedAt":"2012-09-19T21:11:08Z","isPatch":true,"sender":{"key":"jojo@schmitz-digital.de","avatar":"https://avatars.githubusercontent.com/u/1786669?v=4"},"body":"> From: Jan Engelhardt [mailto:jengelh@inai.de]\n> Sent: Wednesday, September 19, 2012 10:34 PM\n> To: Joachim Schmitz\n> Cc: 'Junio C Hamano'; git@vger.kernel.org\n> Subject: RE: [PATCH] Port to HP NonStop\n> \n> On Wednesday 2012-09-19 19:54, Joachim Schmitz wrote:\n> \n> >> From: Jan Engelhardt [mailto:jengelh@inai.de]\n> >> Sent: Wednesday, September 19, 2012 7:48 PM\n> >> To: Joachim Schmitz\n> >> Cc: 'Junio C Hamano'; git@vger.kernel.org\n> >> Subject: Re: [PATCH] Port to HP NonStop\n> >>\n> >>\n> >> On Wednesday 2012-09-19 12:03, Joachim Schmitz wrote:\n> >> >+#ifdef NO_INTPTR_T\n> >> >+/*\n> >> >+ * On I16LP32, ILP32 and LP64 \"long\" is the save bet, however\n> >> >+ * on LLP86, IL33LLP64 and P64 it needs to be \"long long\",\n> >> >+ * while on IP16 and IP16L32 it is \"int\" (resp. \"short\")\n> >> >+ * Size needs to match (or exceed) 'sizeof(void *)'.\n> >> >+ * We can't take \"long long\" here as not everybody has it.\n> >>\n> >> Are you trying to port git to DOS or why would you mention IP16? :-)\n> >\n> >Just for completness, nothing else ;-)\n> \n> The problem would be that some, if not most, C environments in DOS offer\n> a P16P32 model - thanks to (near void *) and (far void *).\n\nNo problem. \"long\" would be big enough for these (wasting some space though)\nOnly LLP86, IL33LLP64 and P64 would need it bigger, \"long long\".\n"}]}