From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Tuexen Newsgroups: gmane.lisp.guile.devel Subject: Re: Guile on Mac OS X Date: Mon, 5 Aug 2002 09:44:52 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <39EBF59A-A847-11D6-912C-0030654C1AB6@lurchi.franken.de> References: <87n0s1yj27.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 (Apple Message framework v543) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1028533534 20092 127.0.0.1 (5 Aug 2002 07:45:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 5 Aug 2002 07:45:34 +0000 (UTC) Cc: guile-devel@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17bcYV-0005Dq-00 for ; Mon, 05 Aug 2002 09:45:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17bcZ2-0008RE-00; Mon, 05 Aug 2002 03:46:04 -0400 Original-Received: from ilsa.franken.de ([193.175.24.42]) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17bcY2-0008Jn-00 for ; Mon, 05 Aug 2002 03:45:02 -0400 Original-Received: from Powerbook.local. (pD9E4F816.dip.t-dialin.net [217.228.248.22]) by ilsa.franken.de (Postfix) with ESMTP id 260B924604; Mon, 5 Aug 2002 09:45:00 +0200 (CEST) Original-To: Rob Browning In-Reply-To: <87n0s1yj27.fsf@raven.i.defaultvalue.org> X-Mailer: Apple Mail (2.543) Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:976 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:976 Rob, see my comments below. Best regards Michael On Montag, Aug 5, 2002, at 07:24 Europe/Berlin, Rob Browning wrote: > Michael Tuexen writes: > >> ### GUILE_FUNC_DECLARED(function, headerfile) >> ### Check for a declaration of FUNCTION in HEADERFILE; if it is >> ### not there, #define MISSING_FUNCTION_DECL. >> AC_DEFUN(GUILE_FUNC_DECLARED, [ >> AC_CACHE_CHECK(for $1 declaration, guile_cv_func_$1_declared, >> AC_EGREP_HEADER($1, $2, >> guile_cv_func_$1_declared=yes, >> guile_cv_func_$1_declared=no)) >> if test [x$guile_cv_func_]$1[_declared] = xno; then >> AC_DEFINE([MISSING_]translit($1, [a-z], [A-Z])[_DECL]) >> fi >> ]) >> >> GUILE_FUNC_DECLARED(strptime, time.h) >> GUILE_FUNC_DECLARED(sleep, unistd.h) >> GUILE_FUNC_DECLARED(usleep, unistd.h) > > Looks like usleep and sleep are in unistd.h on (most?) platforms, but > on yours they're in time.h. > No, see the the following output (from an earlier e-mail): [Powerbook:~/guile-1.5.6] tuexen% grep strptime /usr/include/time.h char *strptime __P((const char *, const char *, struct tm *)); [Powerbook:~/guile-1.5.6] tuexen% grep sleep /usr/include/unistd.h unsigned int sleep __P((unsigned int)); int usleep __P((unsigned int)); [Powerbook:~/guile-1.5.6] tuexen% grep usleep /usr/include/unistd.h int usleep __P((unsigned int)); [Powerbook:~/guile-1.5.6] tuexen% They are in /usr/include/unistd.h. I have the impression that grep can find it but AC_EGREP_HEADER fails to find it. I have no idea why. For strptime everything works as expected. > Unfortunately GUILE_FUNC_DECLARED may not make it easy to test a > second location since it looks like if the function isn't found the > first time, it takes actions that wouldn't be undone by a later > successful test. > > One option would be to change GUILE_FUNC_DECLARED to allow multiple > headers like this: > > GUILE_FUNC_DECLARED([sleep], [unistd.h time.h]) > > or can m4, etc. handle ... args? > > GUILE_FUNC_DECLARED([sleep], [unistd.h], [time.h]) > > I'll look in to a solution of some kind unless someone else knows how > to write this up off the top of their head. > > Alternately I suppose we could use two functions, one to check a > header and one to call later to take action if none of the checks > succeeded: > > GUILE_CHECK_HEADER_FOR_FUNC([sleep], [unistd.h]) > GUILE_CHECK_HEADER_FOR_FUNC([sleep], [time.h]) > GUILE_CHECK_FOR_MISSING_FUNC_DECLARATION([sleep]) > > not a big deal to me either way. > We do not need this. > -- > Rob Browning > rlb @defaultvalue.org, @linuxdevel.com, and @debian.org > Previously @cs.utexas.edu > GPG=1C58 8B2C FB5E 3F64 EA5C 64AE 78FE E5FE F0CB A0AD > > -- Michael.Tuexen@micmac.franken.de _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel