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: Adam Fedor
Subject: Re: last minute gnuste-base change
Date: Mon, 17 Mar 2003 10:11:58 -0700
User-agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.1) Gecko/20020905



Alexander Malmberg wrote:
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). Anyone have a better idea?


It might have to do with different calling conventions for vararg
functions on ppc. Maybe providing a prototype would help.


Possible. This seems to work:

/* Exit with status 0 if vsprintf returns the length of the string printed.
   Some systems return a pointer to the string instead. */
#include <stdio.h>
#include <stdarg.h>

int main ()
{
  char buf[128];
  va_list ap;
  if (vsprintf (buf, "1234", ap) == 4)
    exit (0);
  exit (-1);
}


Does this work also on other people's machines?





reply via email to

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