]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* wcsmbs/bits/wchar2.h (swprintf): Remove format argument.
authorJakub Jelinek <jakub@redhat.com>
Thu, 21 Jul 2005 09:33:53 +0000 (09:33 +0000)
committerJakub Jelinek <jakub@redhat.com>
Thu, 21 Jul 2005 09:33:53 +0000 (09:33 +0000)
* debug/tst-chk1.c (do_test): Add test for swprintf with format
being the last argument.

ChangeLog
debug/tst-chk1.c
wcsmbs/bits/wchar2.h

index 9f8bfa838b4cc07ae60e5d0f7b8492e3eadf7375..01dd07a0b7d2e8bd2af9d4ab6adaf3c46bf5d049 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-07-21  Jakub Jelinek  <jakub@redhat.com>
+
+       * wcsmbs/bits/wchar2.h (swprintf): Remove format argument.
+       * debug/tst-chk1.c (do_test): Add test for swprintf with format
+       being the last argument.
+
 2005-07-20  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/x86_64/fpu/libm-test-ulps: Adjust expected atan2f results.
index f444a14c2a9a2fbc29acc5643a0ba0e255aaca53..c22c2e8fc223d5252b05f582aff3494d51082572 100644 (file)
@@ -406,6 +406,10 @@ do_test (void)
       || wmemcmp (wbuf, L"aabcEDX98", 10))
     FAIL ();
 
+  if (swprintf (wbuf + 7, 3, L"64") != 2
+      || wmemcmp (wbuf, L"aabcEDX64", 10))
+    FAIL ();
+
   /* These ops need runtime checking, but shouldn't __chk_fail.  */
   wmemcpy (wbuf, L"abcdefghij", l0 + 10);
   wmemmove (wbuf + 1, wbuf, l0 + 9);
index c102948f1110cad63ad6417783bcd1eb24aea3d8..8dd5b88014b225f198b15cc3b62cb668d98136b8 100644 (file)
@@ -199,11 +199,10 @@ extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n,
      __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 6))) */;
 
 /* XXX We might want to have support in gcc for swprintf.  */
-#define swprintf(s, n, format, ...) \
+#define swprintf(s, n, ...) \
   (__bos (s) != (size_t) -1 || __USE_FORTIFY_LEVEL > 1                       \
-   ? __swprintf_chk (s, n, __USE_FORTIFY_LEVEL - 1, __bos (s), format,       \
-                    __VA_ARGS__)                                             \
-   : swprintf (s, n, format, __VA_ARGS__))
+   ? __swprintf_chk (s, n, __USE_FORTIFY_LEVEL - 1, __bos (s), __VA_ARGS__)   \
+   : swprintf (s, n, __VA_ARGS__))
 
 
 extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n,