From: Andreas Jaeger <aj@suse.de>
To: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [BZ #2078, 2079] Fix some wide functions
Date: Sun, 15 Jan 2006 16:28:00 -0000 [thread overview]
Message-ID: <m3k6d1o3pl.fsf@gromit.moeb> (raw)
[-- Attachment #1: Type: text/plain, Size: 4063 bytes --]
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 <aj@suse.de>
[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.
============================================================
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, Inc.
+/* Copyright (C) 1993,1996,1997,1998,1999,2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
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)
============================================================
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.
@@ -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);
============================================================
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 Foundation, Inc.
This file is part of the GNU C Library.
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);
}
============================================================
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 <drepper@cygnus.com>.
Based on the single byte version by Per Bothner <bothner@cygnus.com>.
@@ -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) == EOF)
- return EOF;
+ return WEOF;
}
do
============================================================
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, Inc.
This file is part of the GNU C Library.
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);
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj/
SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
next reply other threads:[~2006-01-15 16:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-15 16:28 Andreas Jaeger [this message]
2006-01-15 17:40 ` Ulrich Drepper
2006-01-15 17:44 ` Andreas Jaeger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3k6d1o3pl.fsf@gromit.moeb \
--to=aj@suse.de \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).