[PATCH] configure: add --without-api-docs option
[notmuch-archives.git] / 07 / 566d58ed3de905acd5a6093cb7b2a5852125aa
1 Return-Path: <david@tethera.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 3410D431FBD\r
6         for <notmuch@notmuchmail.org>; Sat, 25 Jan 2014 16:55:53 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id JwRrVQn2cr4p for <notmuch@notmuchmail.org>;\r
16         Sat, 25 Jan 2014 16:55:47 -0800 (PST)\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
18         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 13197431FBC\r
21         for <notmuch@notmuchmail.org>; Sat, 25 Jan 2014 16:55:47 -0800 (PST)\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
23         (envelope-from <david@tethera.net>)\r
24         id 1W7E0h-0005FY-6B; Sat, 25 Jan 2014 20:55:39 -0400\r
25 Received: (nullmailer pid 24358 invoked by uid 1000); Sun, 26 Jan 2014\r
26         00:55:35 -0000\r
27 From: David Bremner <david@tethera.net>\r
28 To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
29 Subject: Re: [RFC PATCH] configure: check for POSIX.1-2008 realpath(3)\r
30         implementation.\r
31 In-Reply-To: <1390687142-16401-1-git-send-email-tomi.ollila@iki.fi>\r
32 References: <1390687142-16401-1-git-send-email-tomi.ollila@iki.fi>\r
33 User-Agent: Notmuch/0.17+42~gb867564 (http://notmuchmail.org) Emacs/24.3.1\r
34         (x86_64-pc-linux-gnu)\r
35 Date: Sat, 25 Jan 2014 20:55:35 -0400\r
36 Message-ID: <871tzvo92w.fsf@zancas.localnet>\r
37 MIME-Version: 1.0\r
38 Content-Type: text/plain\r
39 Cc: tomi.ollila@iki.fi\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\r
43 List-Id: "Use and development of the notmuch mail system."\r
44         <notmuch.notmuchmail.org>\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
48 List-Post: <mailto:notmuch@notmuchmail.org>\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
52 X-List-Received-Date: Sun, 26 Jan 2014 00:55:53 -0000\r
53 \r
54 Tomi Ollila <tomi.ollila@iki.fi> writes:\r
55 > +#if POSIX_2008_REALPATH\r
56 >      filename = realpath (config->filename, NULL);\r
57 > +#else\r
58 > +    /* compatibility with minor effort, not elegance, is the ruling factor\r
59 > +       in these (two) else branches... */\r
60 > +    char resolved_path[PATH_MAX];\r
61 > +    filename = realpath (config->filename, resolved_path);\r
62 > +#endif\r
63 >      if (! filename) {\r
64 >       if (errno == ENOENT) {\r
65 > +#if POSIX_2008_REALPATH\r
66 >           filename = strdup (config->filename);\r
67 > +#else\r
68 > +         /* ... this is the other else... */\r
69 > +         resolved_path[sizeof resolved_path - 1] = '\0';\r
70 > +         strncpy(resolved_path, config->filename, sizeof resolved_path);\r
71 > +         /* "faking" out of memory in case path too long -- close enough? */\r
72 > +         filename = resolved_path[sizeof resolved_path - 1]?\r
73 > +             resolved_path: NULL;\r
74 > +#endif\r
75 \r
76 I worry a bit about making the mainline code messier and harder to maintain, in order to\r
77 accomodate an unknown number of targets without POSIX2008 realpath. Do\r
78 we know how widespread this problem is? Is it just NetBSD?\r
79 \r
80 I looked at borrowing realpath from gnulib; it looks like it would be a\r
81 bit of work as the least complicated version includes 3 other include\r
82 files. But then the mainline code could be blisfully ignorant of the\r
83 whole dispute.\r
84 \r
85 d\r
86 \r