Re: bug#6214: 23.1; json-read-string crashes emacs with long string
[notmuch-archives.git] / 2d / 8168e282b7e83f8a6f2fed4394cacd87700a49
1 Return-Path: <bgamari.foss@gmail.com>\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 2B2894048C8\r
6         for <notmuch@notmuchmail.org>; Thu, 11 Mar 2010 14:38:09 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.689\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.689 tagged_above=-999 required=5\r
12         tests=[AWL=-0.090, BAYES_00=-2.599] autolearn=ham\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 IUfQx3JDtlHa for <notmuch@notmuchmail.org>;\r
16         Thu, 11 Mar 2010 14:38:07 -0800 (PST)\r
17 Received: from mail-fx0-f212.google.com (mail-fx0-f212.google.com\r
18         [209.85.220.212])\r
19         by olra.theworths.org (Postfix) with ESMTP id A61274048C2\r
20         for <notmuch@notmuchmail.org>; Thu, 11 Mar 2010 14:38:07 -0800 (PST)\r
21 Received: by mail-fx0-f212.google.com with SMTP id 4so620571fxm.0\r
22         for <notmuch@notmuchmail.org>; Thu, 11 Mar 2010 14:38:05 -0800 (PST)\r
23 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
24         h=domainkey-signature:received:received:from:to:cc:subject:date\r
25         :message-id:x-mailer:in-reply-to:references;\r
26         bh=tkNz5YTfH3snmyKnlY+Fth+cU1IFgnLKxUEgSIEARQ4=;\r
27         b=BAw19LMmXnvf5DhlzAHIo0O0GeQe4/AaVXYi35AMonOA5lbp0W76T/6GB5s4bB3m/X\r
28         IlmgfB3jOqoGVD6Zh5Yhp3yabRSmqWS11Xw6gRyfdiTh9ZwPjkyFDjQAYqrUPFmgpjnl\r
29         p7Zu8JdSB6OdFraTHips9iBcCD+awMmtp9ykM=\r
30 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
31         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
32         b=cMCWlgltfgnxkLdRsE/yC3QwirQUs1ydLsWhtfJ3fHv6trcA3gNi3YtRylKwxzgs9K\r
33         fgMPCjXM3vP131qV1OJC3exEPhohfC2W1fNhJ8foq8X1qvC+UbfGq9b9Le3WnxG3rUNz\r
34         eRYf4qFkWO7MU4x/575tF8f81hRpmUuD4ikh4=\r
35 Received: by 10.87.62.39 with SMTP id p39mr2945462fgk.9.1268347085531;\r
36         Thu, 11 Mar 2010 14:38:05 -0800 (PST)\r
37 Received: from localhost.localdomain (physnat56.physics.umass.edu\r
38         [128.119.50.56])\r
39         by mx.google.com with ESMTPS id 13sm463034fxm.10.2010.03.11.14.38.03\r
40         (version=SSLv3 cipher=RC4-MD5); Thu, 11 Mar 2010 14:38:04 -0800 (PST)\r
41 From: Ben Gamari <bgamari.foss@gmail.com>\r
42 To: notmuch <notmuch@notmuchmail.org>\r
43 Date: Thu, 11 Mar 2010 17:37:52 -0500\r
44 Message-Id: <1268347072-2050-2-git-send-email-bgamari.foss@gmail.com>\r
45 X-Mailer: git-send-email 1.7.0.2\r
46 In-Reply-To: <1268347072-2050-1-git-send-email-bgamari.foss@gmail.com>\r
47 References: <1268347072-2050-1-git-send-email-bgamari.foss@gmail.com>\r
48 Subject: [notmuch] [PATCH] Build and link against notmuch shared library\r
49 X-BeenThere: notmuch@notmuchmail.org\r
50 X-Mailman-Version: 2.1.13\r
51 Precedence: list\r
52 List-Id: "Use and development of the notmuch mail system."\r
53         <notmuch.notmuchmail.org>\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
57 List-Post: <mailto:notmuch@notmuchmail.org>\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
61 X-List-Received-Date: Thu, 11 Mar 2010 22:38:09 -0000\r
62 \r
63 ---\r
64  .gitignore         |    1 +\r
65  Makefile           |    1 +\r
66  Makefile.local     |    9 ++++++---\r
67  lib/Makefile.local |   11 ++++++-----\r
68  4 files changed, 14 insertions(+), 8 deletions(-)\r
69 \r
70 diff --git a/.gitignore b/.gitignore\r
71 index efa98fb..daf8094 100644\r
72 --- a/.gitignore\r
73 +++ b/.gitignore\r
74 @@ -5,6 +5,7 @@ tags\r
75  .deps\r
76  notmuch\r
77  notmuch.1.gz\r
78 +libnotmuch.so*\r
79  *.[ao]\r
80  *~\r
81  .*.swp\r
82 diff --git a/Makefile b/Makefile\r
83 index 46f001c..80eedd0 100644\r
84 --- a/Makefile\r
85 +++ b/Makefile\r
86 @@ -1,3 +1,4 @@\r
87 +SONAME = libnotmuch.so.1\r
88  WARN_CXXFLAGS=-Wall -Wextra -Wwrite-strings -Wswitch-enum\r
89  WARN_CFLAGS=$(WARN_CXXFLAGS) -Wmissing-declarations\r
90  \r
91 diff --git a/Makefile.local b/Makefile.local\r
92 index 3c2a629..38cecd1 100644\r
93 --- a/Makefile.local\r
94 +++ b/Makefile.local\r
95 @@ -20,18 +20,21 @@ notmuch_client_srcs =               \\r
96         json.c\r
97  \r
98  notmuch_client_modules = $(notmuch_client_srcs:.c=.o)\r
99 -notmuch: $(notmuch_client_modules) lib/notmuch.a\r
100 -       $(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -o $@\r
101 +notmuch: $(notmuch_client_modules) lib/libnotmuch.so\r
102 +       $(call quiet,CC,$(LDFLAGS)) -Llib -lnotmuch $(filter-out lib/libnotmuch.so,$^) $(FINAL_LDFLAGS) -o $@\r
103  \r
104  notmuch.1.gz: notmuch.1\r
105         $(call quiet,gzip) --stdout $^ > $@\r
106  \r
107  install: all notmuch.1.gz\r
108 -       for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 ; \\r
109 +       for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \\r
110 +               $(DESTDIR)$(prefix)/lib/ ; \\r
111         do \\r
112                 install -d $$d ; \\r
113         done ;\r
114         install notmuch $(DESTDIR)$(prefix)/bin/\r
115 +       install lib/$(SONAME) $(DESTDIR)$(prefix)/lib/\r
116 +       ln -sf $(SONAME) $(DESTDIR)$(prefix)/lib/libnotmuch.so\r
117         install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/\r
118  ifeq ($(MAKECMDGOALS), install)\r
119         @echo ""\r
120 diff --git a/lib/Makefile.local b/lib/Makefile.local\r
121 index 495b27e..a6462ae 100644\r
122 --- a/lib/Makefile.local\r
123 +++ b/lib/Makefile.local\r
124 @@ -1,5 +1,5 @@\r
125 -dir := lib\r
126 -extra_cflags += -I$(dir)\r
127 +dir=lib\r
128 +extra_cflags += -I$(dir) -fPIC\r
129  \r
130  libnotmuch_c_srcs =            \\r
131         $(dir)/libsha1.c        \\r
132 @@ -18,8 +18,9 @@ libnotmuch_cxx_srcs =         \\r
133         $(dir)/thread.cc\r
134  \r
135  libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o)\r
136 -$(dir)/notmuch.a: $(libnotmuch_modules)\r
137 -       $(call quiet,AR) rcs $@ $^\r
138 +$(dir)/libnotmuch.so : $(libnotmuch_modules)\r
139 +       $(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -shared -Wl,-soname=$(SONAME) -o $@\r
140 +       ln -sf $(SONAME) $@\r
141  \r
142  SRCS  := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)\r
143 -CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/notmuch.a\r
144 +CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/libnotmuch.so *.so\r
145 -- \r
146 1.7.0.2\r
147 \r