From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: Re: guile 1.8.5 solaris 10 sparc with gcc readdir_r problem ... Date: Wed, 20 Aug 2008 19:10:10 +0200 Message-ID: <87k5eby5n1.fsf@gnu.org> References: <48AA08BC.1040603@acm.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1219252332 25931 80.91.229.12 (20 Aug 2008 17:12:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Aug 2008 17:12:12 +0000 (UTC) To: bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Aug 20 19:13:04 2008 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KVrDU-0001Bk-Kg for guile-bugs@m.gmane.org; Wed, 20 Aug 2008 19:11:29 +0200 Original-Received: from localhost ([127.0.0.1]:40395 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVrCX-0000qT-7B for guile-bugs@m.gmane.org; Wed, 20 Aug 2008 13:10:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KVrCT-0000qN-DF for bug-guile@gnu.org; Wed, 20 Aug 2008 13:10:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KVrCR-0000nY-MB for bug-guile@gnu.org; Wed, 20 Aug 2008 13:10:24 -0400 Original-Received: from [199.232.76.173] (port=40978 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVrCR-0000nP-If for bug-guile@gnu.org; Wed, 20 Aug 2008 13:10:23 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:44682 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KVrCR-0000dH-59 for bug-guile@gnu.org; Wed, 20 Aug 2008 13:10:23 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KVrCN-0007d9-A4 for bug-guile@gnu.org; Wed, 20 Aug 2008 17:10:19 +0000 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Aug 2008 17:10:19 +0000 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Aug 2008 17:10:19 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 246 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 4 Fructidor an 216 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: i686-pc-linux-gnu User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:pItmkz/+K5Ibi5SfJ3YrUZ6FDn4= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:3971 Archived-At: --=-=-= Hi, "Robert A. Schmied" writes: > the sol10 manpage for readdir_r includes: > > SYNOPSIS > #include > #include > > struct dirent *readdir(DIR *dirp); > > struct dirent *readdir_r(DIR *dirp, struct dirent *entry); > > Standard conforming > cc [ flag... ] file... -D_POSIX_PTHREAD_SEMANTICS [ library... ] > > int readdir_r(DIR *restrict dirp, struct dirent *restrict > entry, struct dirent **restrict result); > > with the addition of -D_POSIX_PTHREAD_SEMANTICS on the compile line > the compile succeeds. Can you try the latest version of `branch_release-1-8' from the Git repository, or apply the attached patch (in both cases, you need Autoconf 2.61 or later, Automake 1.10 or later, Libtool 1.5.x)? The difference is that `configure.in' now uses `AC_USE_SYSTEM_EXTENSIONS', which automatically adds the definition of `_POSIX_PTHREAD_SEMANTICS' to `config.h'. This should address your problem. Thanks, Ludovic. --=-=-= Content-Type: text/x-patch; charset=iso-8859-1 Content-Disposition: inline; filename=0001-Use-AC_USE_SYSTEM_EXTENSIONS-instead-of-the-obsole.patch Content-Transfer-Encoding: 8bit Content-Description: The patch >From e210266510fb7dc7362a7ca7fb46d3039436c758 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 20 Aug 2008 19:02:41 +0200 Subject: [PATCH] Use `AC_USE_SYSTEM_EXTENSIONS' instead of the obsolete `AC_AIX', etc. --- ChangeLog | 8 ++++++++ configure.in | 4 +--- libguile/ChangeLog | 7 +++++++ libguile/eval.c | 2 -- libguile/filesys.c | 1 - libguile/gc.c | 2 -- libguile/numbers.c | 3 --- libguile/posix.c | 5 +---- libguile/srfi-14.c | 5 +---- libguile/stime.c | 3 +-- libguile/threads.c | 4 +--- 11 files changed, 20 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index e80be78..3d8b7e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-08-20 Ludovic Courtès + + * configure.in: Use `AC_USE_SYSTEM_EXTENSIONS' instead of the + obsolete `AC_AIX', `AC_ISC_POSIX' and `AC_MINIX'. As a side + effect, this will define `_POSIX_PTHREAD_SEMANTICS' on Solaris, + which provides a standard-conforming version of `readdir_r ()' + for instance; it also allows the use of Autoconf 2.62. + 2008-08-14 Ludovic Courtès * configure.in: Remove incorrect and pointless diff --git a/configure.in b/configure.in index ee3d527..e1656c8 100644 --- a/configure.in +++ b/configure.in @@ -73,9 +73,7 @@ AC_PROG_CC AC_PROG_CPP AC_PROG_AWK -AC_AIX -AC_ISC_POSIX -AC_MINIX +AC_USE_SYSTEM_EXTENSIONS AC_PROG_CC_C89 diff --git a/libguile/ChangeLog b/libguile/ChangeLog index bfdb798..1b3f5d3 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,10 @@ +2008-08-20 Ludovic Courtès + + * eval.c, filesys.c, gc.c, numbers.c, posix.c, srfi-14.c, + stime.c, threads.c: Don't define `_GNU_SOURCE' explicitly as + it's now defined in thanks to + `AC_USE_SYSTEM_EXTENSIONS'. + 2008-08-19 Han-Wen Nienhuys Ludovic Courtès diff --git a/libguile/eval.c b/libguile/eval.c index 021640d..8fa29c8 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -18,8 +18,6 @@ -#define _GNU_SOURCE - /* This file is read twice in order to produce debugging versions of ceval and * scm_apply. These functions, deval and scm_dapply, are produced when we * define the preprocessor macro DEVAL. The file is divided into sections diff --git a/libguile/filesys.c b/libguile/filesys.c index c3cc70c..ca50e21 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -19,7 +19,6 @@ /* See stime.c for comments on why _POSIX_C_SOURCE is not always defined. */ -#define _GNU_SOURCE /* ask glibc for everything */ #define _LARGEFILE64_SOURCE /* ask for stat64 etc */ #ifdef __hpux #define _POSIX_C_SOURCE 199506L /* for readdir_r */ diff --git a/libguile/gc.c b/libguile/gc.c index 0b6e8b4..dde740f 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -15,8 +15,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE - /* #define DEBUGINFO */ #if HAVE_CONFIG_H diff --git a/libguile/numbers.c b/libguile/numbers.c index fc57bf5..20eb16a 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -40,9 +40,6 @@ */ -/* tell glibc (2.3) to give prototype for C99 trunc(), csqrt(), etc */ -#define _GNU_SOURCE - #if HAVE_CONFIG_H # include #endif diff --git a/libguile/posix.c b/libguile/posix.c index e803f9f..7d53448 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,9 +21,6 @@ # include #endif -/* Make GNU/Linux libc declare everything it has. */ -#define _GNU_SOURCE - #include #include diff --git a/libguile/srfi-14.c b/libguile/srfi-14.c index f61db7d..3596fbf 100644 --- a/libguile/srfi-14.c +++ b/libguile/srfi-14.c @@ -1,6 +1,6 @@ /* srfi-14.c --- SRFI-14 procedures for Guile * - * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,9 +21,6 @@ # include #endif - -#define _GNU_SOURCE /* Ask for `isblank ()'. */ - #include #include diff --git a/libguile/stime.c b/libguile/stime.c index 8487b91..fa8b585 100644 --- a/libguile/stime.c +++ b/libguile/stime.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -31,7 +31,6 @@ what it takes away, and decide from that whether to use it, instead of hard coding __hpux. */ -#define _GNU_SOURCE /* ask glibc for everything, in particular strptime */ #ifndef _REENTRANT # define _REENTRANT /* ask solaris for gmtime_r prototype */ #endif diff --git a/libguile/threads.c b/libguile/threads.c index 609fc99..843dfca 100644 --- a/libguile/threads.c +++ b/libguile/threads.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,8 +18,6 @@ -#define _GNU_SOURCE - #include "libguile/_scm.h" #if HAVE_UNISTD_H -- 1.5.6.2 --=-=-=--