bug-hurd
[Top][All Lists]
Advanced

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

Re: scsh on GNU/Hurd


From: Niels Möller
Subject: Re: scsh on GNU/Hurd
Date: 24 May 2002 08:33:06 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> 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



reply via email to

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