Re: notmuch-0.16: realpath() compatibility issue; clang visibility problem

Subject: Re: notmuch-0.16: realpath() compatibility issue; clang visibility problem

Date: Sat, 4 Jan 2014 23:37:42 +0100

To: David Bremner

Cc: notmuch@notmuchmail.org

From: Thomas Klausner


On Sat, Jan 04, 2014 at 09:18:15AM -0400, David Bremner wrote:
> Thomas Klausner <tk@giga.or.at> writes:
> 
> >                                 ^
> > ./lib/notmuch-private.h:52:13: note: previous attribute is here
> > #pragma GCC visibility push(hidden)
> >             ^
> 
> The clang related issues might be fixed in 0.17; can you try that (or
> git master)?

Yes, 0.17 fixed that problem.

> >      size_t length;
> > -    char *data, *filename;
> > +    char *data, filename[MAXPATHLEN];
> >      GError *error = NULL;
> 
> I'm not sure what the right answer is here. MATHPATHLEN (and PATH_MAX)
> are not necessarily defined; in particular this would break
> compilation on GNU Hurd. Perhaps we should ship a compatibility
> implementation of a POSIX.1-2008 compatible [1] realpath. Or maybe
> realpath can be avoided completely here.

A compatibility implementation for POSIX.1-2008-realpath would be
great, as would be avoiding the call. Why is it necessary to resolve
$HOME here?

> > +	    strcpy(filename, config->filename);
> 
> Any reason not to use strncpy here?

You're right, that'd be better here.

> Of course bug reports and fixes in any form are always welcome, but even
> more appreciated if they roughly follow [2]; mainly patches from git
> with sensible commit messages, and some minor coding style issues.

Thanks for the comments,
 Thomas

Thread: