strtoumax: fix typo in previous commit.
[gnulib.git] / tests / test-snprintf-posix.h
index a2fab0f..f71b3f7 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of POSIX compatible vsnprintf() and snprintf() functions.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007-2013 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -96,7 +96,7 @@ test_function (int (*my_snprintf) (char *, size_t, const char *, ...))
               ASSERT (memcmp (buf, "12345", size - 1) == 0);
               ASSERT (buf[size - 1] == '\0');
             }
-          ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0);
+          ASSERT (memcmp (buf + size, &"DEADBEEF"[size], 8 - size) == 0);
         }
       else
         {
@@ -273,7 +273,7 @@ test_function (int (*my_snprintf) (char *, size_t, const char *, ...))
   }
 
   { /* Rounding can turn a ...FFF into a ...000.
-       This shows a MacOS X 10.3.9 (Darwin 7.9) bug.  */
+       This shows a Mac OS X 10.3.9 (Darwin 7.9) bug.  */
     char result[100];
     int retval =
       my_snprintf (result, sizeof (result), "%.1a %d", 1.999, 33, 44, 55);
@@ -469,7 +469,7 @@ test_function (int (*my_snprintf) (char *, size_t, const char *, ...))
             && strcmp (result + strlen (result) - 3, " 33") == 0);
     ASSERT (retval == strlen (result));
   }
-#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
   { /* Quiet NaN.  */
     static union { unsigned int word[4]; long double value; } x =
       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
@@ -624,7 +624,7 @@ test_function (int (*my_snprintf) (char *, size_t, const char *, ...))
   }
 
   { /* Rounding can turn a ...FFF into a ...000.
-       This shows a MacOS X 10.3.9 (Darwin 7.9) bug and a
+       This shows a Mac OS X 10.3.9 (Darwin 7.9) bug and a
        glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
     char result[100];
     int retval =
@@ -1173,7 +1173,7 @@ test_function (int (*my_snprintf) (char *, size_t, const char *, ...))
             && strcmp (result + strlen (result) - 3, " 33") == 0);
     ASSERT (retval == strlen (result));
   }
-#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
   { /* Quiet NaN.  */
     static union { unsigned int word[4]; long double value; } x =
       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
@@ -2043,7 +2043,7 @@ test_function (int (*my_snprintf) (char *, size_t, const char *, ...))
             && strcmp (result + strlen (result) - 3, " 33") == 0);
     ASSERT (retval == strlen (result));
   }
-#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
   { /* Quiet NaN.  */
     static union { unsigned int word[4]; long double value; } x =
       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
@@ -2695,7 +2695,7 @@ test_function (int (*my_snprintf) (char *, size_t, const char *, ...))
             && strcmp (result + strlen (result) - 3, " 33") == 0);
     ASSERT (retval == strlen (result));
   }
-#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
   { /* Quiet NaN.  */
     static union { unsigned int word[4]; long double value; } x =
       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };