Skip to content

Commit

Permalink
* wcsmbs/bits/wchar2.h (swprintf): Remove format argument.
Browse files Browse the repository at this point in the history
	* debug/tst-chk1.c (do_test): Add test for swprintf with format
	being the last argument.

2005-07-21  Thorsten Kukuk  <kukuk@suse.de>

	* debug/getgroups_chk.c (__getgroups_chk): Fix return value.

	* stdio-common/fxprintf.c: Include string.h.
  • Loading branch information
Ulrich Drepper committed Jul 21, 2005
1 parent 35476e9 commit 757beee
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
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-21 Thorsten Kukuk <kukuk@suse.de>

* debug/getgroups_chk.c (__getgroups_chk): Fix return value.

* stdio-common/fxprintf.c: Include string.h.

2005-07-20 Ulrich Drepper <drepper@redhat.com>

* sysdeps/x86_64/fpu/libm-test-ulps: Adjust expected atan2f results.
Expand Down
2 changes: 1 addition & 1 deletion debug/getgroups_chk.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <unistd.h>


char *
int
__getgroups_chk (int size, __gid_t list[], size_t listlen)
{
if (__builtin_expect (size * sizeof (__gid_t) > listlen, 0))
Expand Down
4 changes: 4 additions & 0 deletions debug/tst-chk1.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,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);
Expand Down
1 change: 1 addition & 0 deletions stdio-common/fxprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <wchar.h>
#include <string.h>


int
Expand Down
7 changes: 3 additions & 4 deletions wcsmbs/bits/wchar2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 757beee

Please sign in to comment.