{"thread":{"id":"19706","subject":"[PATCH 3/8] diff-delta.c: \"diff.h\" is not a required include","startedAt":"2009-06-05T23:36:08Z","lastAt":"2009-06-09T16:31:25Z","messageCount":30,"participants":["Brandon Casey","Junio C Hamano","Nicolas Pitre","Jakub Narebski","Ralf Wildenhues","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":8},"messages":[{"id":"115578","messageId":"67hZHClrEWQHxCRdWosE25_CVQVNIYpTaeW2DKuCCDfW4h-jHQ82zlGcCNn49KcxUKsj-TSJSVQ@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"7vk53vlxhz.fsf@alter.siamese.dyndns.org","subject":"[PATCH 0/8] enhancing builds on Solaris","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-05T23:36:08Z","receivedAt":"2009-06-05T23:36:08Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\nJunio,\n\nHere is a re-roll of the work on Solaris which integrates the ideas from you\nand Jeff.  This should replace bc/solaris in pu.\n\nThis should allow compiling on Solaris with or without a c99 compiler,\nGCC or SUNWspro.\n\nSolaris 7 should be able to compile when using GCC and bash.\n\n-brandon\n\n\nBrandon Casey (7):\n  Makefile: use /usr/ucb/install on SunOS platforms rather than\n    ginstall\n  Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile\n    arguments\n  diff-delta.c: \"diff.h\" is not a required include\n  On Solaris choose the OLD_ICONV iconv() declaration based on the UNIX\n    spec\n  git-compat-util.h: tweak the way _XOPEN_SOURCE is set on Solaris\n  Makefile: define __sun__ on SunOS\n  Makefile: add section for SunOS 5.7\n\nJunio C Hamano (1):\n  Makefile: introduce SANE_TOOL_PATH for prepending required elements\n    to PATH\n\n Makefile          |   40 +++++++++++++++++++++++++++++++++++-----\n diff-delta.c      |    1 -\n git-compat-util.h |   17 ++++++++++++++---\n git-sh-setup.sh   |    2 ++\n utf8.c            |    2 +-\n 5 files changed, 52 insertions(+), 10 deletions(-)\n"},{"id":"115577","messageId":"67hZHClrEWQHxCRdWosE24eNsO0do05033zPcGsXrwIRCoU8GtXor_XD8ayKlybu-V7PGeTC_PA@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"67hZHClrEWQHxCRdWosE25_CVQVNIYpTaeW2DKuCCDfW4h-jHQ82zlGcCNn49KcxUKsj-TSJSVQ@cipher.nrlssc.navy.mil","subject":"[PATCH 1/8] Makefile: use /usr/ucb/install on SunOS platforms rather than ginstall","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-05T23:36:09Z","receivedAt":"2009-06-05T23:36:09Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\nWe can avoid a GNU dependency by using /usr/ucb/install.\n\nSigned-off-by: Brandon Casey <drafnel@gmail.com>\n---\n Makefile |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 06c39e4..baa05f5 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -726,7 +726,7 @@ ifeq ($(uname_S),SunOS)\n \t\tNO_C99_FORMAT = YesPlease\n \t\tNO_STRTOUMAX = YesPlease\n \tendif\n-\tINSTALL = ginstall\n+\tINSTALL = /usr/ucb/install\n \tTAR = gtar\n \tBASIC_CFLAGS += -D__EXTENSIONS__\n endif\n-- \n1.6.3.1.24.g152f4\n"},{"id":"115573","messageId":"67hZHClrEWQHxCRdWosE21Y219yACHqb_DoUmykc1kiOxwRuziSDMczTdmGkyEob9g6DVoIraR4@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"67hZHClrEWQHxCRdWosE24eNsO0do05033zPcGsXrwIRCoU8GtXor_XD8ayKlybu-V7PGeTC_PA@cipher.nrlssc.navy.mil","subject":"[PATCH 2/8] Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-05T23:36:10Z","receivedAt":"2009-06-05T23:36:10Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\nThis library is required on Solaris when compiling with NO_IPV6 since\nhstrerror resides in libresolv.  Additionally, Solaris 7 will need it,\nsince inet_ntop and inet_pton reside there too.\n\nSigned-off-by: Brandon Casey <drafnel@gmail.com>\n---\n Makefile |   11 ++++++++++-\n 1 files changed, 10 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex baa05f5..40642f7 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -95,6 +95,10 @@ all::\n # Define NEEDS_SOCKET if linking with libc is not enough (SunOS,\n # Patrick Mauritz).\n #\n+# Define NEEDS_RESOLV if linking with -lnsl and/or -lsocket is not enough.\n+# Notably on Solaris hstrerror resides in libresolv and on Solaris 7\n+# inet_ntop and inet_pton additionally reside there.\n+#\n # Define NO_MMAP if you want to avoid mmap.\n #\n # Define NO_PTHREADS if you do not have or do not want to use Pthreads.\n@@ -708,7 +712,6 @@ ifeq ($(uname_S),SunOS)\n \tSHELL_PATH = /bin/bash\n \tNO_STRCASESTR = YesPlease\n \tNO_MEMMEM = YesPlease\n-\tNO_HSTRERROR = YesPlease\n \tNO_MKDTEMP = YesPlease\n \tNO_MKSTEMPS = YesPlease\n \tifneq ($(uname_R),5.11)\n@@ -726,6 +729,9 @@ ifeq ($(uname_S),SunOS)\n \t\tNO_C99_FORMAT = YesPlease\n \t\tNO_STRTOUMAX = YesPlease\n \tendif\n+\tifdef NO_IPV6\n+\t\tNEEDS_RESOLV = YesPlease\n+\tendif\n \tINSTALL = /usr/ucb/install\n \tTAR = gtar\n \tBASIC_CFLAGS += -D__EXTENSIONS__\n@@ -981,6 +987,9 @@ endif\n ifdef NEEDS_NSL\n \tEXTLIBS += -lnsl\n endif\n+ifdef NEEDS_RESOLV\n+\tEXTLIBS += -lresolv\n+endif\n ifdef NO_D_TYPE_IN_DIRENT\n \tBASIC_CFLAGS += -DNO_D_TYPE_IN_DIRENT\n endif\n-- \n1.6.3.1.24.g152f4\n"},{"id":"115572","messageId":"67hZHClrEWQHxCRdWosE24FbCSWPktK230jx86LzLj0Aqa5g5XoJb3Iv805pzfx5wCPameuSp6M@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"67hZHClrEWQHxCRdWosE21Y219yACHqb_DoUmykc1kiOxwRuziSDMczTdmGkyEob9g6DVoIraR4@cipher.nrlssc.navy.mil","subject":"[PATCH 3/8] diff-delta.c: \"diff.h\" is not a required include","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-05T23:36:11Z","receivedAt":"2009-06-05T23:36:11Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\nThis file (diff.h) provides declarations for some functions that are\nimplemented in diff-delta.c.  The SUNWspro C99 compiler complains about\nit.  There is nothing defined in \"diff.h\" that is required by diff-delta.c,\nso don't #include it.\n\nSigned-off-by: Brandon Casey <drafnel@gmail.com>\n---\n diff-delta.c |    1 -\n 1 files changed, 0 insertions(+), 1 deletions(-)\n\ndiff --git a/diff-delta.c b/diff-delta.c\nindex a4e28df..a9969f0 100644\n--- a/diff-delta.c\n+++ b/diff-delta.c\n@@ -12,7 +12,6 @@\n  */\n \n #include \"git-compat-util.h\"\n-#include \"delta.h\"\n \n /* maximum hash entry list for the same hash bucket */\n #define HASH_LIMIT 64\n-- \n1.6.3.1.24.g152f4\n"},{"id":"115580","messageId":"67hZHClrEWQHxCRdWosE28bOBU_EdMUdyv6uENKCaQfOLQjhGBq3kLwxe6mMrfW4HauaUwWt5eM@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"67hZHClrEWQHxCRdWosE24FbCSWPktK230jx86LzLj0Aqa5g5XoJb3Iv805pzfx5wCPameuSp6M@cipher.nrlssc.navy.mil","subject":"[PATCH 4/8] On Solaris choose the OLD_ICONV iconv() declaration based on the UNIX spec","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-05T23:36:12Z","receivedAt":"2009-06-05T23:36:12Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\nOLD_ICONV is only necessary on Solaris until UNIX03.  This is indicated\nby the private macro _XPG6 which is set in /usr/include/sys/feature_tests.h.\n\nSigned-off-by: Brandon Casey <drafnel@gmail.com>\n---\n Makefile |    3 ---\n utf8.c   |    2 +-\n 2 files changed, 1 insertions(+), 4 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 40642f7..375cf2a 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -714,9 +714,6 @@ ifeq ($(uname_S),SunOS)\n \tNO_MEMMEM = YesPlease\n \tNO_MKDTEMP = YesPlease\n \tNO_MKSTEMPS = YesPlease\n-\tifneq ($(uname_R),5.11)\n-\t\tOLD_ICONV = UnfortunatelyYes\n-\tendif\n \tifeq ($(uname_R),5.8)\n \t\tNO_UNSETENV = YesPlease\n \t\tNO_SETENV = YesPlease\ndiff --git a/utf8.c b/utf8.c\nindex ddfdc5e..db706ac 100644\n--- a/utf8.c\n+++ b/utf8.c\n@@ -354,7 +354,7 @@ int is_encoding_utf8(const char *name)\n  * with iconv.  If the conversion fails, returns NULL.\n  */\n #ifndef NO_ICONV\n-#ifdef OLD_ICONV\n+#if defined(OLD_ICONV) || (defined(__sun__) && !defined(_XPG6))\n \ttypedef const char * iconv_ibp;\n #else\n \ttypedef char * iconv_ibp;\n-- \n1.6.3.1.24.g152f4\n"},{"id":"115579","messageId":"67hZHClrEWQHxCRdWosE26gwuGblUI8bcWLxyoPZhmfzJAibRVMtix-zkRUKYe5Y8R8-GRcIkUI@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"67hZHClrEWQHxCRdWosE28bOBU_EdMUdyv6uENKCaQfOLQjhGBq3kLwxe6mMrfW4HauaUwWt5eM@cipher.nrlssc.navy.mil","subject":"[PATCH 5/8] git-compat-util.h: tweak the way _XOPEN_SOURCE is set on Solaris","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-05T23:36:13Z","receivedAt":"2009-06-05T23:36:13Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\nOn Solaris, when _XOPEN_EXTENDED is set, its header file forces the\nprograms to be XPG4v2, defeating any _XOPEN_SOURCE setting to say we are\nXPG5 or XPG6.  Also on Solaris, XPG6 programs must be compiled with a c99\ncompiler, while non XPG6 programs must be compiled with a pre-c99 compiler.\n\nSo when compiling on Solaris, always refrain from setting _XOPEN_EXTENDED,\nand then set _XOPEN_SOURCE to 600 or 500 based on whether a c99 compiler\nis being used or not.\n\nSigned-off-by: Brandon Casey <drafnel@gmail.com>\n---\n git-compat-util.h |   17 ++++++++++++++---\n 1 files changed, 14 insertions(+), 3 deletions(-)\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex f25f7f1..13e450d 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -39,12 +39,23 @@\n /* Approximation of the length of the decimal representation of this type. */\n #define decimal_length(x)\t((int)(sizeof(x) * 2.56 + 0.5) + 1)\n \n-#if !defined(__APPLE__) && !defined(__FreeBSD__)  && !defined(__USLC__) && !defined(_M_UNIX)\n+#if defined(__sun__)\n+ /*\n+  * On Solaris, when _XOPEN_EXTENDED is set, its header file\n+  * forces the programs to be XPG4v2, defeating any _XOPEN_SOURCE\n+  * setting to say we are XPG5 or XPG6.  Also on Solaris,\n+  * XPG6 programs must be compiled with a c99 compiler, while\n+  * non XPG6 programs must be compiled with a pre-c99 compiler.\n+  */\n+# if __STDC_VERSION__ - 0 >= 199901L\n+# define _XOPEN_SOURCE 600\n+# else\n+# define _XOPEN_SOURCE 500\n+# endif\n+#elif !defined(__APPLE__) && !defined(__FreeBSD__)  && !defined(__USLC__) && !defined(_M_UNIX)\n #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */\n-#ifndef __sun__\n #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */\n #endif\n-#endif\n #define _ALL_SOURCE 1\n #define _GNU_SOURCE 1\n #define _BSD_SOURCE 1\n-- \n1.6.3.1.24.g152f4\n"},{"id":"115576","messageId":"67hZHClrEWQHxCRdWosE2-yxscBzIn8DiQogVPM7EAgcGyYg61V8vYLxFiW6A4ovZp6SOuP0pDM@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"67hZHClrEWQHxCRdWosE26gwuGblUI8bcWLxyoPZhmfzJAibRVMtix-zkRUKYe5Y8R8-GRcIkUI@cipher.nrlssc.navy.mil","subject":"[PATCH 6/8] Makefile: define __sun__ on SunOS","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-05T23:36:14Z","receivedAt":"2009-06-05T23:36:14Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\nThe SUNWspro compiler does not define __sun__ (like GCC does).  A check of\nthis macro was recently added to detect compilation on SunOS and to modify\nthe handling of the NO_ICONV and _XOPEN_SOURCE feature macros.\n\nSigned-off-by: Brandon Casey <drafnel@gmail.com>\n---\n Makefile |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 375cf2a..1239a3c 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -731,7 +731,7 @@ ifeq ($(uname_S),SunOS)\n \tendif\n \tINSTALL = /usr/ucb/install\n \tTAR = gtar\n-\tBASIC_CFLAGS += -D__EXTENSIONS__\n+\tBASIC_CFLAGS += -D__EXTENSIONS__ -D__sun__\n endif\n ifeq ($(uname_O),Cygwin)\n \tNO_D_TYPE_IN_DIRENT = YesPlease\n-- \n1.6.3.1.24.g152f4\n"},{"id":"115574","messageId":"67hZHClrEWQHxCRdWosE2_PLKo8HHFSCQIZrHMfucFNo_Bdy4p79XNP-MU8gnsUflWndiCqfhFM@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"67hZHClrEWQHxCRdWosE2-yxscBzIn8DiQogVPM7EAgcGyYg61V8vYLxFiW6A4ovZp6SOuP0pDM@cipher.nrlssc.navy.mil","subject":"[PATCH 7/8] Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-05T23:36:15Z","receivedAt":"2009-06-05T23:36:15Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Junio C Hamano <gitster@pobox.com>\n\nSome platforms (like SunOS and family) have kept their common binaries at\nsome historical moment in time, and introduced new binaries with modern\nfeatures in a special location like /usr/xpg4/bin or /usr/ucb.  Some of the\nfeatures provided by these modern binaries are expected and required by git.\nIf the featureful binaries are not in the users path, then git could end up\nusing the less featureful binary and fail.\n\nSo provide a mechanism to prepend elements to the users PATH at runtime so\nthe modern binaries will be found.\n\nSigned-off-by: Brandon Casey <drafnel@gmail.com>\n---\n Makefile        |   14 ++++++++++++++\n git-sh-setup.sh |    2 ++\n 2 files changed, 16 insertions(+), 0 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 1239a3c..ca09572 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -3,6 +3,11 @@ all::\n \n # Define V=1 to have a more verbose compile.\n #\n+# Define SHELL_PATH to a POSIX shell if your /bin/sh is broken.\n+#\n+# Define SANE_TOOL_PATH to a colon-separated list of paths to prepend\n+# to PATH if your tools in /usr/bin are broken.\n+#\n # Define SNPRINTF_RETURNS_BOGUS if your are on a system which snprintf()\n # or vsnprintf() return -1 instead of number of characters which would\n # have been written to the final string if enough space had been available.\n@@ -710,6 +715,7 @@ ifeq ($(uname_S),SunOS)\n \tNEEDS_SOCKET = YesPlease\n \tNEEDS_NSL = YesPlease\n \tSHELL_PATH = /bin/bash\n+\tSANE_TOOL_PATH = /usr/xpg6/bin:/usr/xpg4/bin\n \tNO_STRCASESTR = YesPlease\n \tNO_MEMMEM = YesPlease\n \tNO_MKDTEMP = YesPlease\n@@ -881,6 +887,13 @@ endif\n -include config.mak.autogen\n -include config.mak\n \n+ifdef SANE_TOOL_PATH\n+BROKEN_PATH_FIX = s|^. @@PATH@@|PATH=$(SANE_TOOL_PATH)|\n+PATH := $(SANE_TOOL_PATH):${PATH}\n+else\n+BROKEN_PATH_FIX = d\n+endif\n+\n ifeq ($(uname_S),Darwin)\n \tifndef NO_FINK\n \t\tifeq ($(shell test -d /sw/lib && echo y),y)\n@@ -1291,6 +1304,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh\n \t    -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n \t    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \\\n+\t    -e '/^# @@PATH@@/$(BROKEN_PATH_FIX)' \\\n \t    $@.sh >$@+ && \\\n \tchmod +x $@+ && \\\n \tmv $@+ $@\ndiff --git a/git-sh-setup.sh b/git-sh-setup.sh\nindex 8382339..7802581 100755\n--- a/git-sh-setup.sh\n+++ b/git-sh-setup.sh\n@@ -11,6 +11,8 @@\n # exporting it.\n unset CDPATH\n \n+# @@PATH@@:$PATH\n+\n die() {\n \techo >&2 \"$@\"\n \texit 1\n-- \n1.6.3.1.24.g152f4\n"},{"id":"115575","messageId":"67hZHClrEWQHxCRdWosE25x46gbs5mk4cBr-7yXBpcpjvPDOYiInnlMoifjngR6R06unonkmtmc@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"67hZHClrEWQHxCRdWosE2_PLKo8HHFSCQIZrHMfucFNo_Bdy4p79XNP-MU8gnsUflWndiCqfhFM@cipher.nrlssc.navy.mil","subject":"[PATCH 8/8] Makefile: add section for SunOS 5.7","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-05T23:36:16Z","receivedAt":"2009-06-05T23:36:16Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\n\nSigned-off-by: Brandon Casey <drafnel@gmail.com>\n---\n Makefile |   10 ++++++++++\n 1 files changed, 10 insertions(+), 0 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex ca09572..0fe8ec9 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -720,6 +720,16 @@ ifeq ($(uname_S),SunOS)\n \tNO_MEMMEM = YesPlease\n \tNO_MKDTEMP = YesPlease\n \tNO_MKSTEMPS = YesPlease\n+\tifeq ($(uname_R),5.7)\n+\t\tNEEDS_RESOLV = YesPlease\n+\t\tNO_IPV6 = YesPlease\n+\t\tNO_SOCKADDR_STORAGE = YesPlease\n+\t\tNO_UNSETENV = YesPlease\n+\t\tNO_SETENV = YesPlease\n+\t\tNO_STRLCPY = YesPlease\n+\t\tNO_C99_FORMAT = YesPlease\n+\t\tNO_STRTOUMAX = YesPlease\n+\tendif\n \tifeq ($(uname_R),5.8)\n \t\tNO_UNSETENV = YesPlease\n \t\tNO_SETENV = YesPlease\n-- \n1.6.3.1.24.g152f4\n"},{"id":"115581","messageId":"VCLA03jpn3dbEKWlHHuYv-WNm6b-qtbmG2-Ug6PkIc56-6Q5rRHH3A@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"67hZHClrEWQHxCRdWosE25_CVQVNIYpTaeW2DKuCCDfW4h-jHQ82zlGcCNn49KcxUKsj-TSJSVQ@cipher.nrlssc.navy.mil","subject":"Re: [PATCH 0/8] enhancing builds on Solaris","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-05T23:46:48Z","receivedAt":"2009-06-05T23:46:48Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Brandon Casey wrote:\n> From: Brandon Casey <drafnel@gmail.com>\n> \n> This should replace bc/solaris in pu.\n\nJust to be clear, this series is built on top of master.\n\n-brandon\n"},{"id":"115582","messageId":"7vbpp2fcca.fsf@alter.siamese.dyndns.org","threadId":"19706","inReplyTo":"67hZHClrEWQHxCRdWosE25_CVQVNIYpTaeW2DKuCCDfW4h-jHQ82zlGcCNn49KcxUKsj-TSJSVQ@cipher.nrlssc.navy.mil","subject":"Re: [PATCH 0/8] enhancing builds on Solaris","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-06T00:13:57Z","receivedAt":"2009-06-06T00:13:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Looked good except for 3/8 which I did not quite understand.\n"},{"id":"115583","messageId":"T7_w8K5IX5OgW5JLdf5peLzAiFf8SXQIHPcceb1qc4y8ncD9xtH3Cw@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"7vbpp2fcca.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 0/8] enhancing builds on Solaris","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-06T00:41:02Z","receivedAt":"2009-06-06T00:41:02Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Junio C Hamano wrote:\n> Looked good except for 3/8 which I did not quite understand.\n\nI get this error when compiling using the SUNWspro c99 compiler\nwhen delta.h is included in diff-delta.c:\n\n\"diff-delta.c\", line 314: identifier redeclared: create_delta\n        current : function(pointer to const struct delta_index {unsigned long memsize, pointer to const void src_buf, unsigned long src_size, unsigned int hash_mask, array[-1] of pointer to struct index_entry {..} hash}, pointer to const void, unsigned long, pointer to unsigned long, unsigned long) returning pointer to void\n        previous: function(pointer to const struct delta_index {unsigned long memsize, pointer to const void src_buf, unsigned long src_size, unsigned int hash_mask, array[-1] of pointer to struct index_entry {..} hash}, pointer to const void, unsigned long, pointer to unsigned long, unsigned long) returning pointer to void : \"delta.h\", line 44\nc99: acomp failed for diff-delta.c\ngmake: *** [diff-delta.o] Error 2\n\n\nI don't see any difference between those two \"current\" and \"previous\" statements.\n\nI thought I knew why the error was occurring, but now I don't think I do.  There\nare other function declarations in delta.h that are implemented in diff-delta.c,\nand those functions are both declared and implemented _before_ create_delta in\ndelta.h and diff-delta.c respectively.\n\nBut, there does not seem to be anything declared in delta.h that is required by\ndiff-delta.c.\n\nMaybe the commit message should be shortened to something more like:\n\n   The SUNWspro C99 compiler complains: \"identifier redeclared: create_delta\" when\n   delta.h is included.  There is nothing in \"delta.h\" that is required by\n   diff-delta.c, so don't #include it.\n\nHmm, well, I just noticed that in the commit message I said \"diff.h\" everywhere when\nI meant to say \"delta.h\".  Maybe that is the confusion.\n\n-brandon\n"},{"id":"115584","messageId":"M3MzU6FlQXfVApDnN0vdEf4UcS0v8Dh-XOz1cA15MA7nN8wUHrIif6F7g1-JWcHSJSi5Z6_vOoA@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"67hZHClrEWQHxCRdWosE24FbCSWPktK230jx86LzLj0Aqa5g5XoJb3Iv805pzfx5wCPameuSp6M@cipher.nrlssc.navy.mil","subject":"[PATCH v2 3/8] diff-delta.c: \"delta.h\" is not a required include","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-06T00:47:06Z","receivedAt":"2009-06-06T00:47:06Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\nWhen compiling diff-delta.c with the SUNWspro C99 compiler, it complains\n\n    \"diff-delta.c\", line 314: identifier redeclared: create_delta\n\nThere is nothing in \"delta.h\" that is required by diff-delta.c, so don't\ninclude it.\n\nSigned-off-by: Brandon Casey <drafnel@gmail.com>\n---\n diff-delta.c |    1 -\n 1 files changed, 0 insertions(+), 1 deletions(-)\n\ndiff --git a/diff-delta.c b/diff-delta.c\nindex a4e28df..a9969f0 100644\n--- a/diff-delta.c\n+++ b/diff-delta.c\n@@ -12,7 +12,6 @@\n  */\n \n #include \"git-compat-util.h\"\n-#include \"delta.h\"\n \n /* maximum hash entry list for the same hash bucket */\n #define HASH_LIMIT 64\n-- \n1.6.3.1.24.g152f4\n"},{"id":"115593","messageId":"alpine.LFD.2.00.0906052112590.3906@xanadu.home","threadId":"19706","inReplyTo":"M3MzU6FlQXfVApDnN0vdEf4UcS0v8Dh-XOz1cA15MA7nN8wUHrIif6F7g1-JWcHSJSi5Z6_vOoA@cipher.nrlssc.navy.mil","subject":"Re: [PATCH v2 3/8] diff-delta.c: \"delta.h\" is not a required include","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2009-06-06T01:21:39Z","receivedAt":"2009-06-06T01:21:39Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Fri, 5 Jun 2009, Brandon Casey wrote:\n\n> From: Brandon Casey <drafnel@gmail.com>\n> \n> When compiling diff-delta.c with the SUNWspro C99 compiler, it complains\n> \n>     \"diff-delta.c\", line 314: identifier redeclared: create_delta\n> \n> There is nothing in \"delta.h\" that is required by diff-delta.c, so don't\n> include it.\n> \n> Signed-off-by: Brandon Casey <drafnel@gmail.com>\n\nNAK.\n\nThis is common practice to include the header file declaring function \nprototypes into the file defining the actual function so to make sure \nthe declaration matches with the definition.  Deleting that include is \nactively ignoring a problem instead of fixing the cause of it.\n\n\nNicolas\n"},{"id":"115595","messageId":"P6YSWMs6FWplIDEFHZcRIeF7G1bOeRomvBYwfaQf2dgnsOWGC2AaBg@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"alpine.LFD.2.00.0906052112590.3906@xanadu.home","subject":"Re: [PATCH v2 3/8] diff-delta.c: \"delta.h\" is not a required include","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-06T02:49:38Z","receivedAt":"2009-06-06T02:49:38Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Nicolas Pitre wrote:\n> On Fri, 5 Jun 2009, Brandon Casey wrote:\n> \n>> From: Brandon Casey <drafnel@gmail.com>\n>>\n>> When compiling diff-delta.c with the SUNWspro C99 compiler, it complains\n>>\n>>     \"diff-delta.c\", line 314: identifier redeclared: create_delta\n>>\n>> There is nothing in \"delta.h\" that is required by diff-delta.c, so don't\n>> include it.\n>>\n>> Signed-off-by: Brandon Casey <drafnel@gmail.com>\n> \n> NAK.\n> \n> This is common practice to include the header file declaring function \n> prototypes into the file defining the actual function so to make sure \n> the declaration matches with the definition.  Deleting that include is \n> actively ignoring a problem instead of fixing the cause of it.\n\n\nIt doesn't seem to like the structure being redeclared with a flex array\nmember and being passed as a const argument.\n\n\n# cat > test.c <<EOF\n\nstruct a_struct;\n\nextern void *test_func(const struct a_struct *f);\n\nstruct a_struct {\n        int a;\n        int b;\n        char* c[];\n};\n\nvoid *test_func(const struct a_struct *f)\n{\n        return 0;\n}\nEOF\n\n# /opt/SUNWspro/bin/c99 -c test.c \n\"test.c\", line 13: identifier redeclared: test_func\n        current : function(pointer to const struct a_struct {int a, int b, array[-1] of pointer to char c}) returning pointer to void\n        previous: function(pointer to const struct a_struct {int a, int b, array[-1] of pointer to char c}) returning pointer to void : \"test.c\", line 4\nc99: acomp failed for test.c\n\n\nIf either the flex array is removed from the structure, or const is removed from\ntest_func argument, test.c will compile.  Compiling with -O0 doesn't help.\n\n-brandon\n"},{"id":"115596","messageId":"alpine.LFD.2.00.0906052302550.3906@xanadu.home","threadId":"19706","inReplyTo":"P6YSWMs6FWplIDEFHZcRIeF7G1bOeRomvBYwfaQf2dgnsOWGC2AaBg@cipher.nrlssc.navy.mil","subject":"Re: [PATCH v2 3/8] diff-delta.c: \"delta.h\" is not a required include","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2009-06-06T03:10:42Z","receivedAt":"2009-06-06T03:10:42Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Fri, 5 Jun 2009, Brandon Casey wrote:\n\n> Nicolas Pitre wrote:\n> > On Fri, 5 Jun 2009, Brandon Casey wrote:\n> > \n> >> From: Brandon Casey <drafnel@gmail.com>\n> >>\n> >> When compiling diff-delta.c with the SUNWspro C99 compiler, it complains\n> >>\n> >>     \"diff-delta.c\", line 314: identifier redeclared: create_delta\n> >>\n> >> There is nothing in \"delta.h\" that is required by diff-delta.c, so don't\n> >> include it.\n> >>\n> >> Signed-off-by: Brandon Casey <drafnel@gmail.com>\n> > \n> > NAK.\n> > \n> > This is common practice to include the header file declaring function \n> > prototypes into the file defining the actual function so to make sure \n> > the declaration matches with the definition.  Deleting that include is \n> > actively ignoring a problem instead of fixing the cause of it.\n> \n> \n> It doesn't seem to like the structure being redeclared with a flex array\n> member and being passed as a const argument.\n> \n> \n> # cat > test.c <<EOF\n> \n> struct a_struct;\n> \n> extern void *test_func(const struct a_struct *f);\n> \n> struct a_struct {\n>         int a;\n>         int b;\n>         char* c[];\n> };\n> \n> void *test_func(const struct a_struct *f)\n> {\n>         return 0;\n> }\n> EOF\n> \n> # /opt/SUNWspro/bin/c99 -c test.c \n> \"test.c\", line 13: identifier redeclared: test_func\n>         current : function(pointer to const struct a_struct {int a, int b, array[-1] of pointer to char c}) returning pointer to void\n>         previous: function(pointer to const struct a_struct {int a, int b, array[-1] of pointer to char c}) returning pointer to void : \"test.c\", line 4\n> c99: acomp failed for test.c\n> \n> \n> If either the flex array is removed from the structure, or const is removed from\n> test_func argument, test.c will compile.  Compiling with -O0 doesn't help.\n\nWhat if you define FLEX_ARRAY to 1, or even 0?\n\nIf neither of those work then I'd simply remove the const.  Generated \ncode should be exactly the same with gcc.  There is no const with \nsizeof_delta_index() which is already inconsistent.\n\nKind of weird nevertheless.\n\n\nNicolas\n"},{"id":"115597","messageId":"ee63ef30906052056le082bffrec078981dddaa013@mail.gmail.com","threadId":"19706","inReplyTo":"alpine.LFD.2.00.0906052302550.3906@xanadu.home","subject":"Re: [PATCH v2 3/8] diff-delta.c: \"delta.h\" is not a required include","fromName":"Brandon Casey","fromEmail":"drafnel@gmail.com","sentAt":"2009-06-06T03:56:20Z","receivedAt":"2009-06-06T03:56:20Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"On Fri, Jun 5, 2009 at 10:10 PM, Nicolas Pitre<nico@cam.org> wrote:\n> On Fri, 5 Jun 2009, Brandon Casey wrote:\n>\n>> Nicolas Pitre wrote:\n>> > On Fri, 5 Jun 2009, Brandon Casey wrote:\n>> >\n>> >> From: Brandon Casey <drafnel@gmail.com>\n>> >>\n>> >> When compiling diff-delta.c with the SUNWspro C99 compiler, it complains\n>> >>\n>> >>     \"diff-delta.c\", line 314: identifier redeclared: create_delta\n>> >>\n>> >> There is nothing in \"delta.h\" that is required by diff-delta.c, so don't\n>> >> include it.\n>> >>\n>> >> Signed-off-by: Brandon Casey <drafnel@gmail.com>\n>> >\n>> > NAK.\n>> >\n>> > This is common practice to include the header file declaring function\n>> > prototypes into the file defining the actual function so to make sure\n>> > the declaration matches with the definition.  Deleting that include is\n>> > actively ignoring a problem instead of fixing the cause of it.\n>>\n>>\n>> It doesn't seem to like the structure being redeclared with a flex array\n>> member and being passed as a const argument.\n>>\n>>\n>> # cat > test.c <<EOF\n>>\n>> struct a_struct;\n>>\n>> extern void *test_func(const struct a_struct *f);\n>>\n>> struct a_struct {\n>>         int a;\n>>         int b;\n>>         char* c[];\n>> };\n>>\n>> void *test_func(const struct a_struct *f)\n>> {\n>>         return 0;\n>> }\n>> EOF\n>>\n>> # /opt/SUNWspro/bin/c99 -c test.c\n>> \"test.c\", line 13: identifier redeclared: test_func\n>>         current : function(pointer to const struct a_struct {int a, int b, array[-1] of pointer to char c}) returning pointer to void\n>>         previous: function(pointer to const struct a_struct {int a, int b, array[-1] of pointer to char c}) returning pointer to void : \"test.c\", line 4\n>> c99: acomp failed for test.c\n>>\n>>\n>> If either the flex array is removed from the structure, or const is removed from\n>> test_func argument, test.c will compile.  Compiling with -O0 doesn't help.\n>\n> What if you define FLEX_ARRAY to 1, or even 0?\n\nI tried that with my test.c example and '1' works, but not '0'.  I'll\ntry setting FLEX_ARRAY to 1 and running git's test suite on Monday.\n\n> If neither of those work then I'd simply remove the const.  Generated\n> code should be exactly the same with gcc.  There is no const with\n> sizeof_delta_index() which is already inconsistent.\n>\n> Kind of weird nevertheless.\n\nYes.\n\n-brandon\n"},{"id":"115610","messageId":"m3y6s54y8g.fsf@localhost.localdomain","threadId":"19706","inReplyTo":"67hZHClrEWQHxCRdWosE21Y219yACHqb_DoUmykc1kiOxwRuziSDMczTdmGkyEob9g6DVoIraR4@cipher.nrlssc.navy.mil","subject":"Re: [PATCH 2/8] Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-06-06T07:29:34Z","receivedAt":"2009-06-06T07:29:34Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Brandon Casey <casey@nrlssc.navy.mil> writes:\n\n> From: Brandon Casey <drafnel@gmail.com>\n> \n> This library is required on Solaris when compiling with NO_IPV6 since\n> hstrerror resides in libresolv.  Additionally, Solaris 7 will need it,\n> since inet_ntop and inet_pton reside there too.\n> \n> Signed-off-by: Brandon Casey <drafnel@gmail.com>\n> ---\n>  Makefile |   11 ++++++++++-\n>  1 files changed, 10 insertions(+), 1 deletions(-)\n> \n> diff --git a/Makefile b/Makefile\n> index baa05f5..40642f7 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -95,6 +95,10 @@ all::\n>  # Define NEEDS_SOCKET if linking with libc is not enough (SunOS,\n>  # Patrick Mauritz).\n>  #\n> +# Define NEEDS_RESOLV if linking with -lnsl and/or -lsocket is not enough.\n> +# Notably on Solaris hstrerror resides in libresolv and on Solaris 7\n> +# inet_ntop and inet_pton additionally reside there.\n> +#\n>  # Define NO_MMAP if you want to avoid mmap.\n>  #\n>  # Define NO_PTHREADS if you do not have or do not want to use Pthreads.\n\nCould you please add this build configuration variable to configure.ac\nand config.mak.in, to be able to autodetect this situation?\n\nCC-ed Ralf Wildenhues and David Syzdek (who hopefully can produce\nautoconf patch to squash with this one).\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"115682","messageId":"ee63ef30906061802m4153b9e6i1b289897f2f7f52a@mail.gmail.com","threadId":"19706","inReplyTo":"m3y6s54y8g.fsf@localhost.localdomain","subject":"Re: [PATCH 2/8] Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments","fromName":"Brandon Casey","fromEmail":"drafnel@gmail.com","sentAt":"2009-06-07T01:02:19Z","receivedAt":"2009-06-07T01:02:19Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"On Sat, Jun 6, 2009 at 2:29 AM, Jakub Narebski<jnareb@gmail.com> wrote:\n> Brandon Casey <casey@nrlssc.navy.mil> writes:\n>\n>> From: Brandon Casey <drafnel@gmail.com>\n>>\n>> This library is required on Solaris when compiling with NO_IPV6 since\n>> hstrerror resides in libresolv.  Additionally, Solaris 7 will need it,\n>> since inet_ntop and inet_pton reside there too.\n>>\n>> Signed-off-by: Brandon Casey <drafnel@gmail.com>\n>> ---\n>>  Makefile |   11 ++++++++++-\n>>  1 files changed, 10 insertions(+), 1 deletions(-)\n>>\n>> diff --git a/Makefile b/Makefile\n>> index baa05f5..40642f7 100644\n>> --- a/Makefile\n>> +++ b/Makefile\n>> @@ -95,6 +95,10 @@ all::\n>>  # Define NEEDS_SOCKET if linking with libc is not enough (SunOS,\n>>  # Patrick Mauritz).\n>>  #\n>> +# Define NEEDS_RESOLV if linking with -lnsl and/or -lsocket is not enough.\n>> +# Notably on Solaris hstrerror resides in libresolv and on Solaris 7\n>> +# inet_ntop and inet_pton additionally reside there.\n>> +#\n>>  # Define NO_MMAP if you want to avoid mmap.\n>>  #\n>>  # Define NO_PTHREADS if you do not have or do not want to use Pthreads.\n>\n> Could you please add this build configuration variable to configure.ac\n> and config.mak.in, to be able to autodetect this situation?\n\nI'll take a look at it, but autoconf is not a strong suit of mine.\nPlus, I doubt I will actually be able to test anything on the\nplatforms I have access to that need to set NEEDS_RESOLV, since any\nautoconf installation is likely to be very old.\n\n> CC-ed Ralf Wildenhues and David Syzdek (who hopefully can produce\n> autoconf patch to squash with this one).\n\nYes please. :)\n\nFYI:\nSolaris 7 needs -lresov since inet_ntop and inet_pton reside there.\nAdditionally, since NO_IPV6 is set, hstrerror is called in connect.c\nand hstrerror also resides in libresolv.\n\nOn more modern Solaris, inet_ntop and inet_pton reside somewhere else,\nand since NO_IPV6 does not need to be set, -lresolv is not needed.\n\n-brandon\n"},{"id":"115686","messageId":"20090607054028.GE5140@gmx.de","threadId":"19706","inReplyTo":"m3y6s54y8g.fsf@localhost.localdomain","subject":"[PATCH] configure: test whether -lresolv is needed","fromName":"Ralf Wildenhues","fromEmail":"ralf.wildenhues@gmx.de","sentAt":"2009-06-07T05:40:29Z","receivedAt":"2009-06-07T05:40:29Z","isPatch":true,"sender":{"key":"ralf.wildenhues@gmx.de","avatar":null},"body":"Check if -lresolv is needed for hstrerror; set NEEDS_RESOLV\naccordingly, and substitute in config.mak.in.\n\nSigned-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>\n---\n\n* Jakub Narebski wrote on Sat, Jun 06, 2009 at 09:29:34AM CEST:\n> \n> CC-ed Ralf Wildenhues and David Syzdek (who hopefully can produce\n> autoconf patch to squash with this one).\n\nCompletely untested, but also completely mechanical.  HTH.\n\nCheers,\nRalf\n\n config.mak.in |    1 +\n configure.ac  |    9 +++++++++\n 2 files changed, 10 insertions(+), 0 deletions(-)\n\ndiff --git a/config.mak.in b/config.mak.in\nindex e8d96e8..dd60451 100644\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -33,6 +33,7 @@ NO_EXPAT=@NO_EXPAT@\n NO_LIBGEN_H=@NO_LIBGEN_H@\n NEEDS_LIBICONV=@NEEDS_LIBICONV@\n NEEDS_SOCKET=@NEEDS_SOCKET@\n+NEEDS_RESOLV=@NEEDS_RESOLV@\n NO_SYS_SELECT_H=@NO_SYS_SELECT_H@\n NO_D_INO_IN_DIRENT=@NO_D_INO_IN_DIRENT@\n NO_D_TYPE_IN_DIRENT=@NO_D_TYPE_IN_DIRENT@\ndiff --git a/configure.ac b/configure.ac\nindex 108a97f..7937e60 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -467,6 +467,15 @@ AC_CHECK_LIB([c], [socket],\n AC_SUBST(NEEDS_SOCKET)\n test -n \"$NEEDS_SOCKET\" && LIBS=\"$LIBS -lsocket\"\n \n+#\n+# Define NEEDS_RESOLV if linking with -lnsl and/or -lsocket is not enough.\n+# Notably on Solaris hstrerror resides in libresolv and on Solaris 7\n+# inet_ntop and inet_pton additionally reside there.\n+AC_CHECK_LIB([resolv], [hstrerror],\n+[NEEDS_RESOLV=],\n+[NEEDS_RESOLV=YesPlease])\n+AC_SUBST(NEEDS_RESOLV)\n+test -n \"$NEEDS_RESOLV\" && LIBS=\"$LIBS -lresolv\"\n \n ## Checks for header files.\n AC_MSG_NOTICE([CHECKS for header files])\n-- \n1.6.3.2.199.g31f34\n"},{"id":"115795","messageId":"20090608114351.GA13775@coredump.intra.peff.net","threadId":"19706","inReplyTo":"67hZHClrEWQHxCRdWosE2_PLKo8HHFSCQIZrHMfucFNo_Bdy4p79XNP-MU8gnsUflWndiCqfhFM@cipher.nrlssc.navy.mil","subject":"Re: [PATCH 7/8] Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-06-08T11:43:51Z","receivedAt":"2009-06-08T11:43:51Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Jun 05, 2009 at 06:36:15PM -0500, Brandon Casey wrote:\n\n> From: Junio C Hamano <gitster@pobox.com>\n> \n> Some platforms (like SunOS and family) have kept their common binaries at\n> some historical moment in time, and introduced new binaries with modern\n> features in a special location like /usr/xpg4/bin or /usr/ucb.  Some of the\n> features provided by these modern binaries are expected and required by git.\n> If the featureful binaries are not in the users path, then git could end up\n> using the less featureful binary and fail.\n> \n> So provide a mechanism to prepend elements to the users PATH at runtime so\n> the modern binaries will be found.\n\nSo this bit me already, and it's only been in next for a day. :) I\n_already_ have /usr/xpg4/bin in my PATH before /usr/bin, but with this\npatch, I get it stuck at the _beginning_ of my PATH automagically. Which\noverrides, against my wishes, the \"even more sane than /usr/xpg4/bin\"\npart of my PATH that comes at the beginning.\n\nSpecifically, I have \"~peff/local/bin\" at the beginning of my PATH which\ncontains a 'vi' that points to vim. Running \"git rebase -i\" now puts\n/usr/xpg4/bin at the beginning of the PATH (before ~peff/local/bin),\nwhich means I end up running the crappy system vi instead. For bonus\nfun, \"git commit\" still runs the correct 'vi' because it doesn't happen\nto be implemented as a shell script.\n\nAm I crazy for not having EDITOR=vim instead of EDITOR=vi? Perhaps. But\nI wanted to point out that tweaking the PATH behind the user's back does\ncause surprises in the real world.\n\n-Peff\n"},{"id":"115796","messageId":"20090608115045.GB13775@coredump.intra.peff.net","threadId":"19706","inReplyTo":"67hZHClrEWQHxCRdWosE25_CVQVNIYpTaeW2DKuCCDfW4h-jHQ82zlGcCNn49KcxUKsj-TSJSVQ@cipher.nrlssc.navy.mil","subject":"Re: [PATCH 0/8] enhancing builds on Solaris","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-06-08T11:50:45Z","receivedAt":"2009-06-08T11:50:45Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Jun 05, 2009 at 06:36:08PM -0500, Brandon Casey wrote:\n\n> Here is a re-roll of the work on Solaris which integrates the ideas from you\n> and Jeff.  This should replace bc/solaris in pu.\n> \n> This should allow compiling on Solaris with or without a c99 compiler,\n> GCC or SUNWspro.\n> \n> Solaris 7 should be able to compile when using GCC and bash.\n\nWith the exception of 7/8 (which I already complained about separately),\nthese look reasonable to me, and my setup still passes the same tests\n(though that is perhaps not saying much, as I was already using gcc).\n\n-Peff\n"},{"id":"115804","messageId":"nwND53LJ3yJOus0fY2Tjm-DbTAR8lJKtmBZRYJ4EcvNx7qWStwbs9w@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"20090608114351.GA13775@coredump.intra.peff.net","subject":"Re: [PATCH 7/8] Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-08T13:39:50Z","receivedAt":"2009-06-08T13:39:50Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Jeff King wrote:\n> On Fri, Jun 05, 2009 at 06:36:15PM -0500, Brandon Casey wrote:\n> \n>> From: Junio C Hamano <gitster@pobox.com>\n>>\n>> Some platforms (like SunOS and family) have kept their common binaries at\n>> some historical moment in time, and introduced new binaries with modern\n>> features in a special location like /usr/xpg4/bin or /usr/ucb.  Some of the\n>> features provided by these modern binaries are expected and required by git.\n>> If the featureful binaries are not in the users path, then git could end up\n>> using the less featureful binary and fail.\n>>\n>> So provide a mechanism to prepend elements to the users PATH at runtime so\n>> the modern binaries will be found.\n> \n> So this bit me already, and it's only been in next for a day. :) I\n> _already_ have /usr/xpg4/bin in my PATH before /usr/bin, but with this\n> patch, I get it stuck at the _beginning_ of my PATH automagically. Which\n> overrides, against my wishes, the \"even more sane than /usr/xpg4/bin\"\n> part of my PATH that comes at the beginning.\n> \n> Specifically, I have \"~peff/local/bin\" at the beginning of my PATH which\n> contains a 'vi' that points to vim. Running \"git rebase -i\" now puts\n> /usr/xpg4/bin at the beginning of the PATH (before ~peff/local/bin),\n> which means I end up running the crappy system vi instead. For bonus\n> fun, \"git commit\" still runs the correct 'vi' because it doesn't happen\n> to be implemented as a shell script.\n> \n> Am I crazy for not having EDITOR=vim instead of EDITOR=vi? Perhaps. But\n> I wanted to point out that tweaking the PATH behind the user's back does\n> cause surprises in the real world.\n\nGood points.  I'm fine with dropping this patch, especially when it causes\nproblems for a real Solaris user, which I'm not.\n\nI don't like that git has a dependency on the user's PATH being set\ncorrectly though.  That's why I liked the patch.  I guess I could modify\nall the uses of sed and friends to look like $SED and then set SED to\n/usr/xpg4/bin/sed on Solaris.  It doesn't sound like that is necessary\nin practice though.\n\nbtw, this patch does help the test suite when the test suite is run using\nmake.  The patch added SANE_TOOL_PATH to PATH in the Makefile.\n\n-brandon\n"},{"id":"115806","messageId":"20090608135047.GB28101@sigill.intra.peff.net","threadId":"19706","inReplyTo":"nwND53LJ3yJOus0fY2Tjm-DbTAR8lJKtmBZRYJ4EcvNx7qWStwbs9w@cipher.nrlssc.navy.mil","subject":"Re: [PATCH 7/8] Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-06-08T13:50:47Z","receivedAt":"2009-06-08T13:50:47Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jun 08, 2009 at 08:39:50AM -0500, Brandon Casey wrote:\n\n> > Am I crazy for not having EDITOR=vim instead of EDITOR=vi? Perhaps. But\n> > I wanted to point out that tweaking the PATH behind the user's back does\n> > cause surprises in the real world.\n> \n> Good points.  I'm fine with dropping this patch, especially when it causes\n> problems for a real Solaris user, which I'm not.\n\nLet me point out that I'm also not a real Solaris user. These days all I\nuse it for is test-compiling git. So you can take my report with a grain\nof salt.\n\n> I don't like that git has a dependency on the user's PATH being set\n> correctly though.  That's why I liked the patch.  I guess I could modify\n> all the uses of sed and friends to look like $SED and then set SED to\n> /usr/xpg4/bin/sed on Solaris.  It doesn't sound like that is necessary\n> in practice though.\n\nYeah, I think requiring the user's PATH to be set correctly and tweaking\nthe PATH behind the user's back are both unsatisfactory solutions. Using\n$SED everywhere solves both problems, but would probably be quite\nannoying to maintain. So I guess it is a matter of picking our poison.\n\n-Peff\n"},{"id":"115814","messageId":"2wHNa8FCu6W1VZWGrFNwPMPjwGdeMbg-cGV8PklqUEiQNAqjlIVBIw@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"20090608135047.GB28101@sigill.intra.peff.net","subject":"Re: [PATCH 7/8] Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-08T15:59:25Z","receivedAt":"2009-06-08T15:59:25Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Jeff King wrote:\n> On Mon, Jun 08, 2009 at 08:39:50AM -0500, Brandon Casey wrote:\n> \n>>> Am I crazy for not having EDITOR=vim instead of EDITOR=vi? Perhaps. But\n>>> I wanted to point out that tweaking the PATH behind the user's back does\n>>> cause surprises in the real world.\n>> Good points.  I'm fine with dropping this patch, especially when it causes\n>> problems for a real Solaris user, which I'm not.\n> \n> Let me point out that I'm also not a real Solaris user. These days all I\n> use it for is test-compiling git. So you can take my report with a grain\n> of salt.\n\nheh.\n\n>> I don't like that git has a dependency on the user's PATH being set\n>> correctly though.  That's why I liked the patch.  I guess I could modify\n>> all the uses of sed and friends to look like $SED and then set SED to\n>> /usr/xpg4/bin/sed on Solaris.  It doesn't sound like that is necessary\n>> in practice though.\n> \n> Yeah, I think requiring the user's PATH to be set correctly and tweaking\n> the PATH behind the user's back are both unsatisfactory solutions. Using\n> $SED everywhere solves both problems, but would probably be quite\n> annoying to maintain. So I guess it is a matter of picking our poison.\n\nagreed.\n\n-brandon\n"},{"id":"115817","messageId":"7v4ouq1xv6.fsf@alter.siamese.dyndns.org","threadId":"19706","inReplyTo":"20090608114351.GA13775@coredump.intra.peff.net","subject":"Re: [PATCH 7/8] Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-08T16:41:49Z","receivedAt":"2009-06-08T16:41:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Fri, Jun 05, 2009 at 06:36:15PM -0500, Brandon Casey wrote:\n> ...\n>> So provide a mechanism to prepend elements to the users PATH at runtime so\n>> the modern binaries will be found.\n>\n> So this bit me already, and it's only been in next for a day. :) I\n> _already_ have /usr/xpg4/bin in my PATH before /usr/bin, but with this\n> patch, I get it stuck at the _beginning_ of my PATH automagically. Which\n> overrides, against my wishes, the \"even more sane than /usr/xpg4/bin\"\n> part of my PATH that comes at the beginning.\n>\n> Specifically, I have \"~peff/local/bin\" at the beginning of my PATH which\n> contains a 'vi' that points to vim. Running \"git rebase -i\" now puts\n> /usr/xpg4/bin at the beginning of the PATH (before ~peff/local/bin),\n\nIn git-sh-setup, we do \"unset CDPATH\" ourselves to help and protect\nclueless people, even though \"people should have a sane environment\".\nEven though I suspect that anybody who is using Solaris for anything real\nwould not be using /usr/bin tools themselves (i.e. it should not be\nnecessary for us fixing their PATH), there may be people who do not know.\nI think helping them with path munging falls into the same category, but\nat the same time, the remedy looks worse than the disease.\n\nWe could further uglify the patch like this.\n\n Makefile        |    5 +++--\n git-sh-setup.sh |   28 +++++++++++++++++++++++++++-\n 2 files changed, 30 insertions(+), 3 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 3890a0e..c678cc0 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -881,7 +881,8 @@ endif\n -include config.mak\n \n ifdef SANE_TOOL_PATH\n-BROKEN_PATH_FIX = s|^. @@PATH@@|PATH=$(SANE_TOOL_PATH)|\n+SANE_TOOL_PATH_SQ = $(subst ','\\'',$(SANE_TOOL_PATH))\n+BROKEN_PATH_FIX = 's|^\\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix $(SANE_TOOL_PATH_SQ)|'\n PATH := $(SANE_TOOL_PATH):${PATH}\n else\n BROKEN_PATH_FIX = d\n@@ -1288,7 +1289,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh\n \t    -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n \t    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \\\n-\t    -e '/^# @@PATH@@/$(BROKEN_PATH_FIX)' \\\n+\t    -e $(BROKEN_PATH_FIX) \\\n \t    $@.sh >$@+ && \\\n \tchmod +x $@+ && \\\n \tmv $@+ $@\ndiff --git a/git-sh-setup.sh b/git-sh-setup.sh\nindex 7802581..80acb7d 100755\n--- a/git-sh-setup.sh\n+++ b/git-sh-setup.sh\n@@ -11,7 +11,33 @@\n # exporting it.\n unset CDPATH\n \n-# @@PATH@@:$PATH\n+git_broken_path_fix () {\n+\tcase \":$PATH:\" in\n+\t*:$1:*) : ok ;;\n+\t*)\n+\t\tPATH=$(\n+\t\t\tSANE_TOOL_PATH=\"$1\"\n+\t\t\tIFS=: path= sep=\n+\t\t\tset x $PATH\n+\t\t\tshift\n+\t\t\tfor elem\n+\t\t\tdo\n+\t\t\t\tcase \"$SANE_TOOL_PATH:$elem\" in\n+\t\t\t\t(?*:/bin | ?*:/usr/bin)\n+\t\t\t\t\tpath=\"$path$sep$SANE_TOOL_PATH\"\n+\t\t\t\t\tsep=:\n+\t\t\t\t\tSANE_TOOL_PATH=\n+\t\t\t\tesac\n+\t\t\t\tpath=\"$path$sep$elem\"\n+\t\t\t\tsep=:\n+\t\t\tdone\n+\t\t\techo \"$path\"\n+\t\t)\n+\t\t;;\n+\tesac\n+}\n+\n+# @@BROKEN_PATH_FIX@@\n \n die() {\n \techo >&2 \"$@\"\n"},{"id":"115855","messageId":"20090608221117.GC29942@sigill.intra.peff.net","threadId":"19706","inReplyTo":"7v4ouq1xv6.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 7/8] Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-06-08T22:11:17Z","receivedAt":"2009-06-08T22:11:17Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jun 08, 2009 at 09:41:49AM -0700, Junio C Hamano wrote:\n\n> We could further uglify the patch like this.\n> [...]\n> +git_broken_path_fix () {\n> +\tcase \":$PATH:\" in\n> +\t*:$1:*) : ok ;;\n> +\t*)\n> +\t\tPATH=$(\n> +\t\t\tSANE_TOOL_PATH=\"$1\"\n> +\t\t\tIFS=: path= sep=\n> +\t\t\tset x $PATH\n> +\t\t\tshift\n> +\t\t\tfor elem\n> +\t\t\tdo\n> +\t\t\t\tcase \"$SANE_TOOL_PATH:$elem\" in\n> +\t\t\t\t(?*:/bin | ?*:/usr/bin)\n> +\t\t\t\t\tpath=\"$path$sep$SANE_TOOL_PATH\"\n> +\t\t\t\t\tsep=:\n> +\t\t\t\t\tSANE_TOOL_PATH=\n> +\t\t\t\tesac\n> +\t\t\t\tpath=\"$path$sep$elem\"\n> +\t\t\t\tsep=:\n> +\t\t\tdone\n> +\t\t\techo \"$path\"\n> +\t\t)\n> +\t\t;;\n> +\tesac\n> +}\n\nWow. That _is_ ugly, but it actually addresses exactly both my concern\nand Brandon's. I kind of like it.\n\n-Peff\n"},{"id":"115863","messageId":"fzqJj0x9YB8Uli2Fx2vePY55fbueEEY-IiruKI-uLEgS08KF5M8miw@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"20090608221117.GC29942@sigill.intra.peff.net","subject":"Re: [PATCH 7/8] Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-08T23:39:40Z","receivedAt":"2009-06-08T23:39:40Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"\nI never received the referenced email.  I'll try to extract from gmane\nand test.\n\n-brandon\n\n\nJeff King wrote:\n> On Mon, Jun 08, 2009 at 09:41:49AM -0700, Junio C Hamano wrote:\n> \n>> We could further uglify the patch like this.\n>> [...]\n>> +git_broken_path_fix () {\n>> +\tcase \":$PATH:\" in\n>> +\t*:$1:*) : ok ;;\n>> +\t*)\n>> +\t\tPATH=$(\n>> +\t\t\tSANE_TOOL_PATH=\"$1\"\n>> +\t\t\tIFS=: path= sep=\n>> +\t\t\tset x $PATH\n>> +\t\t\tshift\n>> +\t\t\tfor elem\n>> +\t\t\tdo\n>> +\t\t\t\tcase \"$SANE_TOOL_PATH:$elem\" in\n>> +\t\t\t\t(?*:/bin | ?*:/usr/bin)\n>> +\t\t\t\t\tpath=\"$path$sep$SANE_TOOL_PATH\"\n>> +\t\t\t\t\tsep=:\n>> +\t\t\t\t\tSANE_TOOL_PATH=\n>> +\t\t\t\tesac\n>> +\t\t\t\tpath=\"$path$sep$elem\"\n>> +\t\t\t\tsep=:\n>> +\t\t\tdone\n>> +\t\t\techo \"$path\"\n>> +\t\t)\n>> +\t\t;;\n>> +\tesac\n>> +}\n> \n> Wow. That _is_ ugly, but it actually addresses exactly both my concern\n> and Brandon's. I kind of like it.\n> \n> -Peff\n"},{"id":"115865","messageId":"nYAkmarcGRBhYLHbnRiCZXL6usjjeB6-Ay5jvqc8d36t-A-gMf9kF8a87yc3WwoOoSuGBCYDVLg@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"ee63ef30906052056le082bffrec078981dddaa013@mail.gmail.com","subject":"[PATCH] git-compat-util.h: avoid using c99 flex array feature with Sun compiler 5.8","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-08T23:53:48Z","receivedAt":"2009-06-08T23:53:48Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\nThe Sun c99 compiler as recent as version 5.8 Patch 121016-06 2007/08/01\nproduces an error when compiling diff-delta.c.  This source file #includes\nthe delta.h header file which pre-declares a struct which is later defined\nto contain a flex array member.  The Sun c99 compiler fails to compile\ndiff-delta.c and gives the following error:\n\n  \"diff-delta.c\", line 314: identifier redeclared: create_delta\n          current : function(pointer to const struct delta_index {unsigned long memsize, pointer to const void src_buf, unsigned long src_size, unsigned int hash_mask, array[-1] of pointer to struct index_entry {..} hash}, pointer to const void, unsigned long, pointer to unsigned long, unsigned long) returning pointer to void\n          previous: function(pointer to const struct delta_index {unsigned long memsize, pointer to const void src_buf, unsigned long src_size, unsigned int hash_mask, array[-1] of pointer to struct index_entry {..} hash}, pointer to const void, unsigned long, pointer to unsigned long, unsigned long) returning pointer to void : \"delta.h\", line 44\n  c99: acomp failed for diff-delta.c\n\nSo, avoid using this c99 feature when compiling with the Sun c compilers\nversion 5.8 and older (the most recent version tested).\n\nSigned-off-by: Brandon Casey <drafnel@gmail.com>\n---\n\n\nThis should avoid the flex array problems when using the Sun c99 compiler.\n\nThis patch is on top of the new bc/solaris (a7a24ee7).\n\nSince this checks the version of the Sun compiler, it should give Sun the\nopportunity to fix the compiler in newer releases.  If someone has Sun\nStudio 12? where __SUNPRO_C is set to 0x590, maybe they can test.\n\n-brandon\n\n\n git-compat-util.h |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 71197d9..48d99fa 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -7,7 +7,7 @@\n /*\n  * See if our compiler is known to support flexible array members.\n  */\n-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)\n+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && (!defined(__SUNPRO_C) || (__SUNPRO_C > 0x580))\n # define FLEX_ARRAY /* empty */\n #elif defined(__GNUC__)\n # if (__GNUC__ >= 3)\n-- \n1.6.3.1.24.g152f4\n"},{"id":"115921","messageId":"wc0tJnw_v48859mPtdiAsOp4fUfXkMF0vWRS0PSaU3M4DwNh5kkG_Q@cipher.nrlssc.navy.mil","threadId":"19706","inReplyTo":"fzqJj0x9YB8Uli2Fx2vePY55fbueEEY-IiruKI-uLEgS08KF5M8miw@cipher.nrlssc.navy.mil","subject":"Re: [PATCH 7/8] Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-06-09T16:31:25Z","receivedAt":"2009-06-09T16:31:25Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Brandon Casey wrote:\n> I never received the referenced email.  I'll try to extract from gmane\n> and test.\n\nThis patch works for me.\n\n-brandon\n\n\n> Jeff King wrote:\n>> On Mon, Jun 08, 2009 at 09:41:49AM -0700, Junio C Hamano wrote:\n>>\n>>> We could further uglify the patch like this.\n>>> [...]\n>>> +git_broken_path_fix () {\n>>> +\tcase \":$PATH:\" in\n>>> +\t*:$1:*) : ok ;;\n>>> +\t*)\n>>> +\t\tPATH=$(\n>>> +\t\t\tSANE_TOOL_PATH=\"$1\"\n>>> +\t\t\tIFS=: path= sep=\n>>> +\t\t\tset x $PATH\n>>> +\t\t\tshift\n>>> +\t\t\tfor elem\n>>> +\t\t\tdo\n>>> +\t\t\t\tcase \"$SANE_TOOL_PATH:$elem\" in\n>>> +\t\t\t\t(?*:/bin | ?*:/usr/bin)\n>>> +\t\t\t\t\tpath=\"$path$sep$SANE_TOOL_PATH\"\n>>> +\t\t\t\t\tsep=:\n>>> +\t\t\t\t\tSANE_TOOL_PATH=\n>>> +\t\t\t\tesac\n>>> +\t\t\t\tpath=\"$path$sep$elem\"\n>>> +\t\t\t\tsep=:\n>>> +\t\t\tdone\n>>> +\t\t\techo \"$path\"\n>>> +\t\t)\n>>> +\t\t;;\n>>> +\tesac\n>>> +}\n>> Wow. That _is_ ugly, but it actually addresses exactly both my concern\n>> and Brandon's. I kind of like it.\n>>\n>> -Peff\n> \n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"}]}