X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnu%2Fstring.in.h;h=895c6ba2d6f965eacde7c3dfd202fee1db491f2c;hb=1a44d77d50f4fb37c0410eed04b82303624ea2ec;hp=22de096e6d5244328ea7e6d6d07215676259862f;hpb=dda6367c9eac71da8f2ab1c60b3df60f19ce4755;p=debian%2Ftar diff --git a/gnu/string.in.h b/gnu/string.in.h index 22de096e..895c6ba2 100644 --- a/gnu/string.in.h +++ b/gnu/string.in.h @@ -2,7 +2,7 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 1995-1996, 2001-2010 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -39,13 +39,8 @@ # include #endif -#ifndef __attribute__ -/* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) -# define __attribute__(Spec) /* empty */ -# endif -#endif -/* The attribute __pure__ was added in gcc 2.96. */ +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) #else @@ -89,7 +84,7 @@ _GL_CXXALIAS_SYS_CAST2 (memchr, void *, (void const *__s, int __c, size_t __n), void const *, (void const *__s, int __c, size_t __n)); # endif -# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \ +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); _GL_CXXALIASWARN1 (memchr, void const *, @@ -174,7 +169,7 @@ _GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t) _GL_CXXALIAS_SYS_CAST2 (memrchr, void *, (void const *, int, size_t), void const *, (void const *, int, size_t)); -# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \ +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); _GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); @@ -204,7 +199,7 @@ _GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in) _GL_CXXALIAS_SYS_CAST2 (rawmemchr, void *, (void const *__s, int __c_in), void const *, (void const *__s, int __c_in)); -# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \ +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); _GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); @@ -295,7 +290,7 @@ _GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in) _GL_CXXALIAS_SYS_CAST2 (strchrnul, char *, (char const *__s, int __c_in), char const *, (char const *__s, int __c_in)); -# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \ +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); _GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); @@ -441,7 +436,7 @@ _GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept) _GL_CXXALIAS_SYS_CAST2 (strpbrk, char *, (char const *__s, char const *__accept), const char *, (char const *__s, char const *__accept)); -# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \ +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); _GL_CXXALIASWARN1 (strpbrk, char const *, @@ -543,7 +538,7 @@ _GL_CXXALIAS_SYS_CAST2 (strstr, char *, (const char *haystack, const char *needle), const char *, (const char *haystack, const char *needle)); # endif -# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \ +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); _GL_CXXALIASWARN1 (strstr, const char *, @@ -592,7 +587,7 @@ _GL_CXXALIAS_SYS_CAST2 (strcasestr, char *, (const char *haystack, const char *needle), const char *, (const char *haystack, const char *needle)); # endif -# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \ +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); _GL_CXXALIASWARN1 (strcasestr, const char *, @@ -904,6 +899,35 @@ _GL_WARN_ON_USE (strerror, "strerror is unportable - " "use gnulib module strerror to guarantee non-NULL result"); #endif +/* Map any int, typically from errno, into an error message. Multithread-safe. + Uses the POSIX declaration, not the glibc declaration. */ +#if @GNULIB_STRERROR_R@ +# if @REPLACE_STRERROR_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strerror_r +# define strerror_r rpl_strerror_r +# endif +_GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)); +# else +# if !@HAVE_DECL_STRERROR_R@ +_GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); +# endif +# if @HAVE_DECL_STRERROR_R@ +_GL_CXXALIASWARN (strerror_r); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strerror_r +# if HAVE_RAW_DECL_STRERROR_R +_GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " + "use gnulib module strerror_r-posix for portability"); +# endif +#endif + #if @GNULIB_STRSIGNAL@ # if @REPLACE_STRSIGNAL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE)