From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: strptime prototype Date: Sun, 07 Mar 2004 09:07:01 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87brn960dm.fsf@zip.com.au> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1078968643 645 80.91.224.253 (11 Mar 2004 01:30:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Mar 2004 01:30:43 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Mar 11 02:30:36 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B1F1v-0000oK-00 for ; Thu, 11 Mar 2004 02:30:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B1EwB-0000iM-Qn for guile-devel@m.gmane.org; Wed, 10 Mar 2004 20:24:39 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1Azkte-0008IW-Fb for guile-devel@gnu.org; Sat, 06 Mar 2004 18:07:54 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1Azkt7-0008Du-4P for guile-devel@gnu.org; Sat, 06 Mar 2004 18:07:52 -0500 Original-Received: from [61.8.0.84] (helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.30) id 1Azkt6-0008Cg-6B for guile-devel@gnu.org; Sat, 06 Mar 2004 18:07:20 -0500 Original-Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87]) by mailout1.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i26N7DUe013276 for ; Sun, 7 Mar 2004 10:07:13 +1100 Original-Received: from localhost (ppp59.dyn248.pacific.net.au [203.143.248.59]) by mailproxy2.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i26N7BGf008060 for ; Sun, 7 Mar 2004 10:07:12 +1100 Original-Received: from gg by localhost with local (Exim 3.36 #1 (Debian)) id 1Azksq-0000iI-00; Sun, 07 Mar 2004 09:07:04 +1000 Original-To: guile-devel@gnu.org Mail-Copies-To: never User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3498 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3498 --=-=-= glibc has a prototype for strptime in time.h, but needs _GNU_SOURCE to give it. * stime.c: Define _GNU_SOURCE for strptime prototype from glibc. Use HAVE_DECL_STRPTIME for when to give own prototype. * configure.in (strptime): Use #define _GNU_SOURCE to get the prototype from glibc, use AC_CHECK_DECLS rather than AC_EGREP_HEADER. --=-=-= Content-Disposition: inline; filename=stime.c.strptime-decl.diff --- stime.c.~1.85.~ 2004-03-03 10:11:33.000000000 +1000 +++ stime.c 2004-03-07 09:04:24.000000000 +1000 @@ -18,6 +18,8 @@ +#define _GNU_SOURCE /* ask glibc for everything, in particular strptime */ + #if HAVE_CONFIG_H # include #endif @@ -65,7 +67,7 @@ # define tzname _tzname #endif -#ifdef MISSING_STRPTIME_DECL +#if ! HAVE_DECL_STRPTIME extern char *strptime (); #endif --=-=-= Content-Disposition: inline; filename=configure.in.strptime-decl.diff --- configure.in.~1.235.~ 2004-02-29 06:07:24.000000000 +1000 +++ configure.in 2004-03-03 10:29:40.000000000 +1000 @@ -649,10 +649,13 @@ fi ]) -GUILE_FUNC_DECLARED(strptime, time.h) GUILE_FUNC_DECLARED(sleep, unistd.h) GUILE_FUNC_DECLARED(usleep, unistd.h) +AC_CHECK_DECLS([strptime],,, +[#define _GNU_SOURCE +#include ]) + ### On some systems usleep has no return value. If it does have one, ### we'd like to return it; otherwise, we'll fake it. AC_CACHE_CHECK([return type of usleep], guile_cv_func_usleep_return_type, --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel --=-=-=--