]> git.notmuchmail.org Git - notmuch/blob - test/corpus/cur/34:2,
test: Move corpus emails into maildir directory structure
[notmuch] / test / corpus / cur / 34:2,
1 From: "Alexander Botero-Lowry" <alex.boterolowry@gmail.com>
2 To: notmuch@notmuchmail.org
3 Date: Tue, 17 Nov 2009 21:45:36 -0800
4 Subject: [notmuch] Mac OS X/Darwin compatibility issues
5 In-Reply-To: <ddd65cda0911171950o4eea4389v86de9525e46052d3@mail.gmail.com>
6 References: <ddd65cda0911171950o4eea4389v86de9525e46052d3@mail.gmail.com>
7 Message-ID: <86einw2xof.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me>
8
9 On Wed, 18 Nov 2009 11:50:17 +0800, Jjgod Jiang <gzjjgod at gmail.com> wrote:
10 > Hi,
11
12 > When I tried to compile notmuch under Mac OS X 10.6, several issues
13 > arisen:
14
15 > 1. g++ reports 'warning: command line option "-Wmissing-declarations"
16 > is valid for C/ObjC but not for C++'
17
18 I got that too. I presume it's newly supported in GCC4.4?
19
20 > 3. Several errors about missing GNU extensions like getline() and strndup():
21
22 strndup from V8:
23
24 char* strndup(char* str, size_t n) {
25   // Stupid implementation of strndup since macos isn't born with
26   // one.
27   size_t len = strlen(str);
28   if (len <= n)
29     return StrDup(str);
30   char* result = new char[n+1];
31   size_t i;
32   for (i = 0; i <= n; i++)
33     result[i] = str[i];
34   result[i] = '\0';
35   return result;
36 }
37
38 > warning: implicit declaration of function ?getline?
39 > error: ?strndup? was not declared in this scope
40
41 for getline do you mind trying #define _GNU_SOURCE 1
42 before #include <stdio.h> in the offending files? The FreeBSD man pages
43 mentions that as a way of enabling the GNU version of getline().
44
45 Alex
46