git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Improve QNX support in GIT

From
MKMatt Kraai <kraai@ftbfs.org>
Date
Feb 26, 2013, 17:25 UTC
Message-ID
<20130226172504.GA2271@ftbfs.org>
Hi Mike,
Mike Gorchak wrote:
Show 31 quoted lines
> diff --git a/config.mak.uname b/config.mak.uname
> index 8743a6d..2d42ffe 100644
> --- a/config.mak.uname
> +++ b/config.mak.uname
> @@ -527,14 +527,21 @@ ifeq ($(uname_S),QNX)
>  	HAVE_STRINGS_H = YesPlease
>  	NEEDS_SOCKET = YesPlease
>  	NO_FNMATCH_CASEFOLD = YesPlease
> -	NO_GETPAGESIZE = YesPlease
>  	NO_ICONV = YesPlease
>  	NO_MEMMEM = YesPlease
> -	NO_MKDTEMP = YesPlease
> -	NO_MKSTEMPS = YesPlease
>  	NO_NSEC = YesPlease
> -	NO_PTHREADS = YesPlease
>  	NO_R_TO_GCC_LINKER = YesPlease
> -	NO_STRCASESTR = YesPlease
>  	NO_STRLCPY = YesPlease
> +	# All QNX 6.x versions have pthread functions in libc
> +	# and getpagesize. Leave mkstemps/mkdtemp/strcasestr for
> +	# autodetection.
> +	ifeq ($(shell expr "$(uname_R)" : '6\.[0-9]\.[0-9]'),5)
> +		PTHREAD_LIBS = ""
> +	else
> +		NO_PTHREADS = YesPlease
> +		NO_GETPAGESIZE = YesPlease
> +		NO_STRCASESTR = YesPlease
> +		NO_MKSTEMPS = YesPlease
> +		NO_MKDTEMP = YesPlease
> +	endif
>  endif

Is there a point to the version checking? I don't know that anyone has tried to build Git on QNX 4, so adding a case for it seems misleading.

I didn't realize that QNX 6.3.2 provided getpagesize. Its header files don't provide a prototype, so when I saw the warning, I assumed it wasn't available. Since NO_GETPAGESIZE is only used by QNX, if it's OK to reintroduce the warning, NO_GETPAGESIZE might as well be removed entirely.

I don't think it's a good idea to just enable thread support. On QNX, once a process creates a thread, fork stops working. This breaks commands that create threads and then try to run other programs, such as "git fetch" with an https remote. If threads are enabled, I think that the uses of fork need to be audited and, if they can be called after a thread is created, fixed.

Next: David Michael
Message 1 of 4 in “Re: [PATCH] Improve QNX support in GIT”
  1. Matt KraaiFeb 26, 2013
  2. David MichaelFeb 26, 2013
  3. Mike GorchakFeb 26, 2013
  4. Mike GorchakFeb 26, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.