* [PATCH] add string.h(strerror_l) as POSIX, change string.h(str[n]casecmp_l) from POSIX to GNU, change strings.h(str[n]casecmp_l) from GNU to POSIX, use _EXFUN
@ 2016-08-24 20:36 Brian Inglis
0 siblings, 0 replies; 2+ messages in thread
From: Brian Inglis @ 2016-08-24 20:36 UTC (permalink / raw)
To: newlib
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
libc/include/strings.h | 8 ++++----
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/newlib/libc/include/string.h b/newlib/libc/include/string.h
index 8f4fd2e..96703b5 100644
--- a/newlib/libc/include/string.h
+++ b/newlib/libc/include/string.h
@@ -48,13 +48,14 @@ char *_EXFUN(strtok,(char *__restrict, const char *__restrict));
size_t _EXFUN(strxfrm,(char *__restrict, const char *__restrict, size_t));
#if __POSIX_VISIBLE >= 200809
-extern int strcasecmp_l (const char *, const char *, locale_t);
-extern int strncasecmp_l (const char *, const char *, size_t, locale_t);
-extern int strcoll_l (const char *, const char *, locale_t);
-extern size_t strxfrm_l (char *__restrict, const char *__restrict, size_t,
- locale_t);
+int _EXFUN(strcoll_l,(const char *, const char *, locale_t);
+char *_EXFUN(strerror_l,(int, locale_t);
+size_t _EXFUN(strxfrm_l,(char *__restrict, const char *__restrict, size_t, locale_t));
+#endif
+#if __GNU_VISIBLE
+int _EXFUN(strcasecmp_l,(const char *, const char *, locale_t));
+int _EXFUN(strncasecmp_l,(const char *, const char *, size_t, locale_t));
#endif
-
#if __MISC_VISIBLE || __POSIX_VISIBLE
char *_EXFUN(strtok_r,(char *__restrict, const char *__restrict, char **__restrict));
#endif
diff --git a/newlib/libc/include/strings.h b/newlib/libc/include/strings.h
index b462d07..60e995b 100644
--- a/newlib/libc/include/strings.h
+++ b/newlib/libc/include/strings.h
@@ -33,10 +33,10 @@ int _EXFUN(ffs,(int));
int _EXFUN(strcasecmp,(const char *, const char *));
int _EXFUN(strncasecmp,(const char *, const char *, size_t));
-#if __GNU_VISIBLE
-extern int strcasecmp_l (const char *, const char *, locale_t);
-extern int strncasecmp_l (const char *, const char *, size_t, locale_t);
-#endif /* _GNU_VISIBLE */
+#if __POSIX_VISIBLE >= 200809
+int _EXFUN(strcasecmp_l,(const char *, const char *, locale_t);
+int _EXFUN(strncasecmp_l,(const char *, const char *, size_t, locale_t);
+#endif /* __POSIX_VISIBLE >= 200809 */
_END_STD_C
--
2.8.3
^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <20160824203802.E51C2A803EE@calimero.vinschen.de>]
* Re: [PATCH] add string.h(strerror_l) as POSIX, change string.h(str[n]casecmp_l) from POSIX to GNU, change strings.h(str[n]casecmp_l) from GNU to POSIX, use _EXFUN
[not found] <20160824203802.E51C2A803EE@calimero.vinschen.de>
@ 2016-08-25 7:50 ` Corinna Vinschen
0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2016-08-25 7:50 UTC (permalink / raw)
To: Brian Inglis; +Cc: newlib
[-- Attachment #1: Type: text/plain, Size: 2418 bytes --]
On Aug 24 14:36, Brian Inglis wrote:
> diff --git a/newlib/libc/include/string.h b/newlib/libc/include/string.h
> index 8f4fd2e..96703b5 100644
> --- a/newlib/libc/include/string.h
> +++ b/newlib/libc/include/string.h
> @@ -48,13 +48,14 @@ char *_EXFUN(strtok,(char *__restrict, const char *__restrict));
> size_t _EXFUN(strxfrm,(char *__restrict, const char *__restrict, size_t));
>
> #if __POSIX_VISIBLE >= 200809
> -extern int strcasecmp_l (const char *, const char *, locale_t);
> -extern int strncasecmp_l (const char *, const char *, size_t, locale_t);
> -extern int strcoll_l (const char *, const char *, locale_t);
> -extern size_t strxfrm_l (char *__restrict, const char *__restrict, size_t,
> - locale_t);
> +int _EXFUN(strcoll_l,(const char *, const char *, locale_t);
> +char *_EXFUN(strerror_l,(int, locale_t);
> +size_t _EXFUN(strxfrm_l,(char *__restrict, const char *__restrict, size_t, locale_t));
> +#endif
> +#if __GNU_VISIBLE
> +int _EXFUN(strcasecmp_l,(const char *, const char *, locale_t));
> +int _EXFUN(strncasecmp_l,(const char *, const char *, size_t, locale_t));
> #endif
> -
> #if __MISC_VISIBLE || __POSIX_VISIBLE
> char *_EXFUN(strtok_r,(char *__restrict, const char *__restrict, char **__restrict));
> #endif
> diff --git a/newlib/libc/include/strings.h b/newlib/libc/include/strings.h
> index b462d07..60e995b 100644
> --- a/newlib/libc/include/strings.h
> +++ b/newlib/libc/include/strings.h
> @@ -33,10 +33,10 @@ int _EXFUN(ffs,(int));
> int _EXFUN(strcasecmp,(const char *, const char *));
> int _EXFUN(strncasecmp,(const char *, const char *, size_t));
>
> -#if __GNU_VISIBLE
> -extern int strcasecmp_l (const char *, const char *, locale_t);
> -extern int strncasecmp_l (const char *, const char *, size_t, locale_t);
> -#endif /* _GNU_VISIBLE */
> +#if __POSIX_VISIBLE >= 200809
> +int _EXFUN(strcasecmp_l,(const char *, const char *, locale_t);
> +int _EXFUN(strncasecmp_l,(const char *, const char *, size_t, locale_t);
> +#endif /* __POSIX_VISIBLE >= 200809 */
>
> _END_STD_C
Applied with changes. The usage of _EXFUN for new declarations has been
deprecated, and strings.h was missing the include to get the definition
of locale_t.
I also fixed the log message a bit. The subject line was a teeny little
bit long :)
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-25 7:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-24 20:36 [PATCH] add string.h(strerror_l) as POSIX, change string.h(str[n]casecmp_l) from POSIX to GNU, change strings.h(str[n]casecmp_l) from GNU to POSIX, use _EXFUN Brian Inglis
[not found] <20160824203802.E51C2A803EE@calimero.vinschen.de>
2016-08-25 7:50 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).