From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110163 invoked by alias); 17 Oct 2016 14:58:42 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 110095 invoked by uid 9078); 17 Oct 2016 14:58:41 -0000 Date: Mon, 17 Oct 2016 14:58:00 -0000 Message-ID: <20161017145841.110093.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Make ctype_.c and ctype_.h agree on _ctype_b type X-Act-Checkin: newlib-cygwin X-Git-Author: Thomas Preud'homme X-Git-Refname: refs/heads/master X-Git-Oldrev: f763e2dc88d04430dd2524a529eef91a2e517e4e X-Git-Newrev: 8394e47d73dbeb298a138b88c4d3718e8672cd55 X-SW-Source: 2016-q4/txt/msg00000.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=8394e47d73dbeb298a138b88c4d3718e8672cd55 commit 8394e47d73dbeb298a138b88c4d3718e8672cd55 Author: Thomas Preud'homme Date: Tue Sep 6 11:26:55 2016 +0100 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. Diff: --- 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 */