* re:readdir_r in solaris
@ 2006-02-24 18:11 Bill Schottstaedt
2006-02-25 21:22 ` readdir_r " Kevin Ryde
0 siblings, 1 reply; 2+ messages in thread
From: Bill Schottstaedt @ 2006-02-24 18:11 UTC (permalink / raw)
The readdir_r change hits:
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -g -O2 -Wall -Wmissing-prototypes -MT filesys.lo -MD -
MP -MF .deps/filesys.Tpo -c filesys.
c -fPIC -DPIC -o .libs/filesys.o
filesys.c: In function `scm_readdir':
filesys.c:905: warning: implicit declaration of function `dirfd'
filesys.c:914: warning: implicit declaration of function `SCM_MAX'
filesys.c:918: warning: implicit declaration of function `alloca'
filesys.c:920: error: too many arguments to function `readdir_r'
filesys.c:898: warning: unused variable `old_errno'
I included "private-gc.h" to get SCM_MAX, and <alloca.h> for alloca,
but dirfd is not defined in Solaris. The version in win32-dirent.c won't work
because there is no fd field. This compiles:
name_max = fpathconf (ds->dd_fd, _PC_NAME_MAX);
and readdir takes 2 arguments now, so:
SCM_SYSCALL (readdir_r (ds, &rdent));
but that gets:
filesys.c: In function `scm_readdir':
filesys.c:927: warning: passing arg 2 of `readdir_r' from incompatible pointer type
I don't know enough about readdir_r to say whether it matters.
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: readdir_r in solaris
2006-02-24 18:11 re:readdir_r in solaris Bill Schottstaedt
@ 2006-02-25 21:22 ` Kevin Ryde
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Ryde @ 2006-02-25 21:22 UTC (permalink / raw)
Cc: guile-devel
"Bill Schottstaedt" <bil@ccrma.Stanford.EDU> writes:
>
> I included "private-gc.h" to get SCM_MAX, and <alloca.h> for alloca,
Sorry, yes, I only posted the main part.
> but dirfd is not defined in Solaris.
>
> name_max = fpathconf (ds->dd_fd, _PC_NAME_MAX);
Thanks, I put something for that.
> and readdir takes 2 arguments now, so:
Nosing around the online man pages I see that's the old style, you're
supposed to be able to get the new posix one with
#define _POSIX_C_SOURCE 199506L
We've got that conditionalized out of filesys.c because it breaks
other stuff on glibc and elsewhere. What would be a good #ifdef to
test to detect solaris?
Apart from that I think we're on the right track, I checked-in some
code.
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-02-25 21:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-24 18:11 re:readdir_r in solaris Bill Schottstaedt
2006-02-25 21:22 ` readdir_r " Kevin Ryde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).