Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 24 / 1cec957213a3e601ed88880076f2b0c1e54d59
1 Return-Path: <bremner@tethera.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 1C4B5431FD0\r
6         for <notmuch@notmuchmail.org>; Sat, 16 Jul 2011 18:29:31 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id EZ4hcQr54yWQ for <notmuch@notmuchmail.org>;\r
16         Sat, 16 Jul 2011 18:29:30 -0700 (PDT)\r
17 Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21])\r
18         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 58D01431FB6\r
21         for <notmuch@notmuchmail.org>; Sat, 16 Jul 2011 18:29:30 -0700 (PDT)\r
22 Received: from zancas.localnet\r
23         (fctnnbsc30w-142167167212.pppoe-dynamic.High-Speed.nb.bellaliant.net\r
24         [142.167.167.212]) (authenticated bits=0)\r
25         by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id p6H1TImx008388\r
26         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);\r
27         Sat, 16 Jul 2011 22:29:20 -0300\r
28 Received: from bremner by zancas.localnet with local (Exim 4.76)\r
29         (envelope-from <bremner@tethera.net>)\r
30         id 1QiGAY-0005Cv-Cq; Sat, 16 Jul 2011 22:29:18 -0300\r
31 From: david@tethera.net\r
32 To: notmuch@notmuchmail.org\r
33 Subject: [PATCH] libnotmuch: export Xapian typeinfo symbols\r
34 Date: Sat, 16 Jul 2011 22:29:12 -0300\r
35 Message-Id: <1310866152-19984-1-git-send-email-david@tethera.net>\r
36 X-Mailer: git-send-email 1.7.5.4\r
37 In-Reply-To: <1310848468-27665-2-git-send-email-david@tethera.net>\r
38 References: <1310848468-27665-2-git-send-email-david@tethera.net>\r
39 Cc: David Bremner <bremner@debian.org>\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\r
43 List-Id: "Use and development of the notmuch mail system."\r
44         <notmuch.notmuchmail.org>\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
48 List-Post: <mailto:notmuch@notmuchmail.org>\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
52 X-List-Received-Date: Sun, 17 Jul 2011 01:29:31 -0000\r
53 \r
54 From: David Bremner <bremner@debian.org>\r
55 \r
56 The lack of such exporting seems to cause problems catching\r
57 exceptions, as suggested by\r
58 \r
59     http://gcc.gnu.org/wiki/Visibility\r
60 \r
61 This manifested in the symbol-hiding test failing when notmuch was\r
62 compile with gcc 4.4.5. On i386, this further manifested as notmuch\r
63 new failing to run (crashing with an uncaught exception on first run).\r
64 ---\r
65 \r
66 In this revised version, the needed typinfo symbols are computed at\r
67 build time.\r
68 \r
69  lib/Makefile.local        |    4 +---\r
70  lib/gen-version-script.sh |   27 +++++++++++++++++++++++++++\r
71  2 files changed, 28 insertions(+), 3 deletions(-)\r
72  create mode 100644 lib/gen-version-script.sh\r
73 \r
74 diff --git a/lib/Makefile.local b/lib/Makefile.local\r
75 index 7e2bc87..a6076ab 100644\r
76 --- a/lib/Makefile.local\r
77 +++ b/lib/Makefile.local\r
78 @@ -76,9 +76,7 @@ $(dir)/$(LIBNAME): $(libnotmuch_modules) notmuch.sym\r
79         $(call quiet,CXX $(CXXFLAGS)) $(libnotmuch_modules) $(FINAL_LIBNOTMUCH_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@\r
80  \r
81  notmuch.sym: lib/notmuch.h\r
82 -       printf "{\nglobal:\n" > notmuch.sym\r
83 -       sed  -n 's/^\s*\(notmuch_[a-z_]*\)\s*(.*/\t\1;/p' $< >> notmuch.sym\r
84 -       printf "local: *;\n};\n" >> notmuch.sym\r
85 +       sh lib/gen-version-script.sh $< $(libnotmuch_modules) > $@\r
86  \r
87  $(dir)/$(SONAME): $(dir)/$(LIBNAME)\r
88         ln -sf $(LIBNAME) $@\r
89 diff --git a/lib/gen-version-script.sh b/lib/gen-version-script.sh\r
90 new file mode 100644\r
91 index 0000000..e753eaf\r
92 --- /dev/null\r
93 +++ b/lib/gen-version-script.sh\r
94 @@ -0,0 +1,27 @@\r
95 +\r
96 +# we go through a bit of work to get the unmangled names of the\r
97 +# typeinfo symbols because of\r
98 +# http://sourceware.org/bugzilla/show_bug.cgi?id=10326\r
99 +\r
100 +if [ $# -lt 2 ]; then\r
101 +    echo Usage: $0 header obj1 obj2 obj3\r
102 +    exit 1;\r
103 +fi\r
104 +\r
105 +HEADER=$1\r
106 +shift\r
107 +\r
108 +printf '{\nglobal:\n'\r
109 +nm --defined $* | awk '$3 ~ "Xapian.*Error" {print $3}' | sort | uniq | \\r
110 +while read sym; do\r
111 +    demangled=$(c++filt $sym)\r
112 +    case $demangled in\r
113 +       typeinfo*) \r
114 +           printf "\t$sym;\n"\r
115 +           ;;\r
116 +       *)\r
117 +           ;;\r
118 +    esac\r
119 +done\r
120 +sed  -n 's/^\s*\(notmuch_[a-z_]*\)\s*(.*/\t\1;/p' $HEADER\r
121 +printf "local: *;\n};\n"\r
122 -- \r
123 1.7.5.4\r
124 \r