unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Alexander Botero-Lowry <alex.boterolowry@gmail.com>
To: Jjgod Jiang <gzjjgod@gmail.com>, notmuch@notmuchmail.org
Subject: Re: Mac OS X/Darwin compatibility issues
Date: Tue, 17 Nov 2009 21:45:36 -0800	[thread overview]
Message-ID: <86einw2xof.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <ddd65cda0911171950o4eea4389v86de9525e46052d3@mail.gmail.com>

On Wed, 18 Nov 2009 11:50:17 +0800, Jjgod Jiang <gzjjgod@gmail.com> wrote:
> Hi,
> 
> When I tried to compile notmuch under Mac OS X 10.6, several issues
> arisen:
> 
> 1. g++ reports 'warning: command line option "-Wmissing-declarations"
> is valid for C/ObjC but not for C++'
> 
I got that too. I presume it's newly supported in GCC4.4?

> 3. Several errors about missing GNU extensions like getline() and strndup():
> 
strndup from V8:

char* strndup(char* str, size_t n) {
  // Stupid implementation of strndup since macos isn't born with
  // one.
  size_t len = strlen(str);
  if (len <= n)
    return StrDup(str);
  char* result = new char[n+1];
  size_t i;
  for (i = 0; i <= n; i++)
    result[i] = str[i];
  result[i] = '\0';
  return result;
}

> warning: implicit declaration of function ‘getline’
> error: ‘strndup’ was not declared in this scope
> 
for getline do you mind trying #define _GNU_SOURCE 1
before #include <stdio.h> in the offending files? The FreeBSD man pages
mentions that as a way of enabling the GNU version of getline().

Alex

  reply	other threads:[~2009-11-18  6:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-18  3:50 Mac OS X/Darwin compatibility issues Jjgod Jiang
2009-11-18  5:45 ` Alexander Botero-Lowry [this message]
2009-11-18  6:14   ` Jjgod Jiang
2009-11-18  6:19     ` Alexander Botero-Lowry
2009-11-18 22:27 ` Carl Worth
2009-11-18 23:45   ` Stewart Smith
2009-11-19  0:24     ` Alexander Botero-Lowry
2009-11-19  5:42       ` Stewart Smith
2009-11-19 11:34         ` Carl Worth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86einw2xof.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me \
    --to=alex.boterolowry@gmail.com \
    --cc=gzjjgod@gmail.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).