1. 25 Sep, 2012 18 commits
  2. 24 Sep, 2012 19 commits
  3. 23 Sep, 2012 3 commits
    • Stefan Weil's avatar
      w32: Add implementation of gmtime_r, localtime_r · d3e8f957
      Stefan Weil authored
      Those functions are missing in MinGW.
      Some versions of MinGW-w64 include defines for gmtime_r and localtime_r.
      Older versions of these macros are buggy (they return a pointer to a
      static variable), therefore we don't want them. Newer versions are
      similar to the code used here, but without the memset.
      The implementation which is used here is not strictly reentrant,
      but sufficiently good for QEMU on w32 or w64.
      Signed-off-by: default avatarStefan Weil <sw@weilnetz.de>
      [blauwirbel@gmail.com: added comment about locking]
      Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
    • Stefan Weil's avatar
      w32: Always use standard instead of native format strings · 95df51a4
      Stefan Weil authored
      GLib 2.0 include files use __printf__ for the format attribute
      which resolves to native format strings on w32 hosts.
      QEMU wants standard format strings instead of native format
      strings, so we simply change any declaration with __printf__
      to use __gnu_printf__.
      This works because all basic printf functions support both
      kinds of format strings.
      This fixes a compiler warning:
      qapi/string-output-visitor.c: In function ‘print_type_int’:
      qapi/string-output-visitor.c:34:5: warning: unknown conversion type character ‘l’ in format [-Wformat]
      qapi/string-output-visitor.c:34:5: warning: too many arguments for format [-Wformat-extra-args]
      Signed-off-by: default avatarStefan Weil <sw@weilnetz.de>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@gmail.com>
    • Stefan Weil's avatar
      net/socket: Fix compiler warning (regression for MinGW) · 73062dfe
      Stefan Weil authored
      Commit 213fd508
       removed a type cast
      which is needed for MinGW:
      net/socket.c:136: warning:
       pointer targets in passing argument 2 of ‘sendto’ differ in signedness
      /usr/lib/gcc/amd64-mingw32msvc/4.4.4/../../../../amd64-mingw32msvc/include/winsock2.h:1313: note:
       expected ‘const char *’ but argument is of type ‘const uint8_t *’
      Add a 'qemu_sendto' macro which provides that type cast where needed
      and use the new macro instead of 'sendto'.
      Signed-off-by: default avatarStefan Weil <sw@weilnetz.de>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@gmail.com>