summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog15
-rw-r--r--libio/wgenops.c10
-rw-r--r--stdio-common/printf_fp.c4
-rw-r--r--stdio-common/printf_size.c4
-rw-r--r--stdio-common/vfscanf.c4
-rw-r--r--sysdeps/generic/printf_fphex.c4
-rw-r--r--sysdeps/generic/strtol.c4
7 files changed, 30 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 9675e057d3..94934a1630 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
2001-01-02 Andreas Jaeger <aj@suse.de>
+ * libio/wgenops.c (_IO_wdoallocbuf): Use correct wide access macro.
+ (_IO_switch_to_wget_mode): Likewise.
+ (_IO_sputbackwc): Likewise.
+ (_IO_sungetwc): Use wint_t for result.
+
+ * stdio-common/vfscanf.c (__vfscanf): Use WINT_T for done.
+
+ * sysdeps/generic/strtol.c (strtol): Make cnt size_t for correct
+ signedness.
+
+ * sysdeps/generic/printf_fphex.c (putc): Cast _IO_putwc_unlocked
+ to (int) to avoid warnings.
+ * stdio-common/printf_fp.c (putc): Likewise.
+ * stdio-common/printf_size.c (putc): Likewise.
+
* sysdeps/generic/dl-sysdep.c (_dl_important_hwcaps): Make
constant unsigned.
diff --git a/libio/wgenops.c b/libio/wgenops.c
index fa0aab36af..0e3b35d30e 100644
--- a/libio/wgenops.c
+++ b/libio/wgenops.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1995,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU IO Library.
Written by Ulrich Drepper <drepper@cygnus.com>.
Based on the single byte version by Per Bothner <bothner@cygnus.com>.
@@ -403,7 +403,7 @@ _IO_wdoallocbuf (fp)
if (fp->_wide_data->_IO_buf_base)
return;
if (!(fp->_flags & _IO_UNBUFFERED))
- if (_IO_DOALLOCATE (fp) != WEOF)
+ if ((wint_t)_IO_WDOALLOCATE (fp) != WEOF)
return;
_IO_wsetb (fp, fp->_wide_data->_shortbuf, fp->_wide_data->_shortbuf + 1, 0);
}
@@ -453,7 +453,7 @@ _IO_switch_to_wget_mode (fp)
_IO_FILE *fp;
{
if (fp->_wide_data->_IO_write_ptr > fp->_wide_data->_IO_write_base)
- if (_IO_OVERFLOW (fp, WEOF) == WEOF)
+ if ((wint_t)_IO_WOVERFLOW (fp, WEOF) == WEOF)
return EOF;
if (_IO_in_backup (fp))
fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_backup_base;
@@ -622,7 +622,7 @@ _IO_sputbackwc (fp, c)
else
result = _IO_PBACKFAIL (fp, c);
- if (result != EOF)
+ if (result != WEOF)
fp->_flags &= ~_IO_EOF_SEEN;
return result;
@@ -632,7 +632,7 @@ wint_t
_IO_sungetwc (fp)
_IO_FILE *fp;
{
- int result;
+ wint_t result;
if (fp->_wide_data->_IO_read_ptr > fp->_wide_data->_IO_read_base)
{
diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c
index dc5f47dc99..f2c793fc22 100644
--- a/stdio-common/printf_fp.c
+++ b/stdio-common/printf_fp.c
@@ -1,5 +1,5 @@
/* Floating point output for `printf'.
- Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
@@ -57,7 +57,7 @@
names equal. */
# undef putc
# define putc(c, f) (wide \
- ? _IO_putwc_unlocked (c, f) : _IO_putc_unlocked (c, f))
+ ? (int)_IO_putwc_unlocked (c, f) : _IO_putc_unlocked (c, f))
# define size_t _IO_size_t
# define FILE _IO_FILE
#else /* ! USE_IN_LIBIO */
diff --git a/stdio-common/printf_size.c b/stdio-common/printf_size.c
index c3da4dcb17..1eaccdf027 100644
--- a/stdio-common/printf_size.c
+++ b/stdio-common/printf_size.c
@@ -1,5 +1,5 @@
/* Print size value using units for orders of magnitude.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
Based on a proposal by Larry McVoy <lm@sgi.com>.
@@ -39,7 +39,7 @@
names equal. */
# undef putc
# define putc(c, f) (wide \
- ? _IO_putwc_unlocked (c, f) : _IO_putc_unlocked (c, f))
+ ? (int)_IO_putwc_unlocked (c, f) : _IO_putc_unlocked (c, f))
# define size_t _IO_size_t
# define FILE _IO_FILE
#else /* ! USE_IN_LIBIO */
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 9a841edd8a..b0fc8f00e0 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999, 2000, 2001 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
@@ -266,7 +266,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
va_list arg;
register const CHAR_T *f = format;
register UCHAR_T fc; /* Current character of the format. */
- register size_t done = 0; /* Assignments done. */
+ register WINT_T done = 0; /* Assignments done. */
register size_t read_in = 0; /* Chars read in. */
register WINT_T c = 0; /* Last char read. */
register int width; /* Maximum field width. */
diff --git a/sysdeps/generic/printf_fphex.c b/sysdeps/generic/printf_fphex.c
index 19cbff8d70..dfc6df56c8 100644
--- a/sysdeps/generic/printf_fphex.c
+++ b/sysdeps/generic/printf_fphex.c
@@ -1,5 +1,5 @@
/* Print floating point number in hexadecimal notation according to ISO C99.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -43,7 +43,7 @@
names equal. */
# undef putc
# define putc(c, f) (wide \
- ? _IO_putwc_unlocked (c, f) : _IO_putc_unlocked (c, f))
+ ? (int)_IO_putwc_unlocked (c, f) : _IO_putc_unlocked (c, f))
# define size_t _IO_size_t
# define FILE _IO_FILE
#else /* ! USE_IN_LIBIO */
diff --git a/sysdeps/generic/strtol.c b/sysdeps/generic/strtol.c
index de6f276131..b2a232320c 100644
--- a/sysdeps/generic/strtol.c
+++ b/sysdeps/generic/strtol.c
@@ -1,5 +1,5 @@
/* Convert string representation of a number into an integer value.
- Copyright (C) 1991,92,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
+ Copyright (C) 1991,92,94,95,96,97,98,99,2000,2001 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
@@ -244,7 +244,7 @@ INTERNAL (strtol) (nptr, endptr, base, group LOCALE_PARAM)
const STRING_TYPE *save, *end;
int overflow;
#ifndef USE_WIDE_CHAR
- int cnt;
+ size_t cnt;
#endif
#ifdef USE_NUMBER_GROUPING