Coda File System

Re: CODA 5.3.20 compilation under FreeBSD 5 (stat structure problem)

From: Tak Pui LOU <lou_at_man-97-187.ResHall.Berkeley.EDU>
Date: Tue, 4 Mar 2003 23:18:30 -0800 (PST)
Hi Jan,

> Couldn't find it in my local development tree, so I checked the CVS
> logs. It is an unused function that can be removed completely.

Thanks for your reply. How about the following in coda-src/vice/srv.cc
(line 1271)?

    count = scandir(".", &namelist, (int (*)(const dirent *)) xselect,
                    (int (*)(const void *, const void *)) compar);

I get the following error during the compilation:

g++ -fno-exceptions -fno-operator-names -MD -DHAVE_CONFIG_H -D__BSD44__
-I. -I/root/coda-5.3.20/include -I/root/coda-5.3.20 -I/usr/local/include
-DNGROUPS=16 -D__BIT_TYPES_DEFINED__ -g -O2 -Wall -I/usr/local/include
-DNGROUPS=16 -D__BIT_TYPES_DEFINED__  -c -o srv.o srv.cc
srv.cc: In function `int pushlog()':
srv.cc:1271: invalid conversion from `int (*)(const dirent*)' to `int 
   (*)(dirent*)'

And the manpage of scandir says:

     int
     scandir(const char *dirname, struct dirent ***namelist,
             int (*select)(struct dirent *),
             int (*compar)(const void *, const void *));

Can I take away the "const" here?

---
Lou
Received on 2003-03-05 02:17:32