From: David Bremner <bremner@unb.ca>
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>, notmuch@notmuchmail.org
Subject: Re: hiding xapian symbols
Date: Tue, 21 Jun 2011 23:57:42 -0300 [thread overview]
Message-ID: <87tybir2s9.fsf@zancas.localnet> (raw)
In-Reply-To: <4E014DDB.20001@fifthhorseman.net>
On Tue, 21 Jun 2011 22:05:15 -0400, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:
> However, i'm concerned that the act of hiding these symbols will make it
> so that any program that tries to link both libnotmuch and libxapian
> will be unable to use these symbols.
>
> This makes me think that a program that links against libnotmuch and
> libxapian, but actually tries to *use* libxapian's exception handling
> may have a problem.
>
This seems to work, when compiled "g++ foo.c -lnotmuch -lxapian"
I get
,----
| Error opening database at /nonexistant/.notmuch: No such file or directory
| caught Cannot create directory `/nonexistant'
`----
don't run it as root ;)
#include <stdio.h>
#include <xapian.h>
#include <notmuch.h>
main (int argc, char **argv){
notmuch_database_t *notmuch
= notmuch_database_open ("/nonexistant",
NOTMUCH_DATABASE_MODE_READ_ONLY);
try{
(void)new Xapian::WritableDatabase ("/nonexistant",
Xapian::DB_CREATE_OR_OPEN);
} catch (const Xapian::Error &error) {
printf("caught %s\n",error.get_msg().c_str());
}
}
next prev parent reply other threads:[~2011-06-22 2:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-22 1:08 david
2011-06-22 1:08 ` [PATCH 1/2] libnotmuch: add linker script to declare only notmuch_* symbols as global david
2011-06-22 1:08 ` [PATCH 2/2] remove Xapian exceptions symbols from libnotmuch1.symbols david
2011-06-22 2:05 ` hiding xapian symbols Daniel Kahn Gillmor
2011-06-22 2:57 ` David Bremner [this message]
2011-06-22 12:02 ` [PATCH] tests: add a test for symbol hiding side effects david
2011-06-23 10:24 ` David Bremner
2011-06-23 22:26 ` Carl Worth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tybir2s9.fsf@zancas.localnet \
--to=bremner@unb.ca \
--cc=dkg@fifthhorseman.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).