From owner-freebsd-ports Sat Oct 5 10:40:18 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAC7F37B401 for ; Sat, 5 Oct 2002 10:40:12 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C096743E65 for ; Sat, 5 Oct 2002 10:40:11 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g95HeBCo000203 for ; Sat, 5 Oct 2002 10:40:11 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g95HeBJp000202; Sat, 5 Oct 2002 10:40:11 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CF9737B401; Sat, 5 Oct 2002 10:39:29 -0700 (PDT) Received: from dibbler.ne.client2.attbi.com (dibbler.ne.client2.attbi.com [24.61.41.247]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D01543E3B; Sat, 5 Oct 2002 10:39:29 -0700 (PDT) (envelope-from rodrigc@attbi.com) Received: from dibbler.ne.client2.attbi.com (localhost.ne.attbi.com [127.0.0.1]) by dibbler.ne.client2.attbi.com (8.12.6/8.12.5) with ESMTP id g95He38A060071; Sat, 5 Oct 2002 13:40:03 -0400 (EDT) (envelope-from rodrigc@dibbler.ne.client2.attbi.com) Received: (from rodrigc@localhost) by dibbler.ne.client2.attbi.com (8.12.6/8.12.6/Submit) id g95He3OD060070; Sat, 5 Oct 2002 13:40:03 -0400 (EDT) Message-Id: <200210051740.g95He3OD060070@dibbler.ne.client2.attbi.com> Date: Sat, 5 Oct 2002 13:40:03 -0400 (EDT) From: Craig Rodrigues Reply-To: Craig Rodrigues To: FreeBSD-gnats-submit@FreeBSD.org Cc: eivind@FreeBSD.org, rodrigc@attbi.com X-Send-Pr-Version: 3.113 Subject: ports/43720: devel/re2c fixes for GCC 3.2 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 43720 >Category: ports >Synopsis: devel/re2c fixes for GCC 3.2 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Oct 05 10:40:11 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Craig Rodrigues >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD dibbler.ne.client2.attbi.com 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Sun Sep 8 09:39:46 EDT 2002 rodrigc@dibbler.ne.client2.attbi.com:/usr/obj/usr/src/sys/MYKERNEL1 i386 >Description: Need to change uchar to char in a few places. In GCC 3.2, ostream is a typedef: typedef basic_ostream ostream; Since this template can only for char, it is invalid to do something like: uchar foo; ostream.write(foo); Changing uchar to char does not hurt things because: sizeof(char) == sizeof(uchar) but: typeof(char) != typeof(uchar) GCC 3.2 is much more fussy about enforcing types for templates >How-To-Repeat: >Fix: diff -urN re2c.orig/files/patch-aa re2c/files/patch-aa --- re2c.orig/files/patch-aa Wed Dec 31 19:00:00 1969 +++ re2c/files/patch-aa Sat Oct 5 13:30:19 2002 @@ -0,0 +1,109 @@ +--- ./scanner.re.orig Thu Aug 26 23:46:32 1999 ++++ ./scanner.re Sat Oct 5 13:27:00 2002 +@@ -10,7 +10,7 @@ + + #define BSIZE 8192 + +-#define YYCTYPE uchar ++#define YYCTYPE char + #define YYCURSOR cursor + #define YYLIMIT lim + #define YYMARKER ptr +@@ -25,7 +25,7 @@ + ; + } + +-uchar *Scanner::fill(uchar *cursor){ ++char *Scanner::fill(char *cursor){ + if(!eof){ + uint cnt = tok - bot; + if(cnt){ +@@ -37,7 +37,7 @@ + lim -= cnt; + } + if((top - lim) < BSIZE){ +- uchar *buf = new uchar[(lim - bot) + BSIZE]; ++ char *buf = new char[(lim - bot) + BSIZE]; + memcpy(buf, tok, lim - tok); + tok = buf; + ptr = &buf[ptr - bot]; +@@ -68,7 +68,7 @@ + */ + + int Scanner::echo(ostream &out){ +- uchar *cursor = cur; ++ char *cursor = cur; + tok = cursor; + echo: + /*!re2c +@@ -85,7 +85,7 @@ + + + int Scanner::scan(){ +- uchar *cursor = cur; ++ char *cursor = cur; + uint depth; + + scan: +--- ./scanner.cc.orig Thu Aug 26 23:46:32 1999 ++++ ./scanner.cc Sat Oct 5 13:27:00 2002 +@@ -12,7 +12,7 @@ + + #define BSIZE 8192 + +-#define YYCTYPE uchar ++#define YYCTYPE char + #define YYCURSOR cursor + #define YYLIMIT lim + #define YYMARKER ptr +@@ -27,7 +27,7 @@ + ; + } + +-uchar *Scanner::fill(uchar *cursor){ ++char *Scanner::fill(char *cursor){ + if(!eof){ + uint cnt = tok - bot; + if(cnt){ +@@ -39,7 +39,7 @@ + lim -= cnt; + } + if((top - lim) < BSIZE){ +- uchar *buf = new uchar[(lim - bot) + BSIZE]; ++ char *buf = new char[(lim - bot) + BSIZE]; + memcpy(buf, tok, lim - tok); + tok = buf; + ptr = &buf[ptr - bot]; +@@ -62,7 +62,7 @@ + + + int Scanner::echo(ostream &out){ +- uchar *cursor = cur; ++ char *cursor = cur; + tok = cursor; + echo: + { +@@ -117,7 +117,7 @@ + + + int Scanner::scan(){ +- uchar *cursor = cur; ++ char *cursor = cur; + uint depth; + + scan: +--- ./scanner.h.orig Thu Aug 26 23:46:32 1999 ++++ ./scanner.h Sat Oct 5 13:27:00 2002 +@@ -6,10 +6,10 @@ + class Scanner { + private: + int in; +- uchar *bot, *tok, *ptr, *cur, *pos, *lim, *top, *eof; ++ char *bot, *tok, *ptr, *cur, *pos, *lim, *top, *eof; + uint tchar, tline, cline; + private: +- uchar *fill(uchar*); ++ char *fill(char*); + public: + Scanner(int); + int echo(ostream&); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message