-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 95, 96 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
extern char *strncpy __P ((char *__dest, __const char *__src, size_t __n));
/* Append SRC onto DEST. */
-extern char *strcat __P ((char *__src, __const char *__dest));
+extern char *strcat __P ((char *__dest, __const char *__src));
/* Append no more than N characters from SRC onto DEST. */
extern char *strncat __P ((char *__dest, __const char *__src, size_t __n));
extern char *strdup __P ((__const char *__s));
#endif
+#if defined (__USE_GNU) && defined (__GNUC__)
+/* Duplicate S, returning an identical alloca'd string. */
+#define strdupa(s) \
+({ \
+ const char *__old = (s); \
+ size_t __len = strlen (__old) + 1; \
+ memcpy (__builtin_alloca (__len), __old, __len); \
+})
+#endif
+
/* Find the first occurrence of C in S. */
extern char *strchr __P ((__const char *__s, int __c));
/* Find the last occurrence of C in S. */
/* Return the length of S. */
extern size_t strlen __P ((__const char *__s));
-/* Return a string describing the meaning of the errno code in ERRNUM. */
+/* Return a string describing the meaning of the `errno' code in ERRNUM. */
extern char *strerror __P ((int __errnum));
+#ifdef __USE_REENTRANT
+/* Reentrant version of `strerror'. If a temporary buffer is required, at
+ most BUFLEN bytes of BUF will be used. */
+extern char *strerror_r __P ((int __errnum, char *__buf, int __buflen));
+#endif
#ifdef __USE_BSD
/* Find the first occurrence of C in S (same as strchr). */
extern int ffs __P ((int __i));
/* Compare S1 and S2, ignoring case. */
+extern int __strcasecmp __P ((__const char *__s1, __const char *__s2));
extern int strcasecmp __P ((__const char *__s1, __const char *__s2));
/* Return the next DELIM-delimited token from *STRINGP,
extern char *strsep __P ((char **__stringp, __const char *__delim));
#endif
-/* Copy no more than N characters of SRC to DEST, returning the address of
- the last character written into DEST. */
-extern char *__stpncpy __P ((char *__dest, __const char *__src, size_t __n));
-
#ifdef __USE_GNU
/* Compare no more than N chars of S1 and S2, ignoring case. */
extern int strncasecmp __P ((__const char *__s1, __const char *__s2,
extern char *strsignal __P ((int __sig));
/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */
+extern char *__stpcpy __P ((char *__dest, __const char *__src));
extern char *stpcpy __P ((char *__dest, __const char *__src));
/* Copy no more than N characters of SRC to DEST, returning the address of
the last character written into DEST. */
+extern char *__stpncpy __P ((char *__dest, __const char *__src, size_t __n));
extern char *stpncpy __P ((char *__dest, __const char *__src, size_t __n));
-#ifdef __OPTIMIZE__
-#define stpncpy(dest, src, n) __stpncpy ((dest), (src), (n))
-#endif
-
/* Sautee STRING briskly. */
extern char *strfry __P ((char *__string));