pull in trio if host printf doesn't have a known way of printing 64-bit
authorManish Singh <yosh@gimp.org>
Thu, 12 Dec 2002 22:59:55 +0000 (22:59 +0000)
committerManish Singh <yosh@src.gnome.org>
Thu, 12 Dec 2002 22:59:55 +0000 (22:59 +0000)
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.

12 files changed:
ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
configure.in
glib/gmacros.h
glib/gscanner.c
tests/testglib.c
tests/type-test.c

index 2e020ab..4d76e6a 100644 (file)
--- a/ChangeLog
+++ b/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
index 2e020ab..4d76e6a 100644 (file)
@@ -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
index 2e020ab..4d76e6a 100644 (file)
@@ -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
index 2e020ab..4d76e6a 100644 (file)
@@ -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
index 2e020ab..4d76e6a 100644 (file)
@@ -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
index 2e020ab..4d76e6a 100644 (file)
@@ -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
index 2e020ab..4d76e6a 100644 (file)
@@ -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
index 4ab8d13..8ebfd12 100644 (file)
@@ -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")
index 0576140..3babc16 100644 (file)
 #endif
 
 #endif /* __G_MACROS_H__ */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
index 790241a..e9f527d 100644 (file)
@@ -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;
index c32d91a..5695754 100644 (file)
@@ -391,11 +391,9 @@ 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;
   int fd;
@@ -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");
 
index 5fa5002..e0d17d0 100644 (file)
@@ -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;
 }