1 Return-Path: <bremner@unb.ca>
\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 C4DFE431FD0
\r
6 for <notmuch@notmuchmail.org>; Tue, 21 Jun 2011 19:57:45 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 DqLXm9PPwJgu for <notmuch@notmuchmail.org>;
\r
16 Tue, 21 Jun 2011 19:57:45 -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 D2B95431FB6
\r
21 for <notmuch@notmuchmail.org>; Tue, 21 Jun 2011 19:57:44 -0700 (PDT)
\r
22 Received: from zancas.localnet
\r
23 (fctnnbsc30w-142167176081.pppoe-dynamic.High-Speed.nb.bellaliant.net
\r
24 [142.167.176.81]) (authenticated bits=0)
\r
25 by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id p5M2vgxn014083
\r
26 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);
\r
27 Tue, 21 Jun 2011 23:57:43 -0300
\r
28 Received: from bremner by zancas.localnet with local (Exim 4.76)
\r
29 (envelope-from <bremner@unb.ca>)
\r
30 id 1QZDdO-0007I5-1J; Tue, 21 Jun 2011 23:57:42 -0300
\r
31 From: David Bremner <bremner@unb.ca>
\r
32 To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>, notmuch@notmuchmail.org
\r
33 Subject: Re: hiding xapian symbols
\r
34 In-Reply-To: <4E014DDB.20001@fifthhorseman.net>
\r
35 References: <1308704923-14748-1-git-send-email-david@tethera.net>
\r
36 <4E014DDB.20001@fifthhorseman.net>
\r
37 User-Agent: Notmuch/0.6~238 (http://notmuchmail.org) Emacs/23.3.1
\r
38 (x86_64-pc-linux-gnu)
\r
39 Date: Tue, 21 Jun 2011 23:57:42 -0300
\r
40 Message-ID: <87tybir2s9.fsf@zancas.localnet>
\r
42 Content-Type: text/plain; charset=us-ascii
\r
43 X-BeenThere: notmuch@notmuchmail.org
\r
44 X-Mailman-Version: 2.1.13
\r
46 List-Id: "Use and development of the notmuch mail system."
\r
47 <notmuch.notmuchmail.org>
\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
51 List-Post: <mailto:notmuch@notmuchmail.org>
\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
55 X-List-Received-Date: Wed, 22 Jun 2011 02:57:45 -0000
\r
57 On Tue, 21 Jun 2011 22:05:15 -0400, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:
\r
58 > However, i'm concerned that the act of hiding these symbols will make it
\r
59 > so that any program that tries to link both libnotmuch and libxapian
\r
60 > will be unable to use these symbols.
\r
62 > This makes me think that a program that links against libnotmuch and
\r
63 > libxapian, but actually tries to *use* libxapian's exception handling
\r
64 > may have a problem.
\r
67 This seems to work, when compiled "g++ foo.c -lnotmuch -lxapian"
\r
72 | Error opening database at /nonexistant/.notmuch: No such file or directory
\r
73 | caught Cannot create directory `/nonexistant'
\r
76 don't run it as root ;)
\r
80 #include <notmuch.h>
\r
81 main (int argc, char **argv){
\r
83 notmuch_database_t *notmuch
\r
84 = notmuch_database_open ("/nonexistant",
\r
85 NOTMUCH_DATABASE_MODE_READ_ONLY);
\r
88 (void)new Xapian::WritableDatabase ("/nonexistant",
\r
89 Xapian::DB_CREATE_OR_OPEN);
\r
90 } catch (const Xapian::Error &error) {
\r
91 printf("caught %s\n",error.get_msg().c_str());
\r