git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/2] Port to QNX
@ 2012-12-14 18:38 Matt Kraai
  2012-12-14 18:38 ` [PATCH 1/2] Make lock local to fetch_pack Matt Kraai
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Matt Kraai @ 2012-12-14 18:38 UTC (permalink / raw)
  To: git

This series ports Git to QNX.  It builds on both QNX 6.3.2 and QNX
6.5.0.  The test suite does not pass.  Unless the corresponding
software is installed, the following arguments must be passed to Make:

 NO_CURL=1 NO_GETTEXT=1 NO_OPENSSL=1 NO_PERL=1 NO_PYTHON=1 NO_TCLTK=1

  [1/2]: Make lock local to fetch_pack

QNX 6.3.2's unistd.h declares a function named lock, which causes
fetch-pack.c to fail to compile if lock has file-scope.  Since it's
only used in a single function, move it therein.

  [2/2]: Port to QNX

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] Make lock local to fetch_pack
  2012-12-14 18:38 [PATCH 0/2] Port to QNX Matt Kraai
@ 2012-12-14 18:38 ` Matt Kraai
  2012-12-15 18:40   ` Junio C Hamano
  2012-12-14 18:38 ` [PATCH 2/2] Port to QNX Matt Kraai
  2012-12-15 18:38 ` [PATCH 0/2] " Junio C Hamano
  2 siblings, 1 reply; 8+ messages in thread
From: Matt Kraai @ 2012-12-14 18:38 UTC (permalink / raw)
  To: git; +Cc: Matt Kraai

From: Matt Kraai <matt.kraai@amo.abbott.com>

lock is only used by fetch_pack, so move it into that function.

Signed-off-by: Matt Kraai <matt.kraai@amo.abbott.com>
---
 fetch-pack.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fetch-pack.c b/fetch-pack.c
index 099ff4d..9d9762d 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -874,8 +874,6 @@ static int fetch_pack_config(const char *var, const char *value, void *cb)
 	return git_default_config(var, value, cb);
 }
 
-static struct lock_file lock;
-
 static void fetch_pack_setup(void)
 {
 	static int did_setup;
@@ -896,6 +894,7 @@ struct ref *fetch_pack(struct fetch_pack_args *args,
 		       struct string_list *sought,
 		       char **pack_lockfile)
 {
+	static struct lock_file lock;
 	struct stat st;
 	struct ref *ref_cpy;
 
-- 
1.8.1-rc1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] Port to QNX
  2012-12-14 18:38 [PATCH 0/2] Port to QNX Matt Kraai
  2012-12-14 18:38 ` [PATCH 1/2] Make lock local to fetch_pack Matt Kraai
@ 2012-12-14 18:38 ` Matt Kraai
  2012-12-16  8:27   ` Joachim Schmitz
  2012-12-15 18:38 ` [PATCH 0/2] " Junio C Hamano
  2 siblings, 1 reply; 8+ messages in thread
From: Matt Kraai @ 2012-12-14 18:38 UTC (permalink / raw)
  To: git; +Cc: Matt Kraai

From: Matt Kraai <matt.kraai@amo.abbott.com>

Signed-off-by: Matt Kraai <matt.kraai@amo.abbott.com>
---
 Makefile          | 19 +++++++++++++++++++
 git-compat-util.h |  8 ++++++--
 2 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 736ecd4..ed2539d 100644
--- a/Makefile
+++ b/Makefile
@@ -78,6 +78,8 @@ all::
 #
 # Define NO_MEMMEM if you don't have memmem.
 #
+# Define NO_GETPAGESIZE if you don't have getpagesize.
+#
 # Define NO_STRLCPY if you don't have strlcpy.
 #
 # Define NO_STRTOUMAX if you don't have both strtoimax and strtoumax in the
@@ -1448,6 +1450,20 @@ else
 	NO_CURL = YesPlease
 endif
 endif
+ifeq ($(uname_S),QNX)
+	COMPAT_CFLAGS += -DSA_RESTART=0
+	NEEDS_SOCKET = YesPlease
+	NO_MKDTEMP = YesPlease
+	NO_MKSTEMPS = YesPlease
+	NO_FNMATCH_CASEFOLD = YesPlease
+	NO_GETPAGESIZE = YesPlease
+	NO_ICONV = YesPlease
+	NO_MEMMEM = YesPlease
+	NO_NSEC = YesPlease
+	NO_STRCASESTR = YesPlease
+	NO_STRLCPY = YesPlease
+	PTHREAD_LIBS =
+endif
 
 -include config.mak.autogen
 -include config.mak
@@ -1859,6 +1875,9 @@ ifdef NO_MEMMEM
 	COMPAT_CFLAGS += -DNO_MEMMEM
 	COMPAT_OBJS += compat/memmem.o
 endif
+ifdef NO_GETPAGESIZE
+	COMPAT_CFLAGS += -DNO_GETPAGESIZE
+endif
 ifdef INTERNAL_QSORT
 	COMPAT_CFLAGS += -DINTERNAL_QSORT
 	COMPAT_OBJS += compat/qsort.o
diff --git a/git-compat-util.h b/git-compat-util.h
index 2e79b8a..6c588ca 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -75,7 +75,7 @@
 # endif
 #elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && \
       !defined(_M_UNIX) && !defined(__sgi) && !defined(__DragonFly__) && \
-      !defined(__TANDEM)
+      !defined(__TANDEM) && !defined(__QNX__)
 #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
@@ -99,7 +99,7 @@
 #include <stdlib.h>
 #include <stdarg.h>
 #include <string.h>
-#ifdef __TANDEM /* or HAVE_STRINGS_H or !NO_STRINGS_H? */
+#if defined(__TANDEM) || defined(__QNX__) /* or HAVE_STRINGS_H or !NO_STRINGS_H? */
 #include <strings.h> /* for strcasecmp() */
 #endif
 #include <errno.h>
@@ -411,6 +411,10 @@ void *gitmemmem(const void *haystack, size_t haystacklen,
                 const void *needle, size_t needlelen);
 #endif
 
+#ifdef NO_GETPAGESIZE
+#define getpagesize() sysconf(_SC_PAGESIZE)
+#endif
+
 #ifdef FREAD_READS_DIRECTORIES
 #ifdef fopen
 #undef fopen
-- 
1.8.1-rc1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] Port to QNX
  2012-12-14 18:38 [PATCH 0/2] Port to QNX Matt Kraai
  2012-12-14 18:38 ` [PATCH 1/2] Make lock local to fetch_pack Matt Kraai
  2012-12-14 18:38 ` [PATCH 2/2] Port to QNX Matt Kraai
@ 2012-12-15 18:38 ` Junio C Hamano
  2012-12-15 21:55   ` Matt Kraai
  2 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2012-12-15 18:38 UTC (permalink / raw)
  To: Matt Kraai; +Cc: git

Matt Kraai <kraai@ftbfs.org> writes:

> This series ports Git to QNX.  It builds on both QNX 6.3.2 and QNX
> 6.5.0.  The test suite does not pass.  Unless the corresponding
> software is installed, the following arguments must be passed to Make:
>
>  NO_CURL=1 NO_GETTEXT=1 NO_OPENSSL=1 NO_PERL=1 NO_PYTHON=1 NO_TCLTK=1
>
>   [1/2]: Make lock local to fetch_pack
>
> QNX 6.3.2's unistd.h declares a function named lock, which causes
> fetch-pack.c to fail to compile if lock has file-scope.  Since it's
> only used in a single function, move it therein.
>
>   [2/2]: Port to QNX

I do not mind queuing this on 'pu' but do you want to see your
ftbfs.org address in the commit objects, or the other one that you
are not using to interact with us?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] Make lock local to fetch_pack
  2012-12-14 18:38 ` [PATCH 1/2] Make lock local to fetch_pack Matt Kraai
@ 2012-12-15 18:40   ` Junio C Hamano
  2012-12-15 19:31     ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2012-12-15 18:40 UTC (permalink / raw)
  To: Matt Kraai; +Cc: git, Matt Kraai

Matt Kraai <kraai@ftbfs.org> writes:

> From: Matt Kraai <matt.kraai@amo.abbott.com>
>
> lock is only used by fetch_pack, so move it into that function.
>
> Signed-off-by: Matt Kraai <matt.kraai@amo.abbott.com>
> ---
>  fetch-pack.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Eh, did you base your patch on something older than 2d4177c (Make
fetch-pack a builtin with an internal API, 2007-09-10)???

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] Make lock local to fetch_pack
  2012-12-15 18:40   ` Junio C Hamano
@ 2012-12-15 19:31     ` Junio C Hamano
  0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2012-12-15 19:31 UTC (permalink / raw)
  To: Matt Kraai; +Cc: git, Matt Kraai

Junio C Hamano <gitster@pobox.com> writes:

> Matt Kraai <kraai@ftbfs.org> writes:
>
>> From: Matt Kraai <matt.kraai@amo.abbott.com>
>>
>> lock is only used by fetch_pack, so move it into that function.
>>
>> Signed-off-by: Matt Kraai <matt.kraai@amo.abbott.com>
>> ---
>>  fetch-pack.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> Eh, did you base your patch on something older than 2d4177c (Make
> fetch-pack a builtin with an internal API, 2007-09-10)???

Ah, nevermind.  I see we refactored this out recently but that is
still in flight.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] Port to QNX
  2012-12-15 18:38 ` [PATCH 0/2] " Junio C Hamano
@ 2012-12-15 21:55   ` Matt Kraai
  0 siblings, 0 replies; 8+ messages in thread
From: Matt Kraai @ 2012-12-15 21:55 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Sat, Dec 15, 2012 at 10:38:30AM -0800, Junio C Hamano wrote:
> I do not mind queuing this on 'pu' but do you want to see your
> ftbfs.org address in the commit objects, or the other one that you
> are not using to interact with us?

Great!  I'd prefer to use the amo.abbott.com address in the commit
objects, since that's where I did the work.  I'm using this email
address because it doesn't require figuring out how to send proper
emails via Outlook and/or Exchange.

-- 
Matt

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] Port to QNX
  2012-12-14 18:38 ` [PATCH 2/2] Port to QNX Matt Kraai
@ 2012-12-16  8:27   ` Joachim Schmitz
  0 siblings, 0 replies; 8+ messages in thread
From: Joachim Schmitz @ 2012-12-16  8:27 UTC (permalink / raw)
  To: git

Matt Kraai wrote:
> From: Matt Kraai <matt.kraai@amo.abbott.com>
>
> Signed-off-by: Matt Kraai <matt.kraai@amo.abbott.com>
> ---
> Makefile          | 19 +++++++++++++++++++
> git-compat-util.h |  8 ++++++--
> 2 files changed, 25 insertions(+), 2 deletions(-)
>

snip

> diff --git a/git-compat-util.h b/git-compat-util.h
> index 2e79b8a..6c588ca 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -75,7 +75,7 @@
> # endif
> #elif !defined(__APPLE__) && !defined(__FreeBSD__) &&
>       !defined(__USLC__) && \ !defined(_M_UNIX) && !defined(__sgi) &&
> !defined(__DragonFly__) && \ -      !defined(__TANDEM)
> +      !defined(__TANDEM) && !defined(__QNX__)
> #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
> @@ -99,7 +99,7 @@
> #include <stdlib.h>
> #include <stdarg.h>
> #include <string.h>
> -#ifdef __TANDEM /* or HAVE_STRINGS_H or !NO_STRINGS_H? */
> +#if defined(__TANDEM) || defined(__QNX__) /* or HAVE_STRINGS_H or
> !NO_STRINGS_H? */ #include <strings.h> /* for strcasecmp() */

There's another recent thread, discussing to change this to "#ifdef 
HAVE_STRING_H" plus the infrastructure in Makefile and configure.ac.

Bye, Jojo 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-12-16  8:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-14 18:38 [PATCH 0/2] Port to QNX Matt Kraai
2012-12-14 18:38 ` [PATCH 1/2] Make lock local to fetch_pack Matt Kraai
2012-12-15 18:40   ` Junio C Hamano
2012-12-15 19:31     ` Junio C Hamano
2012-12-14 18:38 ` [PATCH 2/2] Port to QNX Matt Kraai
2012-12-16  8:27   ` Joachim Schmitz
2012-12-15 18:38 ` [PATCH 0/2] " Junio C Hamano
2012-12-15 21:55   ` Matt Kraai

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).