From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15755 invoked by alias); 15 Jan 2006 16:28:48 -0000 Received: (qmail 15739 invoked by uid 22791); 15 Jan 2006 16:28:47 -0000 X-Spam-Check-By: sourceware.org Received: from cantor.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 15 Jan 2006 16:28:44 +0000 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id DF388E7D1 for ; Sun, 15 Jan 2006 17:28:40 +0100 (CET) Received: from aj by arthur.inka.de with local (Exim 4.51) id 1EyAkA-0002v1-M2 for libc-hacker@sources.redhat.com; Sun, 15 Jan 2006 17:28:38 +0100 From: Andreas Jaeger To: Glibc hackers Subject: [BZ #2078, 2079] Fix some wide functions OpenPGP: id=C272A126; url=http://www.suse.de/~aj/keys.txt Date: Sun, 15 Jan 2006 16:28:00 -0000 Message-ID: User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00067.txt.bz2 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-length: 4600 The following patch uses the correct types/values in a few places. Tested on x86-64, ok to commit? Andreas 2006-01-15 Andreas Jaeger [BZ #2079] * libio/fputwc_u.c (fputwc_unlocked): Fix return value. * libio/getwc_u.c (__getwc_unlocked): Likewise. * libio/wfileops.c (_IO_wdo_write): Likewise. [BZ #2078] * libio/fputwc.c (fputwc): Use proper type for result. * libio/ioungetwc.c (ungetwc): Likewise. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Index: libio/fputwc.c --- libio/fputwc.c 29 Aug 2003 19:58:26 -0000 1.4 +++ libio/fputwc.c 15 Jan 2006 16:08:15 -0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,1996,1997,1998,1999,2003 Free Software Foundation, I= nc. +/* Copyright (C) 1993,1996,1997,1998,1999,2003, 2006 Free Software Foundat= ion, Inc. This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ fputwc (wc, fp) wchar_t wc; _IO_FILE *fp; { - int result; + wint_t result; CHECK_FILE (fp, EOF); _IO_acquire_lock (fp); if (_IO_fwide (fp, 1) < 0) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Index: libio/ioungetwc.c --- libio/ioungetwc.c 29 Aug 2003 19:58:27 -0000 1.5 +++ libio/ioungetwc.c 15 Jan 2006 16:08:15 -0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996, 1997, 1998, 1999, 2001, 2002, 2003 +/* Copyright (C) 1993, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. =20 @@ -34,7 +34,7 @@ ungetwc (c, fp) wint_t c; _IO_FILE *fp; { - int result; + wint_t result; CHECK_FILE (fp, WEOF); _IO_acquire_lock (fp); _IO_fwide (fp, 1); =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Index: libio/getwc_u.c --- libio/getwc_u.c 6 Jul 2001 04:54:55 -0000 1.3 +++ libio/getwc_u.c 15 Jan 2006 16:08:15 -0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,1995,1996,1997,1999,2000 Free Software Foundation, = Inc. +/* Copyright (C) 1993,1995,1996,1997,1999,2000, 2006 Free Software Founda= tion, Inc. This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ wint_t __getwc_unlocked (FILE *fp) { - CHECK_FILE (fp, EOF); + CHECK_FILE (fp, WEOF); return _IO_getwc_unlocked (fp); } =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Index: libio/wfileops.c --- libio/wfileops.c 14 Jan 2004 18:40:03 -0000 1.29 +++ libio/wfileops.c 15 Jan 2006 16:08:16 -0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,1995,1997-2003,2004 Free Software Foundation, Inc. +/* Copyright (C) 1993,1995,1997-2003,2004, 2006 Free Software Foundation, = Inc. This file is part of the GNU C Library. Written by Ulrich Drepper . Based on the single byte version by Per Bothner . @@ -69,7 +69,7 @@ _IO_wdo_write (fp, data, to_do) { if (_IO_new_do_write (fp, fp->_IO_write_base, fp->_IO_write_ptr - fp->_IO_write_base) =3D=3D EOF) - return EOF; + return WEOF; } =20 do =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Index: libio/fputwc_u.c --- libio/fputwc_u.c 6 Jul 2001 04:54:54 -0000 1.3 +++ libio/fputwc_u.c 15 Jan 2006 16:08:16 -0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996, 1997, 1999, 2006 Free Software Foundation, In= c. This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or @@ -35,7 +35,7 @@ fputwc_unlocked (wc, fp) wchar_t wc; _IO_FILE *fp; { - CHECK_FILE (fp, EOF); + CHECK_FILE (fp, WEOF); if (_IO_fwide (fp, 1) < 0) return WEOF; return _IO_putwc_unlocked (wc, fp); --=20 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj/ SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GPG fingerprint =3D 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 --=-=-= Content-Type: application/pgp-signature Content-length: 188 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBDyng2OJpWPMJyoSYRAnn+AJ9NPlUzk/chAwd8yaIkHXQo9xohrACfW+2K kTb1u9RhlDsdQZVF+OplNTA= =XHDL -----END PGP SIGNATURE----- --=-=-=--