bug-gnustep
[Top][All Lists]
Advanced

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

Re: last minute gnuste-base change


From: Richard Frith-Macdonald
Subject: Re: last minute gnuste-base change
Date: Mon, 17 Mar 2003 17:06:07 +0000


On Monday, March 17, 2003, at 04:46  pm, Adam Fedor wrote:

I'm thinking of adding this change to gnustep-base config/config.vsprintf. Richard changed this so the proper number of arguments are passed to vsprintf, but this actually causes the program to crash on my GNU/Linuxx/PPC (gcc 2.95).

I only changed it 'cos the cvs version of gcc barfs on the version with the missing argument :-(

 Anyone have a better idea?

Perhaps something like this? If that doesn't work then I guess vsprintf() is broken.

#include <stdarg.h>
static int func(const char *fmt, ...)
{
  va_list ap;
  char buf[128];
  int result;

  va_start(ap, fmt);
  result = vsprintf(buf, fmt, ap);
  va_end(ap);
  return result;
}

int main()
{
  if (func("1234", 0) == 4)
....





reply via email to

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