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 724FA431FC2; Sun, 22 Nov 2009 17:19:43 -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 ESKYxyq0xhwh; Sun, 22 Nov 2009 17:19:42 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 6CD4C431FBC; Sun, 22 Nov 2009 17:19:42 -0800 (PST) From: Carl Worth To: Jjgod Jiang , Alexander Botero-Lowry In-Reply-To: References: <1258859256-33197-1-git-send-email-gzjjgod@gmail.com> <86pr7b9os2.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> Date: Mon, 23 Nov 2009 02:19:28 +0100 Message-ID: <87bpiughr3.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] Mac OS X compatibility fixes 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: Mon, 23 Nov 2009 01:19:43 -0000 On Sun, 22 Nov 2009 12:31:53 +0800, Jjgod Jiang wrote: > On Sun, Nov 22, 2009 at 12:17 PM, Alexander Botero-Lowry > > The problem is that notmuch does not have a fully functional configure > process yet, Carl did mention Makefile.local, but it seems this file is > not generated by configure right now. (No config.h either.) We do now have Makefile.config being generated, (and we can move to config.h to avoid the overly-long command-line problem if necessary). > I will be happy to fix my patch if such facility (like > AC_CHECK_FUNCS([getline])) exists. Chris, do you want to tackle this one? ;-) A really easy hack would be to detect glibc, and if present, use all the existing code in notmuch. If not present, then use all the compatibility functions. This could be by building a notmuch-compat.c that defines functions like _notmuch_strndup() and then adding thins like: #define strndup _notmuch_strndup. That would allow our current configure script to stay quite simple. If people want more sophistication we could write functions in the configuration script for doing test compiles to find functions, etc. -Carl