]> git.notmuchmail.org Git - notmuch/blob - test/emacs-show.expected-output/notmuch-show-multipart-alternative
emacs: Add new option notmuch-search-hide-excluded
[notmuch] / test / emacs-show.expected-output / notmuch-show-multipart-alternative
1 Alex Botero-Lowry <alex.boterolowry@gmail.com> (2009-11-17) (attachment inbox)
2 Subject: [notmuch] preliminary FreeBSD support
3 To: notmuch@notmuchmail.org
4 Date: Tue, 17 Nov 2009 11:36:14 -0800
5
6 [ multipart/mixed ]
7 [ multipart/alternative ]
8 [ text/plain ]
9 I saw the announcement this morning, and was very excited, as I had been
10 hoping sup would be turned into a library,
11 since I like the concept more than the UI (I'd rather an emacs interface).
12
13 I did a preliminary compile which worked out fine, but
14 sysconf(_SC_SC_GETPW_R_SIZE_MAX) returns -1 on
15 FreeBSD, so notmuch_config_open segfaulted.
16
17 Attached is a patch that supplies a default buffer size of 64 in cases where
18 -1 is returned.
19
20 http://www.opengroup.org/austin/docs/austin_328.txt - seems to indicate this
21 is acceptable behavior,
22 and
23 http://mail-index.netbsd.org/pkgsrc-bugs/2006/06/07/msg016808.htmlspecifically
24 uses 64 as the
25 buffer size.
26 [ text/html (hidden) ]
27 [ 0001-Deal-with-situation-where-sysconf-_SC_GETPW_R_SIZE_M.patch: application/octet-stream (as text/x-diff) ]
28 From e3bc4bbd7b9d0d086816ab5f8f2d6ffea1dd3ea4 Mon Sep 17 00:00:00 2001
29 From: Alexander Botero-Lowry <alex.boterolowry@gmail.com>
30 Date: Tue, 17 Nov 2009 11:30:39 -0800
31 Subject: [PATCH] Deal with situation where sysconf(_SC_GETPW_R_SIZE_MAX) returns -1
32
33 ---
34  notmuch-config.c |    2 ++
35  1 files changed, 2 insertions(+), 0 deletions(-)
36
37 diff --git a/notmuch-config.c b/notmuch-config.c
38 index 248149c..e7220d8 100644
39 --- a/notmuch-config.c
40 +++ b/notmuch-config.c
41 @@ -77,6 +77,7 @@ static char *
42  get_name_from_passwd_file (void *ctx)
43  {
44      long pw_buf_size = sysconf(_SC_GETPW_R_SIZE_MAX);
45 +    if (pw_buf_size == -1) pw_buf_size = 64;
46      char *pw_buf = talloc_zero_size (ctx, pw_buf_size);
47      struct passwd passwd, *ignored;
48      char *name;
49 @@ -101,6 +102,7 @@ static char *
50  get_username_from_passwd_file (void *ctx)
51  {
52      long pw_buf_size = sysconf(_SC_GETPW_R_SIZE_MAX);
53 +    if (pw_buf_size == -1) pw_buf_size = 64;
54      char *pw_buf = talloc_zero_size (ctx, pw_buf_size);
55      struct passwd passwd, *ignored;
56      char *name;
57 -- 
58 1.6.5.2
59
60 [ text/plain ]
61 [ 4-line signature. Click/Enter to show. ]
62  Carl Worth <cworth@cworth.org> (2009-11-17) (inbox unread)