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

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

Date: Sat, 04 Jan 2014 09:18:15 -0400

To: Thomas Klausner, notmuch@notmuchmail.org

Cc:

From: David Bremner


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)?

>      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.

> +	    strcpy(filename, config->filename);

Any reason not to use strncpy 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.

cheers,

d


[1]: http://pubs.opengroup.org/onlinepubs/9699919799/ 
[2]: http://notmuchmail.org/contributing/

Thread: