summaryrefslogtreecommitdiff
path: root/include/wchar.h
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-03-13 01:35:42 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:23 +0200
commit511f959892f039842feef9618738a8de9c860b92 (patch)
tree3edb2540a2b77682e8843f5fd0012504d30edb97 /include/wchar.h
parentb59d17b4c3c16942954830d95afffa15d4ba332a (diff)
wchar.h: SuSv compliance
add restrict keyword to wcsstr/wcswcs remove restrict keyword from wmemcmp Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'include/wchar.h')
-rw-r--r--include/wchar.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/wchar.h b/include/wchar.h
index 78a8344c9..aee2b6ee8 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -133,11 +133,11 @@ __BEGIN_NAMESPACE_STD
/* This incomplete type is defined in <time.h> but needed here because
of `wcsftime'. */
struct tm;
+__END_NAMESPACE_STD
/* XXX We have to clean this up at some point. Since tm is in the std
namespace but wcsftime is in __c99 the type wouldn't be found
without inserting it in the global namespace. */
__USING_NAMESPACE_STD(tm)
-__END_NAMESPACE_STD
__BEGIN_NAMESPACE_C99
@@ -257,7 +257,8 @@ extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept)
__THROW __attribute_pure__;
libc_hidden_proto(wcspbrk)
/* Find the first occurrence of NEEDLE in HAYSTACK. */
-extern wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle)
+/* SuSv uses restrict keyword, glibc does not */
+extern wchar_t *wcsstr (__const wchar_t *__restrict __haystack, __const wchar_t *__restrict __needle)
__THROW __attribute_pure__;
/* Divide WCS into tokens separated by characters in DELIM. */
@@ -272,7 +273,9 @@ __END_NAMESPACE_C99
#if defined __USE_XOPEN && defined __UCLIBC_SUSV3_LEGACY__
/* Another name for `wcsstr' from XPG4. */
-extern wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle)
+/* SuSv3 did not use restrict keyword, probably because it was marked LEGACY
+ we do to be in sync with wcsstr */
+extern wchar_t *wcswcs (__const wchar_t *__restrict __haystack, __const wchar_t *__restrict __needle)
__THROW __attribute_pure__;
#endif
@@ -291,8 +294,9 @@ extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n)
libc_hidden_proto(wmemchr)
/* Compare N wide characters of S1 and S2. */
-extern int wmemcmp (__const wchar_t *__restrict __s1,
- __const wchar_t *__restrict __s2, size_t __n)
+/* SuSv4 does not use restrict keyword for S1 and S2, glibc does */
+extern int wmemcmp (__const wchar_t *__s1,
+ __const wchar_t *__s2, size_t __n)
__THROW __attribute_pure__;
/* Copy N wide characters of SRC to DEST. */