This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [skimo@kotnet.org] libc/2302: putwc doesn't work in glibc 2.2.3
- To: Sven Verdoolaege <skimo at kotnet dot org>
- Subject: Re: [skimo@kotnet.org] libc/2302: putwc doesn't work in glibc 2.2.3
- From: Andreas Jaeger <aj at suse dot de>
- Date: 04 Jun 2001 14:50:46 +0200
- Cc: libc-alpha at sources dot redhat dot com
- References: <u8elt07hx1.fsf@gromit.moeb> <20010604105637.S199@pool.kotnet.org>
Sven Verdoolaege <skimo@kotnet.org> writes:
> On Mon, Jun 04, 2001 at 10:44:58AM +0200, Andreas Jaeger wrote:
>>
>> Hi,
>>
>> can anybody comment on this bug report, please?
>>
> I can add that the problem seems to be the combination of
> narrow character output (puts in the example) with wide
> character output (putwc).
> Is this somehow not allowed ?
That's the problem as Ulrich pointed out. ISO C says:
Byte input/output functions shall not be applied to a
wide-oriented stream and wide character input/output
functions shall not be applied to a byte-oriented stream.
You have to use freopen between the calls - or use only wide stream
functions,
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj