summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-05 21:21:01 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-05 21:21:01 +0000
commitbacb3513d998e94abc5681dfb8ec8ad7d6c0031f (patch)
tree754f1d9bb5bf53ddb1ed76aa6ece473e470d0772 /include
parentd560a541eb6b1d96fe8fe696cf395ca82f13c9ec (diff)
Sync w/ glibc and disable everything uClibc does not provide
Diffstat (limited to 'include')
-rw-r--r--include/string.h48
1 files changed, 19 insertions, 29 deletions
diff --git a/include/string.h b/include/string.h
index 4623a672b..a98248c96 100644
--- a/include/string.h
+++ b/include/string.h
@@ -111,8 +111,7 @@ extern size_t strxfrm (char *__restrict __dest,
__THROW __nonnull ((2));
__END_NAMESPACE_STD
-#ifdef __UCLIBC_HAS_XLOCALE__
-#ifdef __USE_GNU
+#if defined __USE_GNU && defined __UCLIBC_HAS_XLOCALE__
/* The following functions are equivalent to the both above but they
take the locale they use for the collation as an extra argument.
This is not standardsized but something like will come. */
@@ -121,17 +120,10 @@ __END_NAMESPACE_STD
/* Compare the collated forms of S1 and S2 using rules from L. */
extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
__THROW __attribute_pure__ __nonnull ((1, 2, 3));
-extern int __strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
- __THROW __attribute_pure__ __nonnull ((1, 2, 3));
-
/* Put a transformation of SRC into no more than N bytes of DEST. */
extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
__locale_t __l) __THROW __nonnull ((2, 4));
-extern size_t __strxfrm_l (char *__dest, __const char *__src, size_t __n,
- __locale_t __l) __THROW __nonnull ((2, 4));
-
#endif
-#endif /* __UCLIBC_HAS_XLOCALE__ */
#if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Duplicate S, returning an identical malloc'd string. */
@@ -210,10 +202,12 @@ __END_NAMESPACE_STD
/* Divide S into tokens separated by characters in DELIM. Information
passed between calls are stored in SAVE_PTR. */
+#if 0 /* uClibc: disabled */
extern char *__strtok_r (char *__restrict __s,
__const char *__restrict __delim,
char **__restrict __save_ptr)
__THROW __nonnull ((2, 3));
+#endif
#if defined __USE_POSIX || defined __USE_MISC
extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
char **__restrict __save_ptr)
@@ -265,12 +259,6 @@ __BEGIN_NAMESPACE_STD
/* Return a string describing the meaning of the `errno' code in ERRNUM. */
extern char *strerror (int __errnum) __THROW;
__END_NAMESPACE_STD
-
-extern char *__glibc_strerror_r (int __errnum, char *__buf, size_t __buflen)
- __THROW __nonnull ((2));
-extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen)
- __THROW __nonnull ((2));
-
#if defined __USE_XOPEN2K || defined __USE_MISC
/* Reentrant version of `strerror'.
There are 2 flavors of `strerror_r', GNU which returns the string
@@ -282,8 +270,10 @@ extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen)
# if defined __USE_XOPEN2K && !defined __USE_GNU
/* Fill BUF with a string describing the meaning of the `errno' code in
ERRNUM. */
-# ifdef __REDIRECT
-extern int __REDIRECT (strerror_r,
+extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen)
+ __THROW __nonnull ((2));
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (strerror_r,
(int __errnum, char *__buf, size_t __buflen),
__xpg_strerror_r) __nonnull ((2));
# else
@@ -292,8 +282,10 @@ extern int __REDIRECT (strerror_r,
# else
/* If a temporary buffer is required, at most BUFLEN bytes of BUF will be
used. */
-# ifdef __REDIRECT
-extern char * __REDIRECT (strerror_r,
+extern char *__glibc_strerror_r (int __errnum, char *__buf, size_t __buflen)
+ __THROW __nonnull ((2));
+# ifdef __REDIRECT_NTH
+extern char * __REDIRECT_NTH (strerror_r,
(int __errnum, char *__buf, size_t __buflen),
__glibc_strerror_r) __nonnull ((2));
# else
@@ -334,7 +326,7 @@ extern int ffs (int __i) __THROW __attribute__ ((__const__));
/* The following two functions are non-standard but necessary for non-32 bit
platforms. */
-# ifdef __USE_GNU
+#if 0 /*def __USE_GNU*/
extern int ffsl (long int __l) __THROW __attribute__ ((__const__));
# ifdef __GNUC__
__extension__ extern int ffsll (long long int __ll)
@@ -351,25 +343,17 @@ extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
__THROW __attribute_pure__ __nonnull ((1, 2));
#endif /* Use BSD. */
-#ifdef __UCLIBC_HAS_XLOCALE__
-#ifdef __USE_GNU
+#if defined __USE_GNU && defined __UCLIBC_HAS_XLOCALE__
/* Again versions of a few functions which use the given locale instead
of the global one. */
extern int strcasecmp_l (__const char *__s1, __const char *__s2,
__locale_t __loc)
__THROW __attribute_pure__ __nonnull ((1, 2, 3));
-extern int __strcasecmp_l (__const char *__s1, __const char *__s2,
- __locale_t __loc)
- __THROW __attribute_pure__ __nonnull ((1, 2, 3));
extern int strncasecmp_l (__const char *__s1, __const char *__s2,
size_t __n, __locale_t __loc)
__THROW __attribute_pure__ __nonnull ((1, 2, 4));
-extern int __strncasecmp_l (__const char *__s1, __const char *__s2,
- size_t __n, __locale_t __loc)
- __THROW __attribute_pure__ __nonnull ((1, 2, 4));
#endif
-#endif /* __UCLIBC_HAS_XLOCALE__ */
#ifdef __USE_BSD
/* Return the next DELIM-delimited token from *STRINGP,
@@ -381,23 +365,29 @@ extern char *strsep (char **__restrict __stringp,
#ifdef __USE_GNU
/* Compare S1 and S2 as strings holding name & indices/version numbers. */
+#if 0
extern int strverscmp (__const char *__s1, __const char *__s2)
__THROW __attribute_pure__ __nonnull ((1, 2));
+#endif
/* Return a string describing the meaning of the signal number in SIG. */
extern char *strsignal (int __sig) __THROW;
/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */
+#if 0 /* uClibc: disabled */
extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
__THROW __nonnull ((1, 2));
+#endif
extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
__THROW __nonnull ((1, 2));
/* Copy no more than N characters of SRC to DEST, returning the address of
the last character written into DEST. */
+#if 0 /* uClibc: disabled */
extern char *__stpncpy (char *__restrict __dest,
__const char *__restrict __src, size_t __n)
__THROW __nonnull ((1, 2));
+#endif
extern char *stpncpy (char *__restrict __dest,
__const char *__restrict __src, size_t __n)
__THROW __nonnull ((1, 2));