[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re:readdir_r in solaris

From: Bill Schottstaedt
Subject: re:readdir_r in solaris
Date: Fri, 24 Feb 2006 10:11:32 -0800

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 

I don't know enough about readdir_r to say whether it matters.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]