+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.
+
Sat Nov 1 08:45:38 2003 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_iterate): Set the
+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.
+
Sat Nov 1 08:45:38 2003 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_iterate): Set the
+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.
+
Sat Nov 1 08:45:38 2003 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_iterate): Set the
+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.
+
Sat Nov 1 08:45:38 2003 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_iterate): Set the
+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.
+
Sat Nov 1 08:45:38 2003 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_iterate): Set the
+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.
+
Sat Nov 1 08:45:38 2003 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_iterate): Set the
glib_cv_long_long_format=I64
AC_MSG_RESULT(%${glib_cv_long_long_format}u)
AC_DEFINE(HAVE_LONG_LONG_FORMAT,1,[define if system printf can print long long])
+ AC_DEFINE(HAVE_INT64_AND_I64,1,[define to support printing __int64 with format I64])
fi
dnl long doubles were not used, and a portability problem
http://www.gnu.org/software/gnulib/
-They 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_LON_LONG_FORMAT.
-
+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
C99 return value semantics.
Matthias Clasen
-July 28, 2003
+November 1, 2003
ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
break;
#endif
+#ifdef HAVE_INT64_AND_I64
+ case TYPE_INT64:
+ ap->a.a_int64 = va_arg (args, __int64);
+ break;
+ case TYPE_UINT64:
+ ap->a.a_uint64 = va_arg (args, unsigned __int64);
+ break;
+#endif
case TYPE_DOUBLE:
ap->a.a_double = va_arg (args, double);
break;
TYPE_LONGLONGINT,
TYPE_ULONGLONGINT,
#endif
+#ifdef HAVE_INT64_AND_I64
+ TYPE_INT64,
+ TYPE_UINT64,
+#endif
TYPE_DOUBLE,
#ifdef HAVE_LONG_DOUBLE
TYPE_LONGDOUBLE,
long long int a_longlongint;
unsigned long long int a_ulonglongint;
#endif
+#ifdef HAVE_INT64_AND_I64
+ __int64 a_int64;
+ unsigned __int64 a_uint64;
+#endif
float a_float;
double a_double;
#ifdef HAVE_LONG_DOUBLE
flags += 8;
cp++;
}
+#ifdef HAVE_INT64_AND_I64
+ else if (cp[0] == 'I' &&
+ cp[1] == '6' &&
+ cp[2] == '4')
+ {
+ flags = 64;
+ cp += 3;
+ }
+#endif
#ifdef HAVE_INTMAX_T
else if (*cp == 'j')
{
switch (c)
{
case 'd': case 'i':
+#ifdef HAVE_INT64_AND_I64
+ if (flags == 64)
+ type = TYPE_INT64;
+ else
+#endif
#ifdef HAVE_LONG_LONG
if (flags >= 16 || (flags & 4))
type = TYPE_LONGLONGINT;
type = TYPE_INT;
break;
case 'o': case 'u': case 'x': case 'X':
+#ifdef HAVE_INT64_AND_I64
+ if (flags == 64)
+ type = TYPE_UINT64;
+ else
+#endif
#ifdef HAVE_LONG_LONG
if (flags >= 16 || (flags & 4))
type = TYPE_ULONGLONGINT;
switch (type)
{
+#ifdef HAVE_INT64_AND_I64
+ case TYPE_INT64:
+ case TYPE_UINT64:
+ *p++ = 'I';
+ *p++ = '6';
+ *p++ = '4';
+ break;
+#endif
#ifdef HAVE_LONG_LONG
case TYPE_LONGLONGINT:
case TYPE_ULONGLONGINT:
SNPRINTF_BUF (arg);
}
break;
+#ifdef HAVE_INT64_AND_I64
+ case TYPE_INT64:
+ {
+ __int64 arg = a.arg[dp->arg_index].a.a_int64;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_UINT64:
+ {
+ unsigned __int64 arg = a.arg[dp->arg_index].a.a_uint64;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+#endif
#ifdef HAVE_LONG_LONG
#ifndef HAVE_LONG_LONG_FORMAT
case TYPE_LONGLONGINT: