mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-12 13:49:22 +01:00
pull in trio if host printf doesn't have a known way of printing 64-bit
Thu Dec 12 14:58:55 2002 Manish Singh <yosh@gimp.org> * configure.in: pull in trio if host printf doesn't have a known way of printing 64-bit ints. * glib/gmacros.h: remove extra whitespace at the end * glib/gscanner.c (g_scanner_unexp_token): use G_GUINT64_FORMAT instead of hardcoding "%llu" * tests/testglib.c: remove obsolete conditionals using G_HAVE_GINT64, we always have it now. * tests/type-test.c: same as above, and for G_G[U]INT64_FORMAT as well.
This commit is contained in:
parent
98ccd05da3
commit
96670b2085
16
ChangeLog
16
ChangeLog
@ -1,3 +1,19 @@
|
||||
Thu Dec 12 14:58:55 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* configure.in: pull in trio if host printf doesn't have a known
|
||||
way of printing 64-bit ints.
|
||||
|
||||
* glib/gmacros.h: remove extra whitespace at the end
|
||||
|
||||
* glib/gscanner.c (g_scanner_unexp_token): use G_GUINT64_FORMAT
|
||||
instead of hardcoding "%llu"
|
||||
|
||||
* tests/testglib.c: remove obsolete conditionals using G_HAVE_GINT64,
|
||||
we always have it now.
|
||||
|
||||
* tests/type-test.c: same as above, and for G_G[U]INT64_FORMAT as
|
||||
well.
|
||||
|
||||
Thu Dec 12 13:52:58 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* m4macros/glib-gettext.m4: AC_PREREQ(2.53) here; convinces
|
||||
|
@ -1,3 +1,19 @@
|
||||
Thu Dec 12 14:58:55 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* configure.in: pull in trio if host printf doesn't have a known
|
||||
way of printing 64-bit ints.
|
||||
|
||||
* glib/gmacros.h: remove extra whitespace at the end
|
||||
|
||||
* glib/gscanner.c (g_scanner_unexp_token): use G_GUINT64_FORMAT
|
||||
instead of hardcoding "%llu"
|
||||
|
||||
* tests/testglib.c: remove obsolete conditionals using G_HAVE_GINT64,
|
||||
we always have it now.
|
||||
|
||||
* tests/type-test.c: same as above, and for G_G[U]INT64_FORMAT as
|
||||
well.
|
||||
|
||||
Thu Dec 12 13:52:58 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* m4macros/glib-gettext.m4: AC_PREREQ(2.53) here; convinces
|
||||
|
@ -1,3 +1,19 @@
|
||||
Thu Dec 12 14:58:55 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* configure.in: pull in trio if host printf doesn't have a known
|
||||
way of printing 64-bit ints.
|
||||
|
||||
* glib/gmacros.h: remove extra whitespace at the end
|
||||
|
||||
* glib/gscanner.c (g_scanner_unexp_token): use G_GUINT64_FORMAT
|
||||
instead of hardcoding "%llu"
|
||||
|
||||
* tests/testglib.c: remove obsolete conditionals using G_HAVE_GINT64,
|
||||
we always have it now.
|
||||
|
||||
* tests/type-test.c: same as above, and for G_G[U]INT64_FORMAT as
|
||||
well.
|
||||
|
||||
Thu Dec 12 13:52:58 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* m4macros/glib-gettext.m4: AC_PREREQ(2.53) here; convinces
|
||||
|
@ -1,3 +1,19 @@
|
||||
Thu Dec 12 14:58:55 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* configure.in: pull in trio if host printf doesn't have a known
|
||||
way of printing 64-bit ints.
|
||||
|
||||
* glib/gmacros.h: remove extra whitespace at the end
|
||||
|
||||
* glib/gscanner.c (g_scanner_unexp_token): use G_GUINT64_FORMAT
|
||||
instead of hardcoding "%llu"
|
||||
|
||||
* tests/testglib.c: remove obsolete conditionals using G_HAVE_GINT64,
|
||||
we always have it now.
|
||||
|
||||
* tests/type-test.c: same as above, and for G_G[U]INT64_FORMAT as
|
||||
well.
|
||||
|
||||
Thu Dec 12 13:52:58 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* m4macros/glib-gettext.m4: AC_PREREQ(2.53) here; convinces
|
||||
|
@ -1,3 +1,19 @@
|
||||
Thu Dec 12 14:58:55 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* configure.in: pull in trio if host printf doesn't have a known
|
||||
way of printing 64-bit ints.
|
||||
|
||||
* glib/gmacros.h: remove extra whitespace at the end
|
||||
|
||||
* glib/gscanner.c (g_scanner_unexp_token): use G_GUINT64_FORMAT
|
||||
instead of hardcoding "%llu"
|
||||
|
||||
* tests/testglib.c: remove obsolete conditionals using G_HAVE_GINT64,
|
||||
we always have it now.
|
||||
|
||||
* tests/type-test.c: same as above, and for G_G[U]INT64_FORMAT as
|
||||
well.
|
||||
|
||||
Thu Dec 12 13:52:58 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* m4macros/glib-gettext.m4: AC_PREREQ(2.53) here; convinces
|
||||
|
@ -1,3 +1,19 @@
|
||||
Thu Dec 12 14:58:55 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* configure.in: pull in trio if host printf doesn't have a known
|
||||
way of printing 64-bit ints.
|
||||
|
||||
* glib/gmacros.h: remove extra whitespace at the end
|
||||
|
||||
* glib/gscanner.c (g_scanner_unexp_token): use G_GUINT64_FORMAT
|
||||
instead of hardcoding "%llu"
|
||||
|
||||
* tests/testglib.c: remove obsolete conditionals using G_HAVE_GINT64,
|
||||
we always have it now.
|
||||
|
||||
* tests/type-test.c: same as above, and for G_G[U]INT64_FORMAT as
|
||||
well.
|
||||
|
||||
Thu Dec 12 13:52:58 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* m4macros/glib-gettext.m4: AC_PREREQ(2.53) here; convinces
|
||||
|
@ -1,3 +1,19 @@
|
||||
Thu Dec 12 14:58:55 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* configure.in: pull in trio if host printf doesn't have a known
|
||||
way of printing 64-bit ints.
|
||||
|
||||
* glib/gmacros.h: remove extra whitespace at the end
|
||||
|
||||
* glib/gscanner.c (g_scanner_unexp_token): use G_GUINT64_FORMAT
|
||||
instead of hardcoding "%llu"
|
||||
|
||||
* tests/testglib.c: remove obsolete conditionals using G_HAVE_GINT64,
|
||||
we always have it now.
|
||||
|
||||
* tests/type-test.c: same as above, and for G_G[U]INT64_FORMAT as
|
||||
well.
|
||||
|
||||
Thu Dec 12 13:52:58 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* m4macros/glib-gettext.m4: AC_PREREQ(2.53) here; convinces
|
||||
|
@ -708,6 +708,11 @@ if test "$enable_trio" != "no" ; then
|
||||
if test "$ac_cv_func_printf_unix98" != "yes" ; then
|
||||
enable_trio=yes
|
||||
fi
|
||||
if test "x$ac_cv_sizeof_long_long" = "x8" &&
|
||||
test -z "$glib_cv_long_long_format"; then
|
||||
enable_trio=yes
|
||||
glib_cv_long_long_format="ll"
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_GOOD_PRINTF, test "$enable_trio" != "yes")
|
||||
|
@ -230,24 +230,3 @@
|
||||
#endif
|
||||
|
||||
#endif /* __G_MACROS_H__ */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -958,7 +958,7 @@ g_scanner_unexp_token (GScanner *scanner,
|
||||
case G_TOKEN_INT:
|
||||
case G_TOKEN_HEX:
|
||||
if (scanner->config->store_int64)
|
||||
_g_snprintf (token_string, token_string_len, "number `%llu'", scanner->value.v_int64);
|
||||
_g_snprintf (token_string, token_string_len, "number `" G_GUINT64_FORMAT "'", scanner->value.v_int64);
|
||||
else
|
||||
_g_snprintf (token_string, token_string_len, "number `%lu'", scanner->value.v_int);
|
||||
break;
|
||||
|
@ -391,10 +391,8 @@ main (int argc,
|
||||
#ifndef G_DISABLE_ASSERT
|
||||
guint16 gu16t1 = 0x44afU, gu16t2 = 0xaf44U;
|
||||
guint32 gu32t1 = 0x02a7f109U, gu32t2 = 0x09f1a702U;
|
||||
#ifdef G_HAVE_GINT64
|
||||
guint64 gu64t1 = G_GINT64_CONSTANT(0x1d636b02300a7aa7U),
|
||||
gu64t2 = G_GINT64_CONSTANT(0xa77a0a30026b631dU);
|
||||
#endif
|
||||
#endif
|
||||
const char hello[] = "Hello, World";
|
||||
const int hellolen = sizeof (hello) - 1;
|
||||
@ -438,10 +436,8 @@ main (int argc,
|
||||
g_print ("\nchecking size of gint32: %d", (int)sizeof (gint32));
|
||||
TEST (NULL, sizeof (gint32) == 4);
|
||||
g_print ("\nchecking size of gsize: %d", (int)sizeof (gsize));
|
||||
#ifdef G_HAVE_GINT64
|
||||
g_print ("\nchecking size of gint64: %d", (int)sizeof (gint64));
|
||||
TEST (NULL, sizeof (gint64) == 8);
|
||||
#endif /* G_HAVE_GINT64 */
|
||||
g_print ("\n");
|
||||
|
||||
g_print ("checking g_path_get_basename()...");
|
||||
@ -1171,9 +1167,7 @@ main (int argc,
|
||||
#endif
|
||||
g_assert (GUINT16_SWAP_LE_BE (gu16t1) == gu16t2);
|
||||
g_assert (GUINT32_SWAP_LE_BE (gu32t1) == gu32t2);
|
||||
#ifdef G_HAVE_GINT64
|
||||
g_assert (GUINT64_SWAP_LE_BE (gu64t1) == gu64t2);
|
||||
#endif
|
||||
|
||||
g_print ("ok\n");
|
||||
|
||||
|
@ -50,28 +50,20 @@ main (int argc,
|
||||
gint32 gi32t2;
|
||||
guint16 gu16t1 = 0x44afU, gu16t2 = 0xaf44U;
|
||||
guint32 gu32t1 = 0x02a7f109U, gu32t2 = 0x09f1a702U;
|
||||
#ifdef G_HAVE_GINT64
|
||||
guint64 gu64t1 = G_GINT64_CONSTANT(0x1d636b02300a7aa7U),
|
||||
gu64t2 = G_GINT64_CONSTANT(0xa77a0a30026b631dU);
|
||||
#ifdef G_GINT64_FORMAT
|
||||
gint64 gi64t1;
|
||||
gint64 gi64t2;
|
||||
#endif /* G_GINT64_FORMAT */
|
||||
#endif /* G_HAVE_GINT64 */
|
||||
|
||||
/* type sizes */
|
||||
g_assert (sizeof (gint8) == 1);
|
||||
g_assert (sizeof (gint16) == 2);
|
||||
g_assert (sizeof (gint32) == 4);
|
||||
#ifdef G_HAVE_GINT64
|
||||
g_assert (sizeof (gint64) == 8);
|
||||
#endif /* G_HAVE_GINT64 */
|
||||
|
||||
g_assert (GUINT16_SWAP_LE_BE (gu16t1) == gu16t2);
|
||||
g_assert (GUINT32_SWAP_LE_BE (gu32t1) == gu32t2);
|
||||
#ifdef G_HAVE_GINT64
|
||||
g_assert (GUINT64_SWAP_LE_BE (gu64t1) == gu64t2);
|
||||
#endif
|
||||
|
||||
/* Test the G_(MIN|MAX|MAXU)(SHORT|INT|LONG) macros */
|
||||
|
||||
@ -116,16 +108,15 @@ main (int argc,
|
||||
g_assert (gu16t1 == gu16t2);
|
||||
g_assert (gu32t1 == gu32t2);
|
||||
|
||||
#if defined (G_HAVE_GINT64) && defined (G_GINT64_FORMAT)
|
||||
gi64t1 = G_GINT64_CONSTANT (-0x3AFAFAFAFAFAFAFA);
|
||||
gu64t1 = G_GINT64_CONSTANT (0xFAFAFAFAFAFAFAFA);
|
||||
|
||||
#define FORMAT64 "%" G_GINT64_FORMAT " %" G_GUINT64_FORMAT "\n"
|
||||
string = g_strdup_printf (FORMAT64, gi64t1, gu64t1);
|
||||
sscanf (string, FORMAT64, &gi64t2, &gu64t2);
|
||||
g_free (string);
|
||||
g_assert (gi64t1 == gi64t2);
|
||||
g_assert (gu64t1 == gu64t2);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user