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 12267431FC0 for ; Sat, 4 Jan 2014 05:18:35 -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 bR2E+QpzxqlK for ; Sat, 4 Jan 2014 05:18:27 -0800 (PST) Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 08E13431FBD for ; Sat, 4 Jan 2014 05:18:26 -0800 (PST) Received: from remotemail by yantan.tethera.net with local (Exim 4.80) (envelope-from ) id 1VzR7L-0005H9-RW; Sat, 04 Jan 2014 09:18:19 -0400 Received: (nullmailer pid 21265 invoked by uid 1000); Sat, 04 Jan 2014 13:18:15 -0000 From: David Bremner To: Thomas Klausner , notmuch@notmuchmail.org Subject: Re: notmuch-0.16: realpath() compatibility issue; clang visibility problem In-Reply-To: <20140103214735.GG27614@danbala.tuwien.ac.at> References: <20140103214735.GG27614@danbala.tuwien.ac.at> User-Agent: Notmuch/0.17 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Sat, 04 Jan 2014 09:18:15 -0400 Message-ID: <871u0nnaw8.fsf@zancas.localnet> MIME-Version: 1.0 Content-Type: text/plain 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 13:18:35 -0000 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)? > 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/