public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Include wctype.h in wchar.h as an XSI extension
@ 2016-08-11 21:38 Yaakov Selkowitz
  2016-08-12  7:44 ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: Yaakov Selkowitz @ 2016-08-11 21:38 UTC (permalink / raw)
  To: newlib

However, note that this inclusion is obsolescent in SUSv4 and therefore
may be removed in the next revision.

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/wchar.h.html

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
---
 newlib/libc/include/wchar.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/newlib/libc/include/wchar.h b/newlib/libc/include/wchar.h
index d5fc26f..e5b840d 100644
--- a/newlib/libc/include/wchar.h
+++ b/newlib/libc/include/wchar.h
@@ -20,6 +20,10 @@
 /* For __STDC_ISO_10646__ */
 #include <sys/features.h>
 
+#if __XSI_VISIBLE /* && __XSI_VISIBLE < 800 */
+#include <wctype.h>
+#endif
+
 #ifndef WEOF
 # define WEOF ((wint_t)-1)
 #endif
-- 
2.8.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Include wctype.h in wchar.h as an XSI extension
  2016-08-11 21:38 [PATCH] Include wctype.h in wchar.h as an XSI extension Yaakov Selkowitz
@ 2016-08-12  7:44 ` Corinna Vinschen
  2016-08-12 18:48   ` [PATCH] Do not include wctype.h in wchar.h with _GNU_SOURCE Yaakov Selkowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Corinna Vinschen @ 2016-08-12  7:44 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 924 bytes --]

On Aug 11 16:37, Yaakov Selkowitz wrote:
> However, note that this inclusion is obsolescent in SUSv4 and therefore
> may be removed in the next revision.
> 
> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/wchar.h.html
> 
> Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
> ---
>  newlib/libc/include/wchar.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/newlib/libc/include/wchar.h b/newlib/libc/include/wchar.h
> index d5fc26f..e5b840d 100644
> --- a/newlib/libc/include/wchar.h
> +++ b/newlib/libc/include/wchar.h
> @@ -20,6 +20,10 @@
>  /* For __STDC_ISO_10646__ */
>  #include <sys/features.h>
>  
> +#if __XSI_VISIBLE /* && __XSI_VISIBLE < 800 */
> +#include <wctype.h>
> +#endif
> +
>  #ifndef WEOF
>  # define WEOF ((wint_t)-1)
>  #endif
> -- 
> 2.8.3

Looks good, please apply.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Do not include wctype.h in wchar.h with _GNU_SOURCE
  2016-08-12  7:44 ` Corinna Vinschen
@ 2016-08-12 18:48   ` Yaakov Selkowitz
  2016-08-12 19:24     ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: Yaakov Selkowitz @ 2016-08-12 18:48 UTC (permalink / raw)
  To: newlib

_GNU_SOURCE generally enables all features, but in this case the POSIX
requirement to #include <wctype.h> for these is preferred.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
---
 newlib/libc/include/wchar.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newlib/libc/include/wchar.h b/newlib/libc/include/wchar.h
index f4996ec..3a2b89b 100644
--- a/newlib/libc/include/wchar.h
+++ b/newlib/libc/include/wchar.h
@@ -33,7 +33,7 @@ typedef __gnuc_va_list va_list;
 #endif
 #endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */
 
-#if __XSI_VISIBLE /* && __XSI_VISIBLE < 800 */
+#if __XSI_VISIBLE /* && __XSI_VISIBLE < 800 */ && !__GNU_VISIBLE
 #include <wctype.h>
 #endif
 
-- 
2.8.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Do not include wctype.h in wchar.h with _GNU_SOURCE
  2016-08-12 18:48   ` [PATCH] Do not include wctype.h in wchar.h with _GNU_SOURCE Yaakov Selkowitz
@ 2016-08-12 19:24     ` Corinna Vinschen
  0 siblings, 0 replies; 4+ messages in thread
From: Corinna Vinschen @ 2016-08-12 19:24 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

On Aug 12 13:47, Yaakov Selkowitz wrote:
> _GNU_SOURCE generally enables all features, but in this case the POSIX
> requirement to #include <wctype.h> for these is preferred.
> 
> Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
> ---
>  newlib/libc/include/wchar.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/newlib/libc/include/wchar.h b/newlib/libc/include/wchar.h
> index f4996ec..3a2b89b 100644
> --- a/newlib/libc/include/wchar.h
> +++ b/newlib/libc/include/wchar.h
> @@ -33,7 +33,7 @@ typedef __gnuc_va_list va_list;
>  #endif
>  #endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */
>  
> -#if __XSI_VISIBLE /* && __XSI_VISIBLE < 800 */
> +#if __XSI_VISIBLE /* && __XSI_VISIBLE < 800 */ && !__GNU_VISIBLE
>  #include <wctype.h>
>  #endif
>  
> -- 
> 2.8.3

ACK, as discussed on IRC.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-12 19:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-11 21:38 [PATCH] Include wctype.h in wchar.h as an XSI extension Yaakov Selkowitz
2016-08-12  7:44 ` Corinna Vinschen
2016-08-12 18:48   ` [PATCH] Do not include wctype.h in wchar.h with _GNU_SOURCE Yaakov Selkowitz
2016-08-12 19:24     ` 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).