This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[patch for libg++] Re: 1990314 fails to build


On Mar 14, 1999, Alexandre Oliva <oliva@dcc.unicamp.br> wrote:

> On Mar 14, 1999, Dave Gilbert <gilbertd@treblig.org> wrote:

>> iostream.cc:130: prototype for `class istream & istream::read(char *,
>> int)' does not match any in class `istream'
>> iostream.h:143: candidates are: class istream & istream::read(void *, long
>> int)
> [snip]
>> `/home/gilbertd/egcs-source/egcs-19990314/alphaev56-unknown-linux-gnu/libio'

> Same here...  The attached patch has fixed it (ok to install?),

Even though a patch by Mark Mitchell has already fixed the bug that
exposed this problem, I still think that it would be wise to make
ios::streamsize be the same type as ::streamsize, wouldn't it?

> Unfortunately, at least on alpha-dec-osf4.0, I got more failures after 
> the one you posted:

The problem is that, on DU4.0, some definitions of
/usr/include/reg_types.h conflict with those in libg++/librx/rx.h

reg_types.h is
        included from /usr/include/sys/lc_core.h:64,
                 from /usr/include/sys/localedef.h:79,
                 from /usr/include/ctype.h:111,
                 from /home/msc/oliva/src/egcs-main/libg++/src/Regex.cc:26:

I've come up with the attached (admittedly dirty and error-prone :-)
patch to work around the problem.  The weird thing is, although I
started using libg++ 2.8.1.3 at least 2 weeks ago, the problem only
appeared in the last snapshot.  But I thought Martin would like to
know about it...

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva aoliva@{acm.org,computer.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Instituto de Computação, Universidade Estadual de Campinas, SP, Brasil
*** E-mail about software projects will be forwarded to mailing lists
--- libg++-2.8.1.3/librx/rx.h~	Tue Feb 23 10:24:04 1999
+++ libg++-2.8.1.3/librx/rx.h	Tue Mar 16 15:34:06 1999
@@ -1,6 +1,9 @@
 #if !defined(RXH) || defined(RX_WANT_SE_DEFS)
 #define RXH
 
+#define regex_t _G_regex_t
+#define regmatch_t _G_regmatch_t
+
 /*	Copyright (C) 1992, 1993 Free Software Foundation, Inc.
 
 This file is part of the librx library.
@@ -1285,7 +1288,7 @@
 };
 
 /* Type for byte offsets within the string.  POSIX mandates this.  */
-typedef int regoff_t;
+typedef off_t regoff_t;
 
 /* This is the structure we store register match data in.  See
    regex.texinfo for a full description of what registers match.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]