[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / e3 / 1d633dabf098cb86b909a2f91f48fe89a2d28c
1 Return-Path: <xico@atelo.org>\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 37A48431FC2\r
6         for <notmuch@notmuchmail.org>; Tue,  6 May 2014 12:59:49 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.001\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.001 tagged_above=-999 required=5\r
12         tests=[UNPARSEABLE_RELAY=0.001] 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 KrOD6dt+-G2j for <notmuch@notmuchmail.org>;\r
16         Tue,  6 May 2014 12:59:42 -0700 (PDT)\r
17 Received: from mail.atelo.org (atelo.org [192.95.27.91])\r
18         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 01CDE431FAF\r
21         for <notmuch@notmuchmail.org>; Tue,  6 May 2014 12:59:41 -0700 (PDT)\r
22 Received: from coyotlan.Tlalpan (ovo.atelo.org [192.168.1.7]);\r
23         by mail.atelo.org (OpenSMTPD) with ESMTP id e2586fe2;\r
24         for <notmuch@notmuchmail.org>; Tue, 6 May 2014 19:59:21 +0000 (UTC)\r
25 Received: from localhost (1001@localhost [local]);\r
26         by localhost (OpenSMTPD) with ESMTPA id efec25c4;\r
27         for <notmuch@notmuchmail.org>; Tue, 6 May 2014 12:59:39 -0700 (PDT)\r
28 Date: Tue, 6 May 2014 12:59:39 -0700\r
29 From: =?utf-8?B?WMSrY8Oy?= <xico@atelo.org>\r
30 To: notmuch@notmuchmail.org\r
31 Subject: Linux-only fdatasync() in 3c13bc\r
32 Message-ID: <20140506195938.GA18213@coyotlan.Tlalpan>\r
33 MIME-Version: 1.0\r
34 Content-Type: multipart/mixed; boundary="k1lZvvs/B4yU6o8G"\r
35 Content-Disposition: inline\r
36 Content-Transfer-Encoding: 8bit\r
37 User-Agent: Mutt/1.5.23 (2014-03-12)\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Tue, 06 May 2014 19:59:49 -0000\r
51 \r
52 \r
53 --k1lZvvs/B4yU6o8G\r
54 Content-Type: text/plain; charset=utf-8\r
55 Content-Disposition: inline\r
56 Content-Transfer-Encoding: 8bit\r
57 \r
58 Also, commit 3c13bc introduced a call to fdatasync() which is not\r
59 available on FreeBSD, and probably not either on MacOS at least.\r
60 \r
61 Best,\r
62 \r
63 --\r
64 Xīcò\r
65 \r
66 --k1lZvvs/B4yU6o8G\r
67 Content-Type: text/x-diff; charset=us-ascii\r
68 Content-Disposition: attachment;\r
69  filename="0002-Compatibility-for-Linux-s-fdatasync.patch"\r
70 \r
71 >From e2b9520e69e52b35348d07eb53a6a88d1397fa3f Mon Sep 17 00:00:00 2001\r
72 From: =?UTF-8?q?X=C4=ABc=C3=B2?= <xico@atelo.org>\r
73 Date: Tue, 6 May 2014 12:56:03 -0700\r
74 Subject: [PATCH 1/1] =?UTF-8?q?Compatibility=20for=20Linux=E2=80=99s=20fda?=\r
75  =?UTF-8?q?tasync().?=\r
76 MIME-Version: 1.0\r
77 Content-Type: text/plain; charset=UTF-8\r
78 Content-Transfer-Encoding: 8bit\r
79 \r
80 ---\r
81  configure      | 7 +++++++\r
82  notmuch-dump.c | 4 ++++\r
83  2 files changed, 11 insertions(+)\r
84 \r
85 diff --git a/configure b/configure\r
86 index 7204812..7bc602d 100755\r
87 --- a/configure\r
88 +++ b/configure\r
89 @@ -271,6 +271,7 @@ EOF\r
90  errors=0\r
91  \r
92  libdir_in_ldconfig=0\r
93 +have_fdatasync=0\r
94  \r
95  printf "Checking which platform we are on... "\r
96  uname=`uname`\r
97 @@ -294,6 +295,7 @@ elif [ $uname = "Linux" ] || [ $uname = "GNU" ] ; then\r
98      printf "$uname\n"\r
99      platform="$uname"\r
100      linker_resolves_library_dependencies=1\r
101 +    have_fdatasync=1\r
102  \r
103      printf "Checking for $libdir_expanded in ldconfig... "\r
104      ldconfig_paths=$(/sbin/ldconfig -N -X -v 2>/dev/null | sed -n -e 's,^\(/.*\):\( (.*)\)\?$,\1,p')\r
105 @@ -859,6 +861,9 @@ HAVE_D_TYPE = ${have_d_type}\r
106  # Whether the Xapian version in use supports compaction\r
107  HAVE_XAPIAN_COMPACT = ${have_xapian_compact}\r
108  \r
109 +# Optimized fsync() on Linux\r
110 +HAVE_FDATASYNC = ${have_fdatasync}\r
111 +\r
112  # Whether the getpwuid_r function is standards-compliant\r
113  # (if not, then notmuch will #define _POSIX_PTHREAD_SEMANTICS\r
114  # to enable the standards-compliant version -- needed for Solaris)\r
115 @@ -926,6 +931,7 @@ CONFIGURE_CFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS)      \\\r
116                    -DSTD_GETPWUID=\$(STD_GETPWUID)                       \\\r
117                    -DSTD_ASCTIME=\$(STD_ASCTIME)                         \\\r
118                    -DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT)         \\\r
119 +                  -DHAVE_FDATASYNC=\$(HAVE_FDATASYNC)                   \\\r
120                    -DUTIL_BYTE_ORDER=\$(UTIL_BYTE_ORDER)\r
121  \r
122  CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS)    \\\r
123 @@ -939,6 +945,7 @@ CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS)    \\\r
124                      -DSTD_GETPWUID=\$(STD_GETPWUID)                     \\\r
125                      -DSTD_ASCTIME=\$(STD_ASCTIME)                       \\\r
126                      -DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT)       \\\r
127 +                    -DHAVE_FDATASYNC=\$(HAVE_FDATASYNC)                 \\\r
128                      -DUTIL_BYTE_ORDER=\$(UTIL_BYTE_ORDER)\r
129  \r
130  CONFIGURE_LDFLAGS =  \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(ZLIB_LDFLAGS) \$(XAPIAN_LDFLAGS)\r
131 diff --git a/notmuch-dump.c b/notmuch-dump.c\r
132 index 2849eab..86b275a 100644\r
133 --- a/notmuch-dump.c\r
134 +++ b/notmuch-dump.c\r
135 @@ -169,7 +169,11 @@ notmuch_database_dump (notmuch_database_t *notmuch,\r
136      }\r
137  \r
138      if (output_file_name) {\r
139 +#if HAVE_FDATASYNC\r
140         ret = fdatasync (outfd);\r
141 +#else\r
142 +       ret = fsync (outfd);\r
143 +#endif\r
144         if (ret) {\r
145             fprintf (stderr, "Error syncing %s to disk: %s\n",\r
146                      name_for_error, strerror (errno));\r
147 -- \r
148 1.9.2\r
149 \r
150 \r
151 --k1lZvvs/B4yU6o8G--\r