Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Sun, 4 Jan 2004 12:23:51 +0100
From: "Gerrit P. Haase" <gp@familiehaase.de>
Reply-To: "Gerrit @ cygwin" <cygwin@cygwin.com>
Organization: Esse keine toten Tiere
Message-ID: <1786768525.20040104122351@familiehaase.de>
To: Beman Dawes <bdawes@acm.org>
CC: cygwin@cygwin.com, "John Maddock" <john@johnmaddock.co.uk>
Subject: Re: Bug in fstream code and gcc-2 package?
In-Reply-To: <4.3.2.7.2.20040103203307.02db8880@mailhost.esva.net>
References: <4.3.2.7.2.20040103092732.02db6dd0@mailhost.esva.net> <01e101c3d1f1$9bc8d6a0$29750252@fuji> <4.3.2.7.2.20040103092732.02db6dd0@mailhost.esva.net> <4.3.2.7.2.20040103203307.02db8880@mailhost.esva.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

Hallo Beman,

Am Sonntag, 4. Januar 2004 um 02:55 schriebst du:

>>$ g++ -mno-cygwin fstream.cpp
> In file included from 
> /usr/local/include/c++/3.3.1/bits/locale_facets.h:166,

The default location for Cygwin & MinGW files distributed by the
Cygwin project is /usr but not /usr/local, I suggest that you try to
setup a new Cygwin tree (after backing up your old tree).  Somehow
this looks wrong to me.  Possibly some old headers around there under
/usr/local?
My locale_facets.h:
$ ls -l /usr/include/c++/3.3.1/bits/locale_facets.h
-rwxrwxrwx    1 #gerrit  Benutzer    58297 Oct 25 05:53 /usr/include/c++/3.3.1/bits/locale_facets.h*



>                   from
> /usr/local/include/c++/3.3.1/bits/basic_ios.h:44,
>                   from /usr/local/include/c++/3.3.1/ios:51,
>                   from /usr/local/include/c++/3.3.1/istream:44,
>                   from /usr/local/include/c++/3.3.1/fstream:45,
>                   from fstream.cpp:1:
> /usr/local/include/c++/3.3.1/i686-pc-cygwin/bits/ctype_base.h:46: error:
> `_U'
>     was not declared in this scope
> (similar errors follow; messages elided for brevity.)


>>Can you run it with gdb and try to figure out what fails for you?

> I've never used gdb, but here goes... install... try it...

> For some reason I couldn't get a meaningful stack trace, but by stepping it
> was easy to isolate the problem. It is in the execution of the call:

>     is.rdbuf()->in_avail()

> is.rdbuf() looks like it is returning the correct pointer, but in_avail()
> is dying. If I replace the call with a constant, say 16000, the program
> runs
> fine.

> Does that help?

Hmmm, not much.

> By the way, the above results hold regardless of whether the program is run
> from the Win XP command line or the bash command line.


Gerrit
-- 
=^..^=



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

