{"thread":{"id":"33021","subject":"Re: [PATCH] Improve QNX support in GIT","startedAt":"2013-02-26T17:25:04Z","lastAt":"2013-02-26T18:54:58Z","messageCount":4,"participants":["Matt Kraai","David Michael","Mike Gorchak"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"210339","messageId":"20130226172504.GA2271@ftbfs.org","threadId":"33021","inReplyTo":null,"subject":"Re: [PATCH] Improve QNX support in GIT","fromName":"Matt Kraai","fromEmail":"kraai@ftbfs.org","sentAt":"2013-02-26T17:25:04Z","receivedAt":"2013-02-26T17:25:04Z","isPatch":true,"sender":{"key":"kraai@ftbfs.org","avatar":null},"body":"Hi Mike,\n\nMike Gorchak wrote:\n> diff --git a/config.mak.uname b/config.mak.uname\n> index 8743a6d..2d42ffe 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# and getpagesize. Leave mkstemps/mkdtemp/strcasestr for\n> +\t# 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> +\tendif\n>  endif\n\nIs there a point to the version checking?  I don't know that anyone\nhas tried to build Git on QNX 4, so adding a case for it seems\nmisleading.\n\nI didn't realize that QNX 6.3.2 provided getpagesize.  Its header\nfiles don't provide a prototype, so when I saw the warning, I assumed\nit wasn't available.  Since NO_GETPAGESIZE is only used by QNX, if\nit's OK to reintroduce the warning, NO_GETPAGESIZE might as well be\nremoved entirely.\n\nI don't think it's a good idea to just enable thread support.  On QNX,\nonce a process creates a thread, fork stops working.  This breaks\ncommands that create threads and then try to run other programs, such\nas \"git fetch\" with an https remote.  If threads are enabled, I think\nthat the uses of fork need to be audited and, if they can be called\nafter a thread is created, fixed.\n"},{"id":"210342","messageId":"CAEvUa7=eFPgmyOXH=357RcFzs20iE2ZGAn0qUKpVACqBAhzBvw@mail.gmail.com","threadId":"33021","inReplyTo":"20130226172504.GA2271@ftbfs.org","subject":"Re: [PATCH] Improve QNX support in GIT","fromName":"David Michael","fromEmail":"fedora.dm0@gmail.com","sentAt":"2013-02-26T18:09:18Z","receivedAt":"2013-02-26T18:09:18Z","isPatch":true,"sender":{"key":"fedora.dm0@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1379865?v=4"},"body":"Hi,\n\nOn Tue, Feb 26, 2013 at 12:25 PM, Matt Kraai <kraai@ftbfs.org> wrote:\n> I didn't realize that QNX 6.3.2 provided getpagesize.  Its header\n> files don't provide a prototype, so when I saw the warning, I assumed\n> it wasn't available.  Since NO_GETPAGESIZE is only used by QNX, if\n> it's OK to reintroduce the warning, NO_GETPAGESIZE might as well be\n> removed entirely.\n\nI have been using this feature locally for building on z/OS USS.  IBM\ndecided to drop the getpagesize definition by default, as it was\nremoved from SUSv3.  There is a way to re-enable the withdrawn legacy\nfunctions, but I'd rather this option for using sysconf(_SC_PAGESIZE)\nsince that is apparently the preferred method now anyway.\n\nSo, if it's not being too much trouble, I'd vote for keeping this feature.\n\nThanks.\n\nDavid\n"},{"id":"210344","messageId":"CAHXAxrPcmOQaLaJ1FCzChKXCFvwa=O7ASS=YHb3m-rQzmO6Lsg@mail.gmail.com","threadId":"33021","inReplyTo":"20130226172504.GA2271@ftbfs.org","subject":"Re: [PATCH] Improve QNX support in GIT","fromName":"Mike Gorchak","fromEmail":"mike.gorchak.qnx@gmail.com","sentAt":"2013-02-26T18:36:16Z","receivedAt":"2013-02-26T18:36:16Z","isPatch":true,"sender":{"key":"mike.gorchak.qnx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1337711?v=4"},"body":"> Is there a point to the version checking?  I don't know that anyone\n> has tried to build Git on QNX 4, so adding a case for it seems\n> misleading.\n\ngetpagesize() was introduced in QNX 6.4.1, it is present in QNX 6.5.0\nalso. So at least for this version checking is requied.\n\n> I didn't realize that QNX 6.3.2 provided getpagesize.  Its header\n> files don't provide a prototype, so when I saw the warning, I assumed\n> it wasn't available.  Since NO_GETPAGESIZE is only used by QNX, if\n> it's OK to reintroduce the warning, NO_GETPAGESIZE might as well be\n> removed entirely.\n\nDavid asked to leave NO_GETPAGESIZE for other platform.\n\n> I don't think it's a good idea to just enable thread support.  On QNX,\n> once a process creates a thread, fork stops working.  This breaks\n> commands that create threads and then try to run other programs, such\n> as \"git fetch\" with an https remote.  If threads are enabled, I think\n> that the uses of fork need to be audited and, if they can be called\n> after a thread is created, fixed.\n\nDo you have a testcase for this (without using git codebase)? I wrote\nnumerous resource managers since QNX 6.0 using threads and fork()s for\ndaemonization in different order and never experienced a problems.\nThere can be issues with pipes in case of external command run.\n"},{"id":"210346","messageId":"CAHXAxrOnRkqFEtYa2DN4FEwzeXpKhLsUx0yvoi59dtOSyEGOQw@mail.gmail.com","threadId":"33021","inReplyTo":"20130226172504.GA2271@ftbfs.org","subject":"Re: [PATCH] Improve QNX support in GIT","fromName":"Mike Gorchak","fromEmail":"mike.gorchak.qnx@gmail.com","sentAt":"2013-02-26T18:54:58Z","receivedAt":"2013-02-26T18:54:58Z","isPatch":true,"sender":{"key":"mike.gorchak.qnx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1337711?v=4"},"body":"> I don't think it's a good idea to just enable thread support.  On QNX,\n> once a process creates a thread, fork stops working.  This breaks\n> commands that create threads and then try to run other programs, such\n> as \"git fetch\" with an https remote.  If threads are enabled, I think\n> that the uses of fork need to be audited and, if they can be called\n> after a thread is created, fixed.\n\nI did a quick look into the run-command.c and transport-helper.c\nmodules, they use pthread OR fork for external command spawning\ndepending on NO_PTHREAD declaration. Another fork() occurence in the\nmodule daemon.c for daemonization and I know that it works.\n"}]}