not sure it goes here, but windbus code change

Mike Luschas mluschas at
Mon May 14 14:22:35 CEST 2007

File:   dbus-sysdeps-win.c

Function with code (and comment)

int _dbus_printf_string_upper_bound (const char *format,
                                     va_list args)
  /* MSVCRT's vsnprintf semantics are a bit different */
  /* The C library source in the Platform SDK indicates that this
   * would work, but alas, it doesn't. At least not on Windows
   * 2000. Presumably those sources correspond to the C library on
   * some newer or even future Windows version.
    len = _vsnprintf (NULL, _DBUS_INT_MAX, format, args);
  char p[1024];
  int len;
  len = _vsnprintf (p, sizeof(p)-1, format, args);
   /*  Ok Im using VS 2003 right now with the Server 2k3 R2 PSDSK.
      This line was originally len = vsnprintf(p, sizeof(p)-1, format,
      It was failing to compile telling me it was undefined. So Im changing
      Michael Luschas May 14th 2007 mluschas at  */
  len = _vsnprintf (p, sizeof(p)-1, format, args);
  if (len == -1) // try again
      char *p;
      p = malloc (strlen(format)*3);
      len = _vsnprintf (p, sizeof(p)-1, format, args);
      /*Same as previous comment */
      len = _vsnprintf (p, sizeof(p)-1, format, args);

  return len;

// End of code change
Not sure where exactly I would submit it (I am knew at this). So I left a
comment of WHY I changed it and what it was. I'm not sure if its the
compiler i'm using that made it be that way, or if its the PSDK or what. But
thats the change, so im posting it in case anyone else has
trouble, or if someone can commit that change (or tell me how to).

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Kde-buildsystem mailing list