From: Thomas Klausner Date: Sat, 4 Jan 2014 22:37:42 +0000 (+0100) Subject: Re: notmuch-0.16: realpath() compatibility issue; clang visibility problem X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d21efd3143616b83b40aa3045fec47190d82ee1f;p=notmuch-archives.git Re: notmuch-0.16: realpath() compatibility issue; clang visibility problem --- diff --git a/fc/42d3ea18821aee9d644bc9af396c81db5d1bd4 b/fc/42d3ea18821aee9d644bc9af396c81db5d1bd4 new file mode 100644 index 000000000..17fc8a72f --- /dev/null +++ b/fc/42d3ea18821aee9d644bc9af396c81db5d1bd4 @@ -0,0 +1,90 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 60944431FC0 + for ; Sat, 4 Jan 2014 14:37:59 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 5NR1jNTL64Cd for ; + Sat, 4 Jan 2014 14:37:48 -0800 (PST) +Received: from danbala.ifoer.tuwien.ac.at (danbala.ifoer.tuwien.ac.at + [128.130.168.64]) + by olra.theworths.org (Postfix) with ESMTP id 79742431FBD + for ; Sat, 4 Jan 2014 14:37:48 -0800 (PST) +Received: by danbala.ifoer.tuwien.ac.at (Postfix, from userid 116) + id E7E2D390DA4; Sat, 4 Jan 2014 23:37:42 +0100 (CET) +Date: Sat, 4 Jan 2014 23:37:42 +0100 +From: Thomas Klausner +To: David Bremner +Subject: Re: notmuch-0.16: realpath() compatibility issue; clang visibility + problem +Message-ID: <20140104223742.GC16514@danbala.tuwien.ac.at> +References: <20140103214735.GG27614@danbala.tuwien.ac.at> + + <871u0nnaw8.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <871u0nnaw8.fsf@zancas.localnet> +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 04 Jan 2014 22:37:59 -0000 + +On Sat, Jan 04, 2014 at 09:18:15AM -0400, David Bremner wrote: +> Thomas Klausner 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