Re: [PATCH v2 07/10] gen-version-script: parse Solaris "nm" output (Solaris support)
authorBlake Jones <blakej@foo.net>
Thu, 8 Nov 2012 06:29:12 +0000 (22:29 +1600)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:50:26 +0000 (09:50 -0800)
e7/edbb67529dd124a790ea2eee252bfafedcf355 [new file with mode: 0644]

diff --git a/e7/edbb67529dd124a790ea2eee252bfafedcf355 b/e7/edbb67529dd124a790ea2eee252bfafedcf355
new file mode 100644 (file)
index 0000000..eb6f8a4
--- /dev/null
@@ -0,0 +1,92 @@
+Return-Path: <blakej@foo.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 47BC3431FB6\r
+       for <notmuch@notmuchmail.org>; Wed,  7 Nov 2012 22:29:19 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id VDqIFEl6R7m8 for <notmuch@notmuchmail.org>;\r
+       Wed,  7 Nov 2012 22:29:18 -0800 (PST)\r
+Received: from foo.net (70-36-235-136.dsl.static.sonic.net [70.36.235.136])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id AF088431FAE\r
+       for <notmuch@notmuchmail.org>; Wed,  7 Nov 2012 22:29:18 -0800 (PST)\r
+Received: from foo.net (localhost [127.0.0.1])\r
+       by foo.net (8.14.5+Sun/8.14.5) with ESMTP id qA86TCsD024583;\r
+       Wed, 7 Nov 2012 22:29:12 -0800 (PST)\r
+To: Tomi Ollila <tomi.ollila@iki.fi>\r
+Subject: Re: [PATCH v2 07/10] gen-version-script: parse Solaris "nm" output\r
+       (Solaris support) \r
+In-Reply-To: Your message of "Tue, 06 Nov 2012 18:58:50 +0200."\r
+       <m2sj8mzn05.fsf@guru.guru-group.fi> \r
+Date: Wed, 07 Nov 2012 22:29:12 -0800\r
+Message-ID: <24582.1352356152@foo.net>\r
+From: Blake Jones <blakej@foo.net>\r
+X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2\r
+       (foo.net [127.0.0.1]); Wed, 07 Nov 2012 22:29:12 -0800 (PST)\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 08 Nov 2012 06:29:20 -0000\r
+\r
+>> @@ -11,10 +12,44 @@ fi\r
+>>  HEADER=$1\r
+>>  shift\r
+>>  \r
+>> +if [ `uname -s` == SunOS ] ; then\r
+>> +    #\r
+>> +    # Using Solaris "nm", a defined symbol looks like this:\r
+>> +    #\r
+> \r
+> The POSIX / Bourne -comformant equality comparison is '='. \r
+\r
+Sigh, of course it is.  Fixed.\r
+\r
+> e.g.\r
+> \r
+> $ ./heirloom-sh/sh -c ' [ a == b ] || echo x'\r
+> ./heirloom-sh/sh: test: unknown operator ==\r
+> zsh: exit 1     ./heirloom-sh/sh -c ' [ a == b ] || echo x'\r
+> \r
+> Interesting that Solaris /bin/sh did not fail there...\r
+\r
+I was running on Solaris 11.1, which uses ksh93 as its /bin/sh.  You're\r
+absolutely right that Solaris 10 would fall over, though.\r
+\r
+Similarly, the following line:\r
+\r
+    demangled=$(demangle $sym)\r
+\r
+doesn't work on traditional sh.  I've replaced $() with ``.\r
+\r
+> Hmm, gen-version-script doesn't have shebang... it is run like:\r
+> \r
+> sh $(srcdir)/$(lib)/gen-version-script.sh $< $(libnotmuch_modules) > $@\r
+> \r
+> in lib/Makefile.local -- taking sh fron PATH.\r
+\r
+I updated the first line from the #! invocation to a comment saying\r
+\r
+    # This script is invoked via "sh .../gen-version-script.sh".\r
+\r
+Would a respun version of these patches help toward testing?\r
+\r
+Blake\r