|
|
b40826 |
2010-12-10 Andreas Schwab <schwab@redhat.com>
|
|
|
b40826 |
|
|
|
b40826 |
* wcsmbs/wchar.h (wcpcpy, wcpncpy): Only declare under
|
|
|
b40826 |
_GNU_SOURCE.
|
|
|
b40826 |
|
|
|
b40826 |
2010-12-10 Andreas Schwab <schwab@redhat.com>
|
|
|
b40826 |
|
|
|
b40826 |
* wcsmbs/wchar.h (wcpcpy, wcpncpy): Add __restrict.
|
|
|
b40826 |
* wcsmbs/bits/wchar2.h (__wmemmove_chk_warn, wmemmove, wmemset):
|
|
|
b40826 |
Remove __restrict.
|
|
|
b40826 |
(wcscpy, __wcpcpy_chk, __wcpcpy_alias, wcpcpy, wcsncpy, wcpncpy)
|
|
|
b40826 |
(wcscat, wcsncat, __wcrtomb_chk, wcrtomb): Add __restrict.
|
|
|
b40826 |
|
|
|
b40826 |
2010-12-09 Jakub Jelinek <jakub@redhat.com>
|
|
|
b40826 |
|
|
|
b40826 |
* string/bits/string3.h (memmove, bcopy): Remove __restrict.
|
|
|
b40826 |
|
|
|
b40826 |
Index: glibc-2.12-2-gc4ccff1/string/bits/string3.h
|
|
|
b40826 |
===================================================================
|
|
|
b40826 |
--- glibc-2.12-2-gc4ccff1.orig/string/bits/string3.h
|
|
|
b40826 |
+++ glibc-2.12-2-gc4ccff1/string/bits/string3.h
|
|
|
b40826 |
@@ -53,8 +53,7 @@ __NTH (memcpy (void *__restrict __dest,
|
|
|
b40826 |
}
|
|
|
b40826 |
|
|
|
b40826 |
__extern_always_inline void *
|
|
|
b40826 |
-__NTH (memmove (void *__restrict __dest, __const void *__restrict __src,
|
|
|
b40826 |
- size_t __len))
|
|
|
b40826 |
+__NTH (memmove (void *__dest, __const void *__src, size_t __len))
|
|
|
b40826 |
{
|
|
|
b40826 |
return __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
|
|
|
b40826 |
}
|
|
|
b40826 |
@@ -88,8 +87,7 @@ __NTH (memset (void *__dest, int __ch, s
|
|
|
b40826 |
|
|
|
b40826 |
#ifdef __USE_BSD
|
|
|
b40826 |
__extern_always_inline void
|
|
|
b40826 |
-__NTH (bcopy (__const void *__restrict __src, void *__restrict __dest,
|
|
|
b40826 |
- size_t __len))
|
|
|
b40826 |
+__NTH (bcopy (__const void *__src, void *__dest, size_t __len))
|
|
|
b40826 |
{
|
|
|
b40826 |
(void) __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
|
|
|
b40826 |
}
|
|
|
b40826 |
Index: glibc-2.12-2-gc4ccff1/wcsmbs/bits/wchar2.h
|
|
|
b40826 |
===================================================================
|
|
|
b40826 |
--- glibc-2.12-2-gc4ccff1.orig/wcsmbs/bits/wchar2.h
|
|
|
b40826 |
+++ glibc-2.12-2-gc4ccff1/wcsmbs/bits/wchar2.h
|
|
|
b40826 |
@@ -60,15 +60,13 @@ extern wchar_t *__REDIRECT_NTH (__wmemmo
|
|
|
b40826 |
__const wchar_t *__s2,
|
|
|
b40826 |
size_t __n), wmemmove);
|
|
|
b40826 |
extern wchar_t *__REDIRECT_NTH (__wmemmove_chk_warn,
|
|
|
b40826 |
- (wchar_t *__restrict __s1,
|
|
|
b40826 |
- __const wchar_t *__restrict __s2, size_t __n,
|
|
|
b40826 |
- size_t __ns1), __wmemmove_chk)
|
|
|
b40826 |
+ (wchar_t *__s1, __const wchar_t *__s2,
|
|
|
b40826 |
+ size_t __n, size_t __ns1), __wmemmove_chk)
|
|
|
b40826 |
__warnattr ("wmemmove called with length bigger than size of destination "
|
|
|
b40826 |
"buffer");
|
|
|
b40826 |
|
|
|
b40826 |
__extern_always_inline wchar_t *
|
|
|
b40826 |
-__NTH (wmemmove (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2,
|
|
|
b40826 |
- size_t __n))
|
|
|
b40826 |
+__NTH (wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n))
|
|
|
b40826 |
{
|
|
|
b40826 |
if (__bos0 (__s1) != (size_t) -1)
|
|
|
b40826 |
{
|
|
|
b40826 |
@@ -129,7 +127,7 @@ extern wchar_t *__REDIRECT_NTH (__wmemse
|
|
|
b40826 |
"buffer");
|
|
|
b40826 |
|
|
|
b40826 |
__extern_always_inline wchar_t *
|
|
|
b40826 |
-__NTH (wmemset (wchar_t *__restrict __s, wchar_t __c, size_t __n))
|
|
|
b40826 |
+__NTH (wmemset (wchar_t *__s, wchar_t __c, size_t __n))
|
|
|
b40826 |
{
|
|
|
b40826 |
if (__bos0 (__s) != (size_t) -1)
|
|
|
b40826 |
{
|
|
|
b40826 |
@@ -152,7 +150,7 @@ extern wchar_t *__REDIRECT_NTH (__wcscpy
|
|
|
b40826 |
__const wchar_t *__restrict __src), wcscpy);
|
|
|
b40826 |
|
|
|
b40826 |
__extern_always_inline wchar_t *
|
|
|
b40826 |
-__NTH (wcscpy (wchar_t *__dest, __const wchar_t *__src))
|
|
|
b40826 |
+__NTH (wcscpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src))
|
|
|
b40826 |
{
|
|
|
b40826 |
if (__bos (__dest) != (size_t) -1)
|
|
|
b40826 |
return __wcscpy_chk (__dest, __src, __bos (__dest) / sizeof (wchar_t));
|
|
|
b40826 |
@@ -160,14 +158,15 @@ __NTH (wcscpy (wchar_t *__dest, __const
|
|
|
b40826 |
}
|
|
|
b40826 |
|
|
|
b40826 |
|
|
|
b40826 |
-extern wchar_t *__wcpcpy_chk (wchar_t *__dest, __const wchar_t *__src,
|
|
|
b40826 |
+extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest,
|
|
|
b40826 |
+ __const wchar_t *__restrict __src,
|
|
|
b40826 |
size_t __destlen) __THROW;
|
|
|
b40826 |
-extern wchar_t *__REDIRECT_NTH (__wcpcpy_alias, (wchar_t *__dest,
|
|
|
b40826 |
- __const wchar_t *__src),
|
|
|
b40826 |
- wcpcpy);
|
|
|
b40826 |
+extern wchar_t *__REDIRECT_NTH (__wcpcpy_alias,
|
|
|
b40826 |
+ (wchar_t *__restrict __dest,
|
|
|
b40826 |
+ __const wchar_t *__restrict __src), wcpcpy);
|
|
|
b40826 |
|
|
|
b40826 |
__extern_always_inline wchar_t *
|
|
|
b40826 |
-__NTH (wcpcpy (wchar_t *__dest, __const wchar_t *__src))
|
|
|
b40826 |
+__NTH (wcpcpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src))
|
|
|
b40826 |
{
|
|
|
b40826 |
if (__bos (__dest) != (size_t) -1)
|
|
|
b40826 |
return __wcpcpy_chk (__dest, __src, __bos (__dest) / sizeof (wchar_t));
|
|
|
b40826 |
@@ -190,7 +189,8 @@ extern wchar_t *__REDIRECT_NTH (__wcsncp
|
|
|
b40826 |
"buffer");
|
|
|
b40826 |
|
|
|
b40826 |
__extern_always_inline wchar_t *
|
|
|
b40826 |
-__NTH (wcsncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n))
|
|
|
b40826 |
+__NTH (wcsncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src,
|
|
|
b40826 |
+ size_t __n))
|
|
|
b40826 |
{
|
|
|
b40826 |
if (__bos (__dest) != (size_t) -1)
|
|
|
b40826 |
{
|
|
|
b40826 |
@@ -220,7 +220,8 @@ extern wchar_t *__REDIRECT_NTH (__wcpncp
|
|
|
b40826 |
"buffer");
|
|
|
b40826 |
|
|
|
b40826 |
__extern_always_inline wchar_t *
|
|
|
b40826 |
-__NTH (wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n))
|
|
|
b40826 |
+__NTH (wcpncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src,
|
|
|
b40826 |
+ size_t __n))
|
|
|
b40826 |
{
|
|
|
b40826 |
if (__bos (__dest) != (size_t) -1)
|
|
|
b40826 |
{
|
|
|
b40826 |
@@ -243,7 +244,7 @@ extern wchar_t *__REDIRECT_NTH (__wcscat
|
|
|
b40826 |
__const wchar_t *__restrict __src), wcscat);
|
|
|
b40826 |
|
|
|
b40826 |
__extern_always_inline wchar_t *
|
|
|
b40826 |
-__NTH (wcscat (wchar_t *__dest, __const wchar_t *__src))
|
|
|
b40826 |
+__NTH (wcscat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src))
|
|
|
b40826 |
{
|
|
|
b40826 |
if (__bos (__dest) != (size_t) -1)
|
|
|
b40826 |
return __wcscat_chk (__dest, __src, __bos (__dest) / sizeof (wchar_t));
|
|
|
b40826 |
@@ -260,7 +261,8 @@ extern wchar_t *__REDIRECT_NTH (__wcsnca
|
|
|
b40826 |
size_t __n), wcsncat);
|
|
|
b40826 |
|
|
|
b40826 |
__extern_always_inline wchar_t *
|
|
|
b40826 |
-__NTH (wcsncat (wchar_t *__dest, __const wchar_t *__src, size_t __n))
|
|
|
b40826 |
+__NTH (wcsncat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src,
|
|
|
b40826 |
+ size_t __n))
|
|
|
b40826 |
{
|
|
|
b40826 |
if (__bos (__dest) != (size_t) -1)
|
|
|
b40826 |
return __wcsncat_chk (__dest, __src, __n,
|
|
|
b40826 |
@@ -428,14 +430,16 @@ fgetws_unlocked (wchar_t *__restrict __s
|
|
|
b40826 |
#endif
|
|
|
b40826 |
|
|
|
b40826 |
|
|
|
b40826 |
-extern size_t __wcrtomb_chk (char *__s, wchar_t __wchar, mbstate_t *__p,
|
|
|
b40826 |
- size_t __buflen) __THROW __wur;
|
|
|
b40826 |
+extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar,
|
|
|
b40826 |
+ mbstate_t *__restrict __p,
|
|
|
b40826 |
+ size_t __buflen) __THROW __wur;
|
|
|
b40826 |
extern size_t __REDIRECT_NTH (__wcrtomb_alias,
|
|
|
b40826 |
(char *__restrict __s, wchar_t __wchar,
|
|
|
b40826 |
mbstate_t *__restrict __ps), wcrtomb) __wur;
|
|
|
b40826 |
|
|
|
b40826 |
__extern_always_inline __wur size_t
|
|
|
b40826 |
-__NTH (wcrtomb (char *__s, wchar_t __wchar, mbstate_t *__ps))
|
|
|
b40826 |
+__NTH (wcrtomb (char *__restrict __s, wchar_t __wchar,
|
|
|
b40826 |
+ mbstate_t *__restrict __ps))
|
|
|
b40826 |
{
|
|
|
b40826 |
/* We would have to include <limits.h> to get a definition of MB_LEN_MAX.
|
|
|
b40826 |
But this would only disturb the namespace. So we define our own
|
|
|
b40826 |
Index: glibc-2.12-2-gc4ccff1/wcsmbs/wchar.h
|
|
|
b40826 |
===================================================================
|
|
|
b40826 |
--- glibc-2.12-2-gc4ccff1.orig/wcsmbs/wchar.h
|
|
|
b40826 |
+++ glibc-2.12-2-gc4ccff1/wcsmbs/wchar.h
|
|
|
b40826 |
@@ -555,17 +555,17 @@ extern float wcstof_l (__const wchar_t *
|
|
|
b40826 |
extern long double wcstold_l (__const wchar_t *__restrict __nptr,
|
|
|
b40826 |
wchar_t **__restrict __endptr,
|
|
|
b40826 |
__locale_t __loc) __THROW;
|
|
|
b40826 |
-#endif /* GNU */
|
|
|
b40826 |
|
|
|
b40826 |
|
|
|
b40826 |
-#ifdef __USE_XOPEN2K8
|
|
|
b40826 |
/* Copy SRC to DEST, returning the address of the terminating L'\0' in
|
|
|
b40826 |
DEST. */
|
|
|
b40826 |
-extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) __THROW;
|
|
|
b40826 |
+extern wchar_t *wcpcpy (wchar_t *__restrict __dest,
|
|
|
b40826 |
+ __const wchar_t *__restrict __src) __THROW;
|
|
|
b40826 |
|
|
|
b40826 |
/* Copy no more than N characters of SRC to DEST, returning the address of
|
|
|
b40826 |
the last character written into DEST. */
|
|
|
b40826 |
-extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n)
|
|
|
b40826 |
+extern wchar_t *wcpncpy (wchar_t *__restrict __dest,
|
|
|
b40826 |
+ __const wchar_t *__restrict __src, size_t __n)
|
|
|
b40826 |
__THROW;
|
|
|
b40826 |
#endif /* use GNU */
|
|
|
b40826 |
|