mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
76433d5365
Sun Nov 2 01:47:31 2003 Matthias Clasen <maclas@gmx.de> Fix 64bit printing for MSVC builds (#119292, Hans Breuer): * configure.in (HAVE_INT64_AND_I64): Define for MSVC to include support for printing __int64 with format %I64 in the gnulib printf wrappers. * glib/gnulib/printf-args.h (enum arg_type): Add TYPE_INT64 and TYPE_UINT64. * glib/gnulib/printf-args.h (struct argument): Add a_int64 and a_uint64 members. * glib/gnulib/printf-args.c (printf_fetchargs): Support TYPE_INT64 and TYPE_UINT64. * glib/gnulib/printf-parse.c (printf_parse): Parse I64 format modifier and map formats to TYPE_INT64. * glib/gnulib/vasnprintf.c (vasnprintf): Print TYPE_INT64 with format modifier I64. * glib/gnulib/README: Document the __int64 support.
45 lines
1.1 KiB
Plaintext
45 lines
1.1 KiB
Plaintext
The files
|
|
|
|
asnprintf.c
|
|
printf-args.c
|
|
printf-args.h
|
|
printf-parse.c
|
|
printf-parse.h
|
|
vasnprintf.c
|
|
vasnprintf.h
|
|
|
|
are taken from the vasnprintf module of the GNUlib package, which can
|
|
be found at:
|
|
|
|
http://www.gnu.org/software/gnulib/
|
|
|
|
All files have been modified to include g-gnulib.h.
|
|
|
|
vasnprintf.c has also been modified to include support for long long
|
|
printing if the system printf doesn't. This code is protected by
|
|
#ifndef HAVE_LONG_LONG_FORMAT.
|
|
|
|
Code has been added to printf-args.[ch], printf-parse.c and vasnprintf.c
|
|
to support printing of __int64 values with the I64 format modifier. This
|
|
is protected by #ifdef HAVE_INT64_AND_I64.
|
|
|
|
The files
|
|
|
|
printf.h
|
|
printf.c
|
|
g-gnulib.h
|
|
|
|
have been written by me. printf.[hc] contain implementations of the
|
|
remaining functions in the printf family based on vasnprintf.
|
|
g-gnulib.h is included by all source files in order to move all
|
|
exported functions to the _g_gnulib namespace, replace malloc by
|
|
g_malloc and make sure that snprintf is only used if it implements
|
|
C99 return value semantics.
|
|
|
|
Matthias Clasen
|
|
November 1, 2003
|
|
|
|
|
|
|
|
|