snprintf & sigaction [was: Re: bsd-snprintf]

Ben Lindstrom mouring at pconline.com
Fri Jun 30 02:19:24 EST 2000



On Wed, 28 Jun 2000, Sven Mascheck wrote:

[..]
> It compiled "out of the box" on Solaris2.5 and OSF1/V4.0b.
> But i have no NeXT.
> 
> It may at least inspire you, like the XFree one.
> Have a glance at <URL:http://www.uni-ulm.de/~s_smasch/snprintf.c>
> 
This version works perfectly fine as a dropin replacement to our current
bsd-snprintf.c .. NeXT is MUCH happer with this version of snprintf.


Damien, can we look at using this snprintf.c instead of the current one?

BTW.. I found (out of the OpenBSD tree) a replacement sigaction() for
platforms that lack it (like NeXT) and I'm in the process of integrated it
into my tree.  If you want to look at it.. You'll need:

src/lib/libcurses/base/sigaction.c
and
src/lib/libcurses/SigAction.h

It looks like it was GNU in nature.  

And the only two things we need to add to the ./configure script is to
detect the extistance of sigaction()  (define: HAVE_SIGACTION) and
detect if we have sigvec()  (define: HAVE_SIGVEC)  and if the latter is
found and the former is not the code is activated.

The current issue that needs to be resolve is "struct sigaction" vs
"struct sigaction_t"  and next's gcc compaining about a lack of sizeof()
working correcting using "typedef struct sigvec sigaction"  (Besides the
fact it's *.sa_[..]  vs *.sv_[..])

Ben Lindstrom







More information about the openssh-unix-dev mailing list