Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 6FDAB4196F0 for ; Tue, 27 Apr 2010 10:27:02 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.5 X-Spam-Level: X-Spam-Status: No, score=-0.5 tagged_above=-999 required=5 tests=[BAYES_05=-0.5] autolearn=ham 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 095og+YiUl4H for ; Tue, 27 Apr 2010 10:26:59 -0700 (PDT) Received: from scotch.caurea.org (ks311007.kimsufi.com [188.165.197.188]) by olra.theworths.org (Postfix) with ESMTP id AEBBB431FC1 for ; Tue, 27 Apr 2010 10:26:59 -0700 (PDT) Received: by scotch.caurea.org (Postfix, from userid 101) id C09911316C1; Tue, 27 Apr 2010 19:27:18 +0200 (CEST) From: Tomas Carnecky To: notmuch@notmuchmail.org Subject: [PATCH] Wrap the compat header in extern "C" { } when compiling C++ sources Date: Tue, 27 Apr 2010 19:27:17 +0200 Message-Id: <1272389237-16257-1-git-send-email-tom@dbservice.com> X-Mailer: git-send-email 1.7.0.5 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Tue, 27 Apr 2010 17:27:02 -0000 This fixes a build error on OpenSolaris where the final liking of notmuch fails because the linker can't find strcasestr() referenced from thread.cc. --- Is it safe to use NOTMUCH_BEGIN/END_DECLS in the compat header? The sha1 header also uses ifdef __cplusplus instead of that define.. compat/compat.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/compat/compat.h b/compat/compat.h index 173ef68..7767fe8 100644 --- a/compat/compat.h +++ b/compat/compat.h @@ -26,6 +26,10 @@ #ifndef NOTMUCH_COMPAT_H #define NOTMUCH_COMPAT_H +#ifdef __cplusplus +extern "C" { +#endif + #if !HAVE_GETLINE #include #include @@ -42,4 +46,8 @@ getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp); char* strcasestr(const char *haystack, const char *needle); #endif /* !HAVE_STRCASESTR */ +#ifdef __cplusplus +} +#endif + #endif /* NOTMUCH_COMPAT_H */ -- 1.7.0.5