From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Robert A. Schmied" Newsgroups: gmane.lisp.guile.bugs Subject: guile 1.8.5 solaris 10 sparc with gcc readdir_r problem ... Date: Mon, 18 Aug 2008 16:41:48 -0700 Message-ID: <48AA08BC.1040603@acm.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1219163346 28283 80.91.229.12 (19 Aug 2008 16:29:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Aug 2008 16:29:06 +0000 (UTC) To: bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Aug 19 18:29:59 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 1KVU5l-0002v6-Gv for guile-bugs@m.gmane.org; Tue, 19 Aug 2008 18:29:57 +0200 Original-Received: from localhost ([127.0.0.1]:50039 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVU4o-0000nF-8J for guile-bugs@m.gmane.org; Tue, 19 Aug 2008 12:28:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KVEMH-00018u-0i for bug-guile@gnu.org; Mon, 18 Aug 2008 19:41:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KVEMF-00017p-GS for bug-guile@gnu.org; Mon, 18 Aug 2008 19:41:56 -0400 Original-Received: from [199.232.76.173] (port=44609 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVEMF-00017m-Df for bug-guile@gnu.org; Mon, 18 Aug 2008 19:41:55 -0400 Original-Received: from flpi195.sbcis.sbc.com ([207.115.20.197]:64896 helo=flpi195.prodigy.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KVEMF-0001ds-5m for bug-guile@gnu.org; Mon, 18 Aug 2008 19:41:55 -0400 Original-Received: from [192.168.94.4] (adsl-69-230-52-246.dsl.irvnca.pacbell.net [69.230.52.246]) (authenticated bits=0) by flpi195.prodigy.net (8.13.8 smtpauth/dk/8.13.8) with ESMTP id m7INfoQG006063 for ; Mon, 18 Aug 2008 16:41:51 -0700 User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20060629 X-Accept-Language: en-us, en X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Tue, 19 Aug 2008 12:07:21 -0400 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:3969 Archived-At: in attempt to build guile 1.8.5 i ran into this problem when compiling libguile/filesys.c into filesys.o . . . . /usr/include/dirent.h .. /usr/include/sys/dirent.h filesys.c: In function `scm_readdir': filesys.c:919: error: too many arguments to function `readdir_r' . ../libguile/filesys.x gmake[3]: *** [filesys.lo] Error 1 gmake[3]: Leaving directory `/usr/local/src/guile-1.8.5/libguile' 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. more specifically: gcc -D_POSIX_PTHREAD_SEMANTICS \ -DHAVE_CONFIG_H -I.. -I.. -I.. -I/usr/local/include -O -H -mcpu=v9 \ -mfpu -Wall -Wmissing-prototypes -MT filesys.lo -MD -MP -MF .deps/filesys.Tpo \ -c filesys.c -fPIC -DPIC -o .libs/filesys.o works gcc -DHAVE_CONFIG_H -I.. -I.. -I.. -I/usr/local/include -O -H -mcpu=v9 \ -mfpu -Wall -Wmissing-prototypes -MT filesys.lo -MD -MP -MF .deps/filesys.Tpo \ -c filesys.c -fPIC -DPIC -o .libs/filesys.o fails i expect i will need to add something about threads to the various linker lines in order to appropriately load the correct thread libs, but how and where? do i need to specify something else to configure to trigger the use of the solaris standards conforming directive(s)? or am i just at the mercy my older gcc and solaris10? ahha -- maybe at the very end of the readdir_r manpage is the clue i need: For POSIX.1c-conforming applications, the _POSIX_PTHREAD_SEMANTICS and _REENTRANT flags are automati- cally turned on by defining the _POSIX_C_SOURCE flag with a value >= 199506L. gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath) Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SunOS twok 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Blade-1000 thanks for any advice you can provide, yell if there's something more i can do. aloha ras