{"thread":{"id":"32338","subject":"[PATCH 1/2] Make lock local to fetch_pack","startedAt":"2012-12-14T18:38:18Z","lastAt":"2012-12-16T08:27:05Z","messageCount":8,"participants":["Matt Kraai","Junio C Hamano","Joachim Schmitz"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"204873","messageId":"1355510300-31541-1-git-send-email-kraai@ftbfs.org","threadId":"32338","inReplyTo":null,"subject":"[PATCH 0/2] Port to QNX","fromName":"Matt Kraai","fromEmail":"kraai@ftbfs.org","sentAt":"2012-12-14T18:38:18Z","receivedAt":"2012-12-14T18:38:18Z","isPatch":true,"sender":{"key":"kraai@ftbfs.org","avatar":null},"body":"This series ports Git to QNX.  It builds on both QNX 6.3.2 and QNX\n6.5.0.  The test suite does not pass.  Unless the corresponding\nsoftware is installed, the following arguments must be passed to Make:\n\n NO_CURL=1 NO_GETTEXT=1 NO_OPENSSL=1 NO_PERL=1 NO_PYTHON=1 NO_TCLTK=1\n\n  [1/2]: Make lock local to fetch_pack\n\nQNX 6.3.2's unistd.h declares a function named lock, which causes\nfetch-pack.c to fail to compile if lock has file-scope.  Since it's\nonly used in a single function, move it therein.\n\n  [2/2]: Port to QNX\n"},{"id":"204872","messageId":"1355510300-31541-2-git-send-email-kraai@ftbfs.org","threadId":"32338","inReplyTo":"1355510300-31541-1-git-send-email-kraai@ftbfs.org","subject":"[PATCH 1/2] Make lock local to fetch_pack","fromName":"Matt Kraai","fromEmail":"kraai@ftbfs.org","sentAt":"2012-12-14T18:38:19Z","receivedAt":"2012-12-14T18:38:19Z","isPatch":true,"sender":{"key":"kraai@ftbfs.org","avatar":null},"body":"From: Matt Kraai <matt.kraai@amo.abbott.com>\n\nlock is only used by fetch_pack, so move it into that function.\n\nSigned-off-by: Matt Kraai <matt.kraai@amo.abbott.com>\n---\n fetch-pack.c | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/fetch-pack.c b/fetch-pack.c\nindex 099ff4d..9d9762d 100644\n--- a/fetch-pack.c\n+++ b/fetch-pack.c\n@@ -874,8 +874,6 @@ static int fetch_pack_config(const char *var, const char *value, void *cb)\n \treturn git_default_config(var, value, cb);\n }\n \n-static struct lock_file lock;\n-\n static void fetch_pack_setup(void)\n {\n \tstatic int did_setup;\n@@ -896,6 +894,7 @@ struct ref *fetch_pack(struct fetch_pack_args *args,\n \t\t       struct string_list *sought,\n \t\t       char **pack_lockfile)\n {\n+\tstatic struct lock_file lock;\n \tstruct stat st;\n \tstruct ref *ref_cpy;\n \n-- \n1.8.1-rc1\n"},{"id":"204874","messageId":"1355510300-31541-3-git-send-email-kraai@ftbfs.org","threadId":"32338","inReplyTo":"1355510300-31541-1-git-send-email-kraai@ftbfs.org","subject":"[PATCH 2/2] Port to QNX","fromName":"Matt Kraai","fromEmail":"kraai@ftbfs.org","sentAt":"2012-12-14T18:38:20Z","receivedAt":"2012-12-14T18:38:20Z","isPatch":true,"sender":{"key":"kraai@ftbfs.org","avatar":null},"body":"From: Matt Kraai <matt.kraai@amo.abbott.com>\n\nSigned-off-by: Matt Kraai <matt.kraai@amo.abbott.com>\n---\n Makefile          | 19 +++++++++++++++++++\n git-compat-util.h |  8 ++++++--\n 2 files changed, 25 insertions(+), 2 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 736ecd4..ed2539d 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -78,6 +78,8 @@ all::\n #\n # Define NO_MEMMEM if you don't have memmem.\n #\n+# Define NO_GETPAGESIZE if you don't have getpagesize.\n+#\n # Define NO_STRLCPY if you don't have strlcpy.\n #\n # Define NO_STRTOUMAX if you don't have both strtoimax and strtoumax in the\n@@ -1448,6 +1450,20 @@ else\n \tNO_CURL = YesPlease\n endif\n endif\n+ifeq ($(uname_S),QNX)\n+\tCOMPAT_CFLAGS += -DSA_RESTART=0\n+\tNEEDS_SOCKET = YesPlease\n+\tNO_MKDTEMP = YesPlease\n+\tNO_MKSTEMPS = YesPlease\n+\tNO_FNMATCH_CASEFOLD = YesPlease\n+\tNO_GETPAGESIZE = YesPlease\n+\tNO_ICONV = YesPlease\n+\tNO_MEMMEM = YesPlease\n+\tNO_NSEC = YesPlease\n+\tNO_STRCASESTR = YesPlease\n+\tNO_STRLCPY = YesPlease\n+\tPTHREAD_LIBS =\n+endif\n \n -include config.mak.autogen\n -include config.mak\n@@ -1859,6 +1875,9 @@ ifdef NO_MEMMEM\n \tCOMPAT_CFLAGS += -DNO_MEMMEM\n \tCOMPAT_OBJS += compat/memmem.o\n endif\n+ifdef NO_GETPAGESIZE\n+\tCOMPAT_CFLAGS += -DNO_GETPAGESIZE\n+endif\n ifdef INTERNAL_QSORT\n \tCOMPAT_CFLAGS += -DINTERNAL_QSORT\n \tCOMPAT_OBJS += compat/qsort.o\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 2e79b8a..6c588ca 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -75,7 +75,7 @@\n # endif\n #elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && \\\n       !defined(_M_UNIX) && !defined(__sgi) && !defined(__DragonFly__) && \\\n-      !defined(__TANDEM)\n+      !defined(__TANDEM) && !defined(__QNX__)\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@@ -99,7 +99,7 @@\n #include <stdlib.h>\n #include <stdarg.h>\n #include <string.h>\n-#ifdef __TANDEM /* or HAVE_STRINGS_H or !NO_STRINGS_H? */\n+#if defined(__TANDEM) || defined(__QNX__) /* or HAVE_STRINGS_H or !NO_STRINGS_H? */\n #include <strings.h> /* for strcasecmp() */\n #endif\n #include <errno.h>\n@@ -411,6 +411,10 @@ void *gitmemmem(const void *haystack, size_t haystacklen,\n                 const void *needle, size_t needlelen);\n #endif\n \n+#ifdef NO_GETPAGESIZE\n+#define getpagesize() sysconf(_SC_PAGESIZE)\n+#endif\n+\n #ifdef FREAD_READS_DIRECTORIES\n #ifdef fopen\n #undef fopen\n-- \n1.8.1-rc1\n"},{"id":"204932","messageId":"7vy5gzrwih.fsf@alter.siamese.dyndns.org","threadId":"32338","inReplyTo":"1355510300-31541-1-git-send-email-kraai@ftbfs.org","subject":"Re: [PATCH 0/2] Port to QNX","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-12-15T18:38:30Z","receivedAt":"2012-12-15T18:38:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matt Kraai <kraai@ftbfs.org> writes:\n\n> This series ports Git to QNX.  It builds on both QNX 6.3.2 and QNX\n> 6.5.0.  The test suite does not pass.  Unless the corresponding\n> software is installed, the following arguments must be passed to Make:\n>\n>  NO_CURL=1 NO_GETTEXT=1 NO_OPENSSL=1 NO_PERL=1 NO_PYTHON=1 NO_TCLTK=1\n>\n>   [1/2]: Make lock local to fetch_pack\n>\n> QNX 6.3.2's unistd.h declares a function named lock, which causes\n> fetch-pack.c to fail to compile if lock has file-scope.  Since it's\n> only used in a single function, move it therein.\n>\n>   [2/2]: Port to QNX\n\nI do not mind queuing this on 'pu' but do you want to see your\nftbfs.org address in the commit objects, or the other one that you\nare not using to interact with us?\n"},{"id":"204933","messageId":"7vtxrnrwer.fsf@alter.siamese.dyndns.org","threadId":"32338","inReplyTo":"1355510300-31541-2-git-send-email-kraai@ftbfs.org","subject":"Re: [PATCH 1/2] Make lock local to fetch_pack","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-12-15T18:40:44Z","receivedAt":"2012-12-15T18:40:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matt Kraai <kraai@ftbfs.org> writes:\n\n> From: Matt Kraai <matt.kraai@amo.abbott.com>\n>\n> lock is only used by fetch_pack, so move it into that function.\n>\n> Signed-off-by: Matt Kraai <matt.kraai@amo.abbott.com>\n> ---\n>  fetch-pack.c | 3 +--\n>  1 file changed, 1 insertion(+), 2 deletions(-)\n\nEh, did you base your patch on something older than 2d4177c (Make\nfetch-pack a builtin with an internal API, 2007-09-10)???\n"},{"id":"204941","messageId":"7vpq2bru28.fsf@alter.siamese.dyndns.org","threadId":"32338","inReplyTo":"7vtxrnrwer.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 1/2] Make lock local to fetch_pack","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-12-15T19:31:27Z","receivedAt":"2012-12-15T19:31:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Matt Kraai <kraai@ftbfs.org> writes:\n>\n>> From: Matt Kraai <matt.kraai@amo.abbott.com>\n>>\n>> lock is only used by fetch_pack, so move it into that function.\n>>\n>> Signed-off-by: Matt Kraai <matt.kraai@amo.abbott.com>\n>> ---\n>>  fetch-pack.c | 3 +--\n>>  1 file changed, 1 insertion(+), 2 deletions(-)\n>\n> Eh, did you base your patch on something older than 2d4177c (Make\n> fetch-pack a builtin with an internal API, 2007-09-10)???\n\nAh, nevermind.  I see we refactored this out recently but that is\nstill in flight.\n"},{"id":"204949","messageId":"20121215215500.GA4257@ftbfs.org","threadId":"32338","inReplyTo":"7vy5gzrwih.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 0/2] Port to QNX","fromName":"Matt Kraai","fromEmail":"kraai@ftbfs.org","sentAt":"2012-12-15T21:55:00Z","receivedAt":"2012-12-15T21:55:00Z","isPatch":true,"sender":{"key":"kraai@ftbfs.org","avatar":null},"body":"On Sat, Dec 15, 2012 at 10:38:30AM -0800, Junio C Hamano wrote:\n> I do not mind queuing this on 'pu' but do you want to see your\n> ftbfs.org address in the commit objects, or the other one that you\n> are not using to interact with us?\n\nGreat!  I'd prefer to use the amo.abbott.com address in the commit\nobjects, since that's where I did the work.  I'm using this email\naddress because it doesn't require figuring out how to send proper\nemails via Outlook and/or Exchange.\n\n-- \nMatt\n"},{"id":"204960","messageId":"kak0kr$cf6$1@ger.gmane.org","threadId":"32338","inReplyTo":"1355510300-31541-3-git-send-email-kraai@ftbfs.org","subject":"Re: [PATCH 2/2] Port to QNX","fromName":"Joachim Schmitz","fromEmail":"jojo@schmitz-digital.de","sentAt":"2012-12-16T08:27:05Z","receivedAt":"2012-12-16T08:27:05Z","isPatch":true,"sender":{"key":"jojo@schmitz-digital.de","avatar":"https://avatars.githubusercontent.com/u/1786669?v=4"},"body":"Matt Kraai wrote:\n> From: Matt Kraai <matt.kraai@amo.abbott.com>\n>\n> Signed-off-by: Matt Kraai <matt.kraai@amo.abbott.com>\n> ---\n> Makefile          | 19 +++++++++++++++++++\n> git-compat-util.h |  8 ++++++--\n> 2 files changed, 25 insertions(+), 2 deletions(-)\n>\n\nsnip\n\n> diff --git a/git-compat-util.h b/git-compat-util.h\n> index 2e79b8a..6c588ca 100644\n> --- a/git-compat-util.h\n> +++ b/git-compat-util.h\n> @@ -75,7 +75,7 @@\n> # endif\n> #elif !defined(__APPLE__) && !defined(__FreeBSD__) &&\n>       !defined(__USLC__) && \\ !defined(_M_UNIX) && !defined(__sgi) &&\n> !defined(__DragonFly__) && \\ -      !defined(__TANDEM)\n> +      !defined(__TANDEM) && !defined(__QNX__)\n> #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD\n> needs 600 for S_ISLNK() */ #define _XOPEN_SOURCE_EXTENDED 1 /* AIX\n> 5.3L needs this */ #endif\n> @@ -99,7 +99,7 @@\n> #include <stdlib.h>\n> #include <stdarg.h>\n> #include <string.h>\n> -#ifdef __TANDEM /* or HAVE_STRINGS_H or !NO_STRINGS_H? */\n> +#if defined(__TANDEM) || defined(__QNX__) /* or HAVE_STRINGS_H or\n> !NO_STRINGS_H? */ #include <strings.h> /* for strcasecmp() */\n\nThere's another recent thread, discussing to change this to \"#ifdef \nHAVE_STRING_H\" plus the infrastructure in Makefile and configure.ac.\n\nBye, Jojo \n"}]}