bsd-snprintf [was: openssh-2.1.1p1 on Irix6.2 report]

Ben Lindstrom mouring at pconline.com
Wed Jun 28 02:13:49 EST 2000



On Tue, 27 Jun 2000, Sven Mascheck wrote:

> Hi,
> 
> > ** There seems to be a pointer problem in vsnprintf:
> > 
> > 	cc -[...] -DHAVE_CONFIG_H -c bsd-snprintf.c
> > "bsd-snprintf.c", line 149: warning(1164): argument of type "va_list *" is
> >           incompatible with parameter of type "char *"
> >   		ret = vsprintf(p, fmt, ap);
> >   		                       ^
> 
> Yes, such a problem might occur on all platforms that don't come with
> [v]snprintf().  Wether it does compile depends on the compiler and the
> actual type of va_list.  It's a struct on some platforms and just a
>  void* (or char* resp.) on others.
> It doesn't compile on OSF1/V4.0 (gcc-2.7.2.1) but does so on Solaris 2.5
> (gcc-2.7.2.3 / -2.95.2). I haven't tried on other dialects, that don't
> come with [v]snprintf().
> 
NeXT 3.3 and OpenStep 4.2 dislike the bsd-snprintf.c ..I have two throw
togethers that work.  But they are not portable.  I've not looked at the
LPRNG snprintf.c  Which supposable is highly portable.  The current
version depents on setjmp() which is not part of the NeXT OS.  (And looks
like would be a mess to implement.)







More information about the openssh-unix-dev mailing list