public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH, newlib] Make ctype_.c and ctype_.h agree on _ctype_b type
@ 2016-09-13 10:53 Thomas Preudhomme
  2016-09-20 17:58 ` [PATCH, newlib, ping] " Thomas Preudhomme
  2016-10-17 14:59 ` [PATCH, newlib] " Corinna Vinschen
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Preudhomme @ 2016-09-13 10:53 UTC (permalink / raw)
  To: newlib

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

Hi,

_ctype_b is defined in ctype_.c as a const char array for non cygwin targets 
allowing negative ctype index but as a char array for the same
targets in ctype_.h, giving type conflict at compile time.  This is because the 
cygwin targets are not treated specially in the latter file.
This patch adds the necessary logic for cygwin targets in ctype_.h.

Is this ok for master branch?

Best regards,

Thomas

[-- Attachment #2: consistent_ctype_definition_declaration.patch --]
[-- Type: text/x-patch, Size: 1078 bytes --]

From d0d7c27c247aeec7bbfe80378961b653b08b9d2b Mon Sep 17 00:00:00 2001
From: Thomas Preud'homme <thomas.preudhomme@arm.com>
Date: Tue, 6 Sep 2016 11:26:55 +0100
Subject: [PATCH] Make ctype_.c and ctype_.h agree on _ctype_b type

_ctype_b is defined in ctype_.c as a const char array for non cygwin
targets allowing negative ctype index but as a char array for the same
targets in ctype_.h, giving type conflict at compile time.  This is
because the cygwin targets are not treated specially in the latter file.
This patch adds the necessary logic for cygwin targets in ctype_.h.
---
 newlib/libc/ctype/ctype_.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/newlib/libc/ctype/ctype_.h b/newlib/libc/ctype/ctype_.h
index 10a4b42..5356d38 100644
--- a/newlib/libc/ctype/ctype_.h
+++ b/newlib/libc/ctype/ctype_.h
@@ -6,7 +6,11 @@
 
 #ifdef ALLOW_NEGATIVE_CTYPE_INDEX
 
+#ifndef __CYGWIN__
+  extern _CONST char _ctype_b[];
+#else
   extern char _ctype_b[];
+#endif
 # define DEFAULT_CTYPE_PTR	((char *) _ctype_b + 127)
 
 #else	/* !ALLOW_NEGATIVE_CTYPE_INDEX */
-- 
1.9.1


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

* Re: [PATCH, newlib, ping] Make ctype_.c and ctype_.h agree on _ctype_b type
  2016-09-13 10:53 [PATCH, newlib] Make ctype_.c and ctype_.h agree on _ctype_b type Thomas Preudhomme
@ 2016-09-20 17:58 ` Thomas Preudhomme
  2016-10-03 16:11   ` [PATCH, newlib, ping2] " Thomas Preudhomme
  2016-10-17 14:59 ` [PATCH, newlib] " Corinna Vinschen
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Preudhomme @ 2016-09-20 17:58 UTC (permalink / raw)
  To: newlib

Ping?

Best regards,

Thomas

On 13/09/16 11:52, Thomas Preudhomme wrote:
> Hi,
>
> _ctype_b is defined in ctype_.c as a const char array for non cygwin targets
> allowing negative ctype index but as a char array for the same
> targets in ctype_.h, giving type conflict at compile time.  This is because the
> cygwin targets are not treated specially in the latter file.
> This patch adds the necessary logic for cygwin targets in ctype_.h.
>
> Is this ok for master branch?
>
> Best regards,
>
> Thomas

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

* Re: [PATCH, newlib, ping2] Make ctype_.c and ctype_.h agree on _ctype_b type
  2016-09-20 17:58 ` [PATCH, newlib, ping] " Thomas Preudhomme
@ 2016-10-03 16:11   ` Thomas Preudhomme
  2016-10-12  8:27     ` [PATCH, newlib, ping3] " Thomas Preudhomme
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Preudhomme @ 2016-10-03 16:11 UTC (permalink / raw)
  To: newlib

Ping?

Best regards,

Thomas

On 20/09/16 18:58, Thomas Preudhomme wrote:
> Ping?
>
> Best regards,
>
> Thomas
>
> On 13/09/16 11:52, Thomas Preudhomme wrote:
>> Hi,
>>
>> _ctype_b is defined in ctype_.c as a const char array for non cygwin targets
>> allowing negative ctype index but as a char array for the same
>> targets in ctype_.h, giving type conflict at compile time.  This is because the
>> cygwin targets are not treated specially in the latter file.
>> This patch adds the necessary logic for cygwin targets in ctype_.h.
>>
>> Is this ok for master branch?
>>
>> Best regards,
>>
>> Thomas

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

* Re: [PATCH, newlib, ping3] Make ctype_.c and ctype_.h agree on _ctype_b type
  2016-10-03 16:11   ` [PATCH, newlib, ping2] " Thomas Preudhomme
@ 2016-10-12  8:27     ` Thomas Preudhomme
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Preudhomme @ 2016-10-12  8:27 UTC (permalink / raw)
  To: newlib

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

Ping?

Best regards,

Thomas

On 03/10/16 17:11, Thomas Preudhomme wrote:
> Ping?
>
> Best regards,
>
> Thomas
>
> On 20/09/16 18:58, Thomas Preudhomme wrote:
>> Ping?
>>
>> Best regards,
>>
>> Thomas
>>
>> On 13/09/16 11:52, Thomas Preudhomme wrote:
>>> Hi,
>>>
>>> _ctype_b is defined in ctype_.c as a const char array for non cygwin targets
>>> allowing negative ctype index but as a char array for the same
>>> targets in ctype_.h, giving type conflict at compile time.  This is because the
>>> cygwin targets are not treated specially in the latter file.
>>> This patch adds the necessary logic for cygwin targets in ctype_.h.
>>>
>>> Is this ok for master branch?
>>>
>>> Best regards,
>>>
>>> Thomas

[-- Attachment #2: consistent_ctype_definition_declaration.patch --]
[-- Type: text/x-patch, Size: 1078 bytes --]

From d0d7c27c247aeec7bbfe80378961b653b08b9d2b Mon Sep 17 00:00:00 2001
From: Thomas Preud'homme <thomas.preudhomme@arm.com>
Date: Tue, 6 Sep 2016 11:26:55 +0100
Subject: [PATCH] Make ctype_.c and ctype_.h agree on _ctype_b type

_ctype_b is defined in ctype_.c as a const char array for non cygwin
targets allowing negative ctype index but as a char array for the same
targets in ctype_.h, giving type conflict at compile time.  This is
because the cygwin targets are not treated specially in the latter file.
This patch adds the necessary logic for cygwin targets in ctype_.h.
---
 newlib/libc/ctype/ctype_.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/newlib/libc/ctype/ctype_.h b/newlib/libc/ctype/ctype_.h
index 10a4b42..5356d38 100644
--- a/newlib/libc/ctype/ctype_.h
+++ b/newlib/libc/ctype/ctype_.h
@@ -6,7 +6,11 @@
 
 #ifdef ALLOW_NEGATIVE_CTYPE_INDEX
 
+#ifndef __CYGWIN__
+  extern _CONST char _ctype_b[];
+#else
   extern char _ctype_b[];
+#endif
 # define DEFAULT_CTYPE_PTR	((char *) _ctype_b + 127)
 
 #else	/* !ALLOW_NEGATIVE_CTYPE_INDEX */
-- 
1.9.1


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

* Re: [PATCH, newlib] Make ctype_.c and ctype_.h agree on _ctype_b type
  2016-09-13 10:53 [PATCH, newlib] Make ctype_.c and ctype_.h agree on _ctype_b type Thomas Preudhomme
  2016-09-20 17:58 ` [PATCH, newlib, ping] " Thomas Preudhomme
@ 2016-10-17 14:59 ` Corinna Vinschen
  1 sibling, 0 replies; 5+ messages in thread
From: Corinna Vinschen @ 2016-10-17 14:59 UTC (permalink / raw)
  To: newlib

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

On Sep 13 11:52, Thomas Preudhomme wrote:
> Hi,
> 
> _ctype_b is defined in ctype_.c as a const char array for non cygwin targets
> allowing negative ctype index but as a char array for the same
> targets in ctype_.h, giving type conflict at compile time.  This is because
> the cygwin targets are not treated specially in the latter file.
> This patch adds the necessary logic for cygwin targets in ctype_.h.
> 
> Is this ok for master branch?
> 
> Best regards,
> 
> Thomas

> >From d0d7c27c247aeec7bbfe80378961b653b08b9d2b Mon Sep 17 00:00:00 2001
> From: Thomas Preud'homme <thomas.preudhomme@arm.com>
> Date: Tue, 6 Sep 2016 11:26:55 +0100
> Subject: [PATCH] Make ctype_.c and ctype_.h agree on _ctype_b type
> 
> _ctype_b is defined in ctype_.c as a const char array for non cygwin
> targets allowing negative ctype index but as a char array for the same
> targets in ctype_.h, giving type conflict at compile time.  This is
> because the cygwin targets are not treated specially in the latter file.
> This patch adds the necessary logic for cygwin targets in ctype_.h.
> ---
>  newlib/libc/ctype/ctype_.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/newlib/libc/ctype/ctype_.h b/newlib/libc/ctype/ctype_.h
> index 10a4b42..5356d38 100644
> --- a/newlib/libc/ctype/ctype_.h
> +++ b/newlib/libc/ctype/ctype_.h
> @@ -6,7 +6,11 @@
>  
>  #ifdef ALLOW_NEGATIVE_CTYPE_INDEX
>  
> +#ifndef __CYGWIN__
> +  extern _CONST char _ctype_b[];
> +#else
>    extern char _ctype_b[];
> +#endif
>  # define DEFAULT_CTYPE_PTR	((char *) _ctype_b + 127)
>  
>  #else	/* !ALLOW_NEGATIVE_CTYPE_INDEX */
> -- 
> 1.9.1
> 

Patch applied.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

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

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

end of thread, other threads:[~2016-10-17 14:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-13 10:53 [PATCH, newlib] Make ctype_.c and ctype_.h agree on _ctype_b type Thomas Preudhomme
2016-09-20 17:58 ` [PATCH, newlib, ping] " Thomas Preudhomme
2016-10-03 16:11   ` [PATCH, newlib, ping2] " Thomas Preudhomme
2016-10-12  8:27     ` [PATCH, newlib, ping3] " Thomas Preudhomme
2016-10-17 14:59 ` [PATCH, newlib] " 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).