Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / f6 / 7c367bff1139d3d5dce45ebca59c645f473bae
1 Return-Path: <tomi.ollila@iki.fi>\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 AAAC1431FBD\r
6         for <notmuch@notmuchmail.org>; Sun, 26 Jan 2014 03:18:24 -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 ec3QXsHvpZx1 for <notmuch@notmuchmail.org>;\r
16         Sun, 26 Jan 2014 03:18:17 -0800 (PST)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 38286431FBC\r
19         for <notmuch@notmuchmail.org>; Sun, 26 Jan 2014 03:18:17 -0800 (PST)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id E3188100051;\r
22         Sun, 26 Jan 2014 13:18:12 +0200 (EET)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
25 Subject: Re: [RFC PATCH] configure: check for POSIX.1-2008 realpath(3)\r
26         implementation.\r
27 In-Reply-To: <871tzvo92w.fsf@zancas.localnet>\r
28 References: <1390687142-16401-1-git-send-email-tomi.ollila@iki.fi>\r
29         <871tzvo92w.fsf@zancas.localnet>\r
30 User-Agent: Notmuch/0.17+41~g8e7fabf (http://notmuchmail.org) Emacs/24.3.1\r
31         (x86_64-unknown-linux-gnu)\r
32 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
33         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
34         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
35 Date: Sun, 26 Jan 2014 13:18:12 +0200\r
36 Message-ID: <m2fvobuh3f.fsf@guru.guru-group.fi>\r
37 MIME-Version: 1.0\r
38 Content-Type: text/plain\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Sun, 26 Jan 2014 11:18:24 -0000\r
52 \r
53 On Sun, Jan 26 2014, David Bremner <david@tethera.net> wrote:\r
54 \r
55 > Tomi Ollila <tomi.ollila@iki.fi> writes:\r
56 >> +#if POSIX_2008_REALPATH\r
57 >>      filename = realpath (config->filename, NULL);\r
58 >> +#else\r
59 >> +    /* compatibility with minor effort, not elegance, is the ruling factor\r
60 >> +       in these (two) else branches... */\r
61 >> +    char resolved_path[PATH_MAX];\r
62 >> +    filename = realpath (config->filename, resolved_path);\r
63 >> +#endif\r
64 \r
65 \r
66 >\r
67 > I worry a bit about making the mainline code messier and harder to maintain, in order to\r
68 > accomodate an unknown number of targets without POSIX2008 realpath. Do\r
69 > we know how widespread this problem is? Is it just NetBSD?\r
70 >\r
71 > I looked at borrowing realpath from gnulib; it looks like it would be a\r
72 > bit of work as the least complicated version includes 3 other include\r
73 > files. But then the mainline code could be blisfully ignorant of the\r
74 > whole dispute.\r
75 \r
76 We could also create\r
77 \r
78 char * realpath2008 (const char * path, char * resolved_path)\r
79 {\r
80         if (resolved_path == NULL) {\r
81                 resolved_path = malloc (MAX_PATH);\r
82                 if (resolved_path == NULL)\r
83                         return NULL;\r
84         }\r
85         return realpath (path, resolved_path);\r
86 }\r
87         \r
88 And, in the case where NULL argument is accepted, \r
89 \r
90 #define realpath2008(path, resolved_path) realpath(path, resolved_path) \r
91 \r
92 (or an inline function to do the same)\r
93 \r
94 In this case one is not totally ignorant to the whole dispute -- but\r
95 on the other hand, developer should be savvy about the potential \r
96 issues using realpath() function, and this might just ring the bell...\r
97 \r
98 > d\r
99 \r
100 Tomi\r