From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 1D544431FBC for ; Tue, 17 Nov 2009 22:04:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UO74-BodVXUw for ; Tue, 17 Nov 2009 22:04:16 -0800 (PST) Received: from mail-pz0-f197.google.com (mail-pz0-f197.google.com [209.85.222.197]) by olra.theworths.org (Postfix) with ESMTP id 03454431FAE for ; Tue, 17 Nov 2009 22:04:15 -0800 (PST) Received: by pzk35 with SMTP id 35so601314pzk.22 for ; Tue, 17 Nov 2009 22:04:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:subject :in-reply-to:references:date:message-id:mime-version:content-type :content-transfer-encoding; bh=K7hwaZwFTl9x5Nnf7sR6HBvmJ5Hy8CSXoIQ2VXG95dI=; b=v33IvTbqyUiADGv0eSg1EMHzTtT1rogTgwWcsh5Dy/2ZhIivZxTfqD7hfcFRKKu3Ja cPDWmQW59ecL1YAIP/Cf4KZ8si71jTgu4kOyOo+5RQcxmYFueR49X3CiS36JIwtCA+bR Fc9oU1kFD9aE7LU+70cIxCX8p/h5HwPxFBCno= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-type:content-transfer-encoding; b=fSJJmp+PTTd0PsEldkwJVRqOq39RGlYBNwPkZycPMsHt4apQJhfSC/CNoagje46uWc kzgt7qPKAWsOSuRiiqYBTfwGkeI+P45ObUmKfaJW44txIxQ2mv4CIB4+L0QamGvhWZVy xaqdg6yXkPDl7/hMcUS8I+H4rCAZ2sjMd3DZk= Received: by 10.114.3.15 with SMTP id 15mr1935536wac.181.1258524255404; Tue, 17 Nov 2009 22:04:15 -0800 (PST) Received: from fortitudo (70-36-144-85.dsl.dynamic.sonic.net [70.36.144.85]) by mx.google.com with ESMTPS id 22sm1771538pxi.14.2009.11.17.22.04.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 17 Nov 2009 22:04:14 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo.i-did-not-set--mail-host-address--so-tickle-me) id 7287 by fortitudo (DragonFly Mail Agent) Tue, 17 Nov 2009 21:45:36 -0800 From: Alexander Botero-Lowry To: Jjgod Jiang , notmuch@notmuchmail.org In-Reply-To: References: Date: Tue, 17 Nov 2009 21:45:36 -0800 Message-ID: <86einw2xof.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: Mac OS X/Darwin compatibility issues X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2009 06:04:17 -0000 On Wed, 18 Nov 2009 11:50:17 +0800, Jjgod Jiang wrote: > Hi, >=20 > When I tried to compile notmuch under Mac OS X 10.6, several issues > arisen: >=20 > 1. g++ reports 'warning: command line option "-Wmissing-declarations" > is valid for C/ObjC but not for C++' >=20 I got that too. I presume it's newly supported in GCC4.4? > 3. Several errors about missing GNU extensions like getline() and strndup= (): >=20 strndup from V8: char* strndup(char* str, size_t n) { // Stupid implementation of strndup since macos isn't born with // one. size_t len =3D strlen(str); if (len <=3D n) return StrDup(str); char* result =3D new char[n+1]; size_t i; for (i =3D 0; i <=3D n; i++) result[i] =3D str[i]; result[i] =3D '\0'; return result; } > warning: implicit declaration of function =E2=80=98getline=E2=80=99 > error: =E2=80=98strndup=E2=80=99 was not declared in this scope >=20 for getline do you mind trying #define _GNU_SOURCE 1 before #include in the offending files? The FreeBSD man pages mentions that as a way of enabling the GNU version of getline(). Alex