{"thread":{"id":"33005","subject":"[PATCH 1/1] Add pthread support in QNX. Do not declare NO_ macros if they can be autodetected.","startedAt":"2013-02-25T08:39:27Z","lastAt":"2013-02-26T18:38:19Z","messageCount":5,"participants":["Mike Gorchak","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"210240","messageId":"CAHXAxrPTe6Q4BPtsGjiRnfFjZjUjwY6qXSAtZCzzAthODzA6EA@mail.gmail.com","threadId":"33005","inReplyTo":null,"subject":"[PATCH 1/1] Add pthread support in QNX. Do not declare NO_ macros if they can be autodetected.","fromName":"Mike Gorchak","fromEmail":"mike.gorchak.qnx@gmail.com","sentAt":"2013-02-25T08:39:27Z","receivedAt":"2013-02-25T08:39:27Z","isPatch":true,"sender":{"key":"mike.gorchak.qnx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1337711?v=4"},"body":"Add pthread support in QNX. Do not declare NO_ macros if they can be\nautodetected.\n\nFrom: Mike Gorchak <mike.gorchak.qnx@gmail.com>\nSigned-off-by: Mike Gorchak <mike.gorchak.qnx@gmail.com>\n---\n config.mak.uname | 22 +++++++++++++++-------\n 1 file changed, 15 insertions(+), 7 deletions(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 8743a6d..d33aac6 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -527,14 +527,22 @@ ifeq ($(uname_S),QNX)\n \tHAVE_STRINGS_H = YesPlease\n \tNEEDS_SOCKET = YesPlease\n \tNO_FNMATCH_CASEFOLD = YesPlease\n-\tNO_GETPAGESIZE = YesPlease\n-\tNO_ICONV = YesPlease\n \tNO_MEMMEM = YesPlease\n-\tNO_MKDTEMP = YesPlease\n-\tNO_MKSTEMPS = YesPlease\n \tNO_NSEC = YesPlease\n-\tNO_PTHREADS = YesPlease\n \tNO_R_TO_GCC_LINKER = YesPlease\n-\tNO_STRCASESTR = YesPlease\n-\tNO_STRLCPY = YesPlease\n+\t# All QNX 6.x versions have pthread functions in libc\n+\t# and getpagesize. Leave mkstemps/mkdtemp/strcasestr/\n+\t# strlcpy for autodetection.\n+\tifeq ($(shell expr \"$(uname_R)\" : '6\\.[0-9]\\.[0-9]'),5)\n+\t\tPTHREAD_LIBS = \"\"\n+\telse\n+\t\tNO_PTHREADS = YesPlease\n+\t\tNO_GETPAGESIZE = YesPlease\n+\t\tNO_STRCASESTR = YesPlease\n+\t\tNO_MKSTEMPS = YesPlease\n+\t\tNO_MKDTEMP = YesPlease\n+\t\tNO_STRLCPY = YesPlease\n+\t\tNO_ICONV = YesPlease\n+\t\tNO_GETTEXT = YesPlease\n+\tendif\n endif\n-- \n1.8.2-rc0\n"},{"id":"210255","messageId":"7vhal0z4a5.fsf@alter.siamese.dyndns.org","threadId":"33005","inReplyTo":"CAHXAxrPTe6Q4BPtsGjiRnfFjZjUjwY6qXSAtZCzzAthODzA6EA@mail.gmail.com","subject":"Re: [PATCH 1/1] Add pthread support in QNX. Do not declare NO_ macros if they can be autodetected.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-02-25T17:34:10Z","receivedAt":"2013-02-25T17:34:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mike Gorchak <mike.gorchak.qnx@gmail.com> writes:\n\n> Add pthread support in QNX. Do not declare NO_ macros if they can be\n> autodetected.\n>\n> From: Mike Gorchak <mike.gorchak.qnx@gmail.com>\n> Signed-off-by: Mike Gorchak <mike.gorchak.qnx@gmail.com>\n\nOne procedural nit.  Please drop that \"From:\" immediately before\nS-o-b: from future submissions (I'll remove it locally for this\npatch and others you already posted when I apply, so this alone is\nnot a reason to resend them).  If you are forwarding somebody else's\npatch, you would want \"From:\" in body, but the correct place to do\nso is before everything else, i.e.\n\n\t... your e-mail headers ...\n        From: Mike Gorchak <your.email@address.xz>\n        Subject: [PATCH] title of the patch\n\n        ... your e-mail body ...\n\tFrom: A U Thor <real.author@address.xz>\n\n\tThe first line of the commit log message and\n        the second line of it.\n\n\tSigned-off-by: A U Thor <real.author@address.xz>\n        Signed-off-by: Mike Gorchak <your.email@address.xz>\n\nAlso, please leave the \"autodetection\" out.  If it is common to have\nstrcasestr (or any other) on a newer QNX, then not defining the\nsymbol NO_STRCASESTR in this file may still be the right thing to\ndo, but the justification for such a change should not be because we\nrely on \"autodetection\".  The defaults given in config.mak.uname is\nprimarily for people who do not use the optional ./configure script,\nso pick the default to help the most common configuration for the\nplatform.\n\nI'd rewrite the patch like the attached, and tentatively queue the\npatch to 'pu', but I do not use or have access to QNX myself, so you\nmay have to adjust the default set of symbols and the log message\nand in such a case, please do re-submit a fixed version.\n\nSpecifically, I do not know if \"... and others are also supported\"\nis universally true with QNX 6; if not, we need to define NO_* for\nthem to help people who build without using the ./configure script.\n\nThanks.\n\n-- >8 --\nFrom: Mike Gorchak <mike.gorchak.qnx@gmail.com>\nDate: Mon, 25 Feb 2013 10:39:27 +0200\nSubject: [PATCH] QNX: newer QNX 6.x.x is not so crippled\n\nThe initial port to QNX declared that the platform does not have\nsupport for pthreads, getpagesize, strcasestr, mkstemps, mkdtemp,\nstrlcpy, and iconv, but QNX 6.x.x does support these.\n\nOn the other hand, older QNX lack gettext support, so define\nNO_GETTEXT for them.\n\nAlso newer QNX do not need to link to any special library to enable\npthreads; define PTHREAD_LIBS to an empty string.\n\nSigned-off-by: Mike Gorchak <mike.gorchak.qnx@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n config.mak.uname | 21 ++++++++++++++-------\n 1 file changed, 14 insertions(+), 7 deletions(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 8743a6d..ce2832b 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -527,14 +527,21 @@ ifeq ($(uname_S),QNX)\n \tHAVE_STRINGS_H = YesPlease\n \tNEEDS_SOCKET = YesPlease\n \tNO_FNMATCH_CASEFOLD = YesPlease\n-\tNO_GETPAGESIZE = YesPlease\n-\tNO_ICONV = YesPlease\n \tNO_MEMMEM = YesPlease\n-\tNO_MKDTEMP = YesPlease\n-\tNO_MKSTEMPS = YesPlease\n \tNO_NSEC = YesPlease\n-\tNO_PTHREADS = YesPlease\n \tNO_R_TO_GCC_LINKER = YesPlease\n-\tNO_STRCASESTR = YesPlease\n-\tNO_STRLCPY = YesPlease\n+\t# All QNX 6.x versions have pthread functions in libc;\n+\t# getpagesize and others are also supported.\n+\tifeq ($(shell expr \"$(uname_R)\" : '6\\.[0-9]\\.[0-9]'),5)\n+\t\tPTHREAD_LIBS = \"\"\n+\telse\n+\t\tNO_PTHREADS = YesPlease\n+\t\tNO_GETPAGESIZE = YesPlease\n+\t\tNO_STRCASESTR = YesPlease\n+\t\tNO_MKSTEMPS = YesPlease\n+\t\tNO_MKDTEMP = YesPlease\n+\t\tNO_STRLCPY = YesPlease\n+\t\tNO_ICONV = YesPlease\n+\t\tNO_GETTEXT = YesPlease\n+\tendif\n endif\n-- \n1.8.2.rc0.167.gd8ba4de\n"},{"id":"210259","messageId":"CAHXAxrO8c8=d+og7rJexY4MKyKMYrWAzFYLMLRKVqtoaB6DUdQ@mail.gmail.com","threadId":"33005","inReplyTo":"7vhal0z4a5.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 1/1] Add pthread support in QNX. Do not declare NO_ macros if they can be autodetected.","fromName":"Mike Gorchak","fromEmail":"mike.gorchak.qnx@gmail.com","sentAt":"2013-02-25T18:19:00Z","receivedAt":"2013-02-25T18:19:00Z","isPatch":true,"sender":{"key":"mike.gorchak.qnx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1337711?v=4"},"body":"> Also, please leave the \"autodetection\" out.  If it is common to have\n> strcasestr (or any other) on a newer QNX, then not defining the\n> symbol NO_STRCASESTR in this file may still be the right thing to\n> do, but the justification for such a change should not be because we\n> rely on \"autodetection\".  The defaults given in config.mak.uname is\n> primarily for people who do not use the optional ./configure script,\n> so pick the default to help the most common configuration for the\n> platform.\n\nI see. I thought configure is the only legal way to build the git and\nconfig.mak.uname is used to override settings produced by configure.\nBut it works vice versa configure settings override config.mak.uname\nsettings. Please do not commit this patch. This patch brokes QNX 6.3.2\nbuild.\n\n> I'd rewrite the patch like the attached, and tentatively queue the\n> patch to 'pu', but I do not use or have access to QNX myself, so you\n> may have to adjust the default set of symbols and the log message\n> and in such a case, please do re-submit a fixed version.\n\nI will re-do the patch.\n\n> Specifically, I do not know if \"... and others are also supported\"\n> is universally true with QNX 6; if not, we need to define NO_* for\n> them to help people who build without using the ./configure script.\n\nOk.\n"},{"id":"210341","messageId":"7vbob7lzsk.fsf@alter.siamese.dyndns.org","threadId":"33005","inReplyTo":"CAHXAxrO8c8=d+og7rJexY4MKyKMYrWAzFYLMLRKVqtoaB6DUdQ@mail.gmail.com","subject":"Re: [PATCH 1/1] Add pthread support in QNX. Do not declare NO_ macros if they can be autodetected.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-02-26T18:01:47Z","receivedAt":"2013-02-26T18:01:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mike Gorchak <mike.gorchak.qnx@gmail.com> writes:\n\n>> Also, please leave the \"autodetection\" out.  If it is common to have\n>> strcasestr (or any other) on a newer QNX, then not defining the\n>> symbol NO_STRCASESTR in this file may still be the right thing to\n>> do, but the justification for such a change should not be because we\n>> rely on \"autodetection\".  The defaults given in config.mak.uname is\n>> primarily for people who do not use the optional ./configure script,\n>> so pick the default to help the most common configuration for the\n>> platform.\n>\n> I see. I thought configure is the only legal way to build the git and\n> config.mak.uname is used to override settings produced by configure.\n> But it works vice versa configure settings override config.mak.uname\n> settings. Please do not commit this patch. This patch brokes QNX 6.3.2\n> build.\n>\n>> I'd rewrite the patch like the attached, and tentatively queue the\n>> patch to 'pu', but I do not use or have access to QNX myself, so you\n>> may have to adjust the default set of symbols and the log message\n>> and in such a case, please do re-submit a fixed version.\n>\n> I will re-do the patch.\n>\n>> Specifically, I do not know if \"... and others are also supported\"\n>> is universally true with QNX 6; if not, we need to define NO_* for\n>> them to help people who build without using the ./configure script.\n>\n> Ok.\n\nI saw Matt has comment on this patch, so I'll keep the patch out of\n'next' for now and let you two figure it out.\n\nThanks.\n"},{"id":"210345","messageId":"CAHXAxrMBnMzB5zm7AyS9dXD6e5vO6UFgcAg_Q=+8ktxQaXk4Dw@mail.gmail.com","threadId":"33005","inReplyTo":"7vbob7lzsk.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 1/1] Add pthread support in QNX. Do not declare NO_ macros if they can be autodetected.","fromName":"Mike Gorchak","fromEmail":"mike.gorchak.qnx@gmail.com","sentAt":"2013-02-26T18:38:19Z","receivedAt":"2013-02-26T18:38:19Z","isPatch":true,"sender":{"key":"mike.gorchak.qnx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1337711?v=4"},"body":"> I saw Matt has comment on this patch, so I'll keep the patch out of\n> 'next' for now and let you two figure it out.\n\nAnyway in current form this patch is broken. Junio, may I ask you\nabout the rest patches in a separate posts, have you applied any of\nthem?\n\nThanks.\n"}]}