Marcus Brinkmann <[EMAIL PROTECTED]> writes: > > This is an ugly hack, but I haven't figured out how to fix > > scm_readlink properly. > > The GLibC manual has an example code that does loop properly over readlink > while the returned name is as large as the buffer (and thus could be > truncated).
It's not enough to change scm_readlink to allocate space dynamically, the space must also be freed somewhere, and that's what I haven't figured out; I don't know how and where scm_readlink is used. (No, unlike guile (I think), scsh doesn't use a conservative gc for things allocated by C code). > > 3. sigset_t seems to be a plain unsigned int, so I had to redefine the > > macros in scsh/gnu/sigset.h, as follows: > > Actually, in the generic case, sigset_t could even be a structure type. > Can not the functions described in > > File: libc.info, Node: Signal Sets > > be used to implement it portably? The macros convert sigsets between the unix and the scheme world, there they are represented as a pair of 24-bit FIXNUMS. I don't think there's any straight-forward way to do that portably, so scsh puts those macros into the systemdependent files like gnu/sigset.h, linux/sigset.h, etc. I've never done any signal-related coding in scsh, but I guess the point is to be able to manipulate them using the ordinary operations on integers. /Niels _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd