(Illustration by Gaich Muramatsu)
Hi Jan, While you are working on the code, I want to let you know about the following. The preprocessor seems to have an error in getting NGROUPS and __BIT_TYPES_DEFINED__. After I defined NGROUPS=16 __BIT_TYPES_DEFINED__, and remove the const in the following cast, it compiled. However, one of the kernel options for CODA is broken as pointed out. Other than this, rvm_io.c also has a _POSIX_SYNCHRONIZED_IO which is defined to be -1. When it is preprocessed, the first FSYNC(fd) is defined to be fsync(fd) while the second FSYNC(fd) is defined to be fdatasync(fd). fdatasync(fd) is not available on FreeBSD. --- Lou > > count = scandir(".", &namelist, (int (*)(const dirent *)) xselect, > > (int (*)(const void *, const void *)) compar); > > I hate casts, I wonder who came up with the bright idea to add all those > casts here, because they are only going to hide bugs when someone > accidently changes xselect or compar. > > Ahh, I see > > > And the manpage of scandir says: > > > > int > > scandir(const char *dirname, struct dirent ***namelist, > > int (*select)(struct dirent *), > > int (*compar)(const void *, const void *)); > > I guess it's not a SuS or POSIX standard function, and various platforms > use different prototypes. My prototype looks like, > > int scandir(const char *dir, struct dirent ***namelist, > int(*select)(const struct dirent *), > int(*compar)(const struct dirent **, const struct dirent **)); > > > Can I take away the "const" here? > > Yeah, sure. I'll try to come up with a more permanent solution. > > Jan > >Received on 2003-03-05 13:31:43