[Prev][Next][Index][Thread]
4.1b1 --enable-reentrant Solaris 2.x compile bugs
Haven't seen these posted or in the archives, my apologies if they're
old news.
There is a problem when compiling for reentrant library usage on
Solaris 2.x (and probably others) with files:
Library/src/HTFile.c
Library/src/HTMulti.c
The problem is with the declaration and use of struct dirent with the
readdir_r() function. Here are the diffs:
HTFile.c
164,165c164,165
< struct dirent * result; /* For readdir_r */
< while ((dirbuf = (dirent *) readdir_r(dp, &result)))
---
> char result[sizeof(struct dirent) + DIRBUF + 1]; /* For readdir_r */
> while ((dirbuf = (struct dirent *) readdir_r(dp, (struct dirent *)result)))
HTMulti.c
337c337
< DIR result; /* For readdir_r */
---
> char [sizeof(struct dirent) + DIRBUF + 1]; /* For readdir_r */
364c364
< while ((dirbuf = (DIR *) readdir_r(dp, &result))) {
---
> while ((dirbuf = (struct dirent *) readdir_r(dp, &result))) {
Note the use of DIRBUF above comes from the Solaris dirent.h
header file. This may not be general.
Z
--
Bill Rizzi rizzi@softserv.com Software Services
Z http://www.softserv.com/~rizzi Santa Barbara, CA