2004-08-10 Jakub Jelinek <jakub@redhat.com>
* libio/bits/stdio.h (fread_unlocked): Cast 0 to (size_t).
(fwrite_unlocked): When checking if size * n is <= 8, cast each
argument to size_t individually. Cast n to (void) instead of
(size_t), surround with (), return (size_t) 0 if one of n or size
is 0. [BZ #316]
* stdio-common/Makefile (tests): Add tst-unlockedio.
* stdio-common/tst-unlockedio.c: New test.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
defined symbol for entry point to avoid cancellation.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
Likewise.
* sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
__close_nocancel, __read_nocancel, __write_nocancel,
__waitpid_nocancel): Add attribute_hidden. If not in libc.so,
libpthread.so or librt.so, define to corresponding function
without _nocancel suffix.
* sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
* sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
* sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
More cancellation handling fixups.
* sysdeps/unix/sysv/linux/not-cancel.h: Add waitpid_not_cancel.
* sysdeps/generic/not-cancel.h: Likewise.
* catgets/open_catalog.c: Use not-cancelable syscalls.
* time/Makefile (CFLAGS-getdate.c): Add -fexceptions.
* sysdeps/unix/sysv/linux/llseek.c: Must not be cancelable.
* sysdeps/unix/syscalls.list: Don't mark lseek as cancelable.
* dlfcn/dlfcn.h: Mark dlopen with __THROW again.
* io/fcntl.h: Don't mark posix_fallocate with __THROW.
* libio/fileops.c: Use not-cancelable syscalls for fclose.
* libio/iopopen.c: Use no-cancelable syscalls.
* libio/stdio.h: Mark popen and pclose with __THROW again.
* misc/Makefile (CFLAGS-syslog.c): Add -fexceptions.
* misc/syslog.c: Fix locking and cancellation cleanup handling.
* posix/unistd.h: Mark ttyname and ttyname_r again with __THROW.
* stdio-common/Makefile (CFLAGS-tmpfile.c, CFLAGS-tmpfile64.c,
CFLAGS-tempname.c): Add -fexceptions.
* stdlib/Makefile (CFLAGS-mkstemp.c): Add -fexceptions.
* string/string.h: Mark strerror and strerror_r with _THROW again.
* sysdeps/generic/unwind.inc: New file. Copied from gcc.
* sysdeps/generic/unwind-dw2.c: Update from gcc version. Remove
#ifs since we now need all the code compiled.
* sysdeps/posix/spawni.c: Use close_not_cancel instead of close.
* sysdeps/unix/closedir.c: Use not-cancelable syscalls.
* sysdeps/unix/opendir.c: Likewise.
2002-12-16 Ulrich Drepper <drepper@redhat.com>
* stdio-common/Makefile (routines): Remove lockfile. Add
flockfile, ftrylockfile, and funlockfile.
* sysdeps/generic/lockfile.c: Removed. Each function has its own file.
* sysdeps/generic/flockfile.c: New file.
* sysdeps/generic/ftrylockfile.c: New file.
* sysdeps/generic/funlockfile.c: New file.
* stdio-common/Makefile (tests): Add tst-fphex.
* sysdeps/generic/printf_fphex.c (__printf_fphex): Fix initialization
of WNUMEND. Fix counting of decimal point in WIDTH. Print '0' pad
chars always before the value digits.
Reported by James Antill <james.antill@redhat.com>.
2002-08-27 Ulrich Drepper <drepper@redhat.com>
* sysdeps/arm/Dist: Add bits/link.h.
* sunrpc/Makefile: Distribute thrsvc.
* stdio-common/Makefile: Remove more left-overs from old stdio.
* include/linewrap.h: Removed.
* libio/bug-mmap-fflush.c: Rewrite to not touch source directory.
* intl/Makefile (distribute): Add plural-eval.c.
* stdio-common/Makefile (headers): Remove bits/stdio_lim.h. This
file isn't distributed. Add special rules to install bits/stdio_lim.h.
* Make-dist: Remove traces of old stdio.
* Makeconfig: Likewise.
* locale/Makefile (localedef-aux): New variable. Only md5
assigned to it. These files are not ddistributed in this directory.
* sysdeps/unix/sysv/linux/s390/Dist: Add sys/procfs.h.
* sysdeps/unix/sysv/linux/s390/s390-64/Dist: Remove sys/procfs.h.
* sysdeps/unix/sysv/linux/s390/s390-32/Dist: Likewise.
* sysdeps/unix/sysv/linux/Dist: Remove sys/sendfile.h.
2002-02-25 Jakub Jelinek <jakub@redhat.com>
* libio/iofopen.c (__fopen_maybe_mmap): Set the initial
position to fp->_offset if it is set.
* stdio-common/Makefile (tests): Add tst-fdopen.
* stdio-common/tst-fdopen.c: New test.
2002-02-25 Jakub Jelinek <jakub@redhat.com>
* libio/fileops.c (_IO_file_xsgetn_mmap): Handle reading from backup.
* stdio-common/tst-ungetc.c (main): Add another test.
* misc/error.c (error): Handle wide oriented stderr stream correctly.
* stdio-common/perror.c (perror): Implement according to standard.
The stream orientation must not be changed if the stream was not
oriented before the call.
* stdio-common/Makefile (tests): Add tst-perror.
* stdio-common/tst-perror.c: New file.
See ChangeLog.12 for earlier changes.
* libio/stdio_ext.h: Moved to ...
* stdio-common/stdio_ext.h: ... here.
* libio/Makefile (headers): Move stdio_ext.h from here ...
* stdio-common/Makefile (headers): ... to here.
* include/stdio_ext.h: New file.
* stdio/Makefile (routines): Add the stdio_ext.h functions here.
* stdio/Versions (GLIBC_2.2.4): Export the stdio_ext.h functions.
* stdio/__flbf.c: New file.
* stdio/__fbufsize.c: New file.
* stdio/__fpending.c: New file.
* stdio/__fpurge.c: New file.
* stdio/__freadable.c: New file.
* stdio/__freading.c: New file.
* stdio/__fsetlocking.c: New file.
* stdio/__fwritable.c: New file.
* stdio/__fwriting.c: New file.
2001-07-06 Paul Eggert <eggert@twinsun.com>
* manual/argp.texi: Remove ignored LGPL copyright notice; it's
not appropriate for documentation anyway.
* manual/libc-texinfo.sh: "Library General Public License" ->
"Lesser General Public License".
2001-07-06 Andreas Jaeger <aj@suse.de>
* All files under GPL/LGPL version 2: Place under LGPL version
2.1.
2000-09-05 Ulrich Drepper <drepper@redhat.com>
* stdio-common/vfprintf.c (process_string_arg): Handle precision
in wide char case correctly. Don't allocate too long temporary
strings with alloca.
* stdio-common/Makefile (tests): Add tst-swprintf.
(tst-swprintf-ENV): New variable.
* stdio-common/tst-swprintf.c: New file.
* soft-fp/sysdeps/sparc/sparc64/qp_neg.S: Move from here...
* sysdeps/sparc/sparc64/soft-fp/qp_neg.S: ... to here.
2000-07-27 Jakub Jelinek <jakub@redhat.com>
* locale/indigits.h (indigit_value): Correct.
* locale/indigitswc.h (indigitwc_value): Correct.
* stdio-common/vfscanf.c (__vfscanf): Fix I18N number
conversion, add GROUP checking for it, fix GROUP number
conversion with strlen(thousands) > 1.
Honour width correctly in the presence of floating
decimal points and thousands separators.
* stdio-common/tst-sscanf.c: New test.
* stdio-common/Makefile: Add it to tests.
* sysdeps/generic/strtol.c (strtol): Fix conversion if there are
thousands separators and group argument is non-zero.
Reported by Andi Kleen <ak@suse.de>.
according to changes in test program, run also with static only
builds.
($(objpfx)tst-printf.out): Likewise.
* stdio-common/tst-unbputc.sh: Likewise.
* stdio-common/tst-printf.sh: Likewise.
* malloc/Makefile: Run tst-mtrace only with shared libs.
* stdio-common/Makefile: Run unbputc and tst-printf tests only
with shared libs.
2000-07-10 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* sysdeps/mips/dl-machine.h (elf_machine_runtime_link_map): Verify
that gpreg really points to the GOT section of the calling object.
Scan all PT_LOAD segments of objects for stub_pc, instead of only
checking a start address of first one.
Fix typos.
* sysdeps/mips/mips64/dl-machine.h (elf_machine_runtime_link_map):
Likewise.
* sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Fix a typo.
2000-07-10 Andreas Jaeger <aj@suse.de>
2000-07-03 Ulrich Drepper <drepper@redhat.com>
* libio/genops.c (__overflow): Use _IO_fwide to orient the stream.
(__uflow): Likewise.
(__underflow): Likewise.
* libio/wgenops.c (__wunderflow): Likewise.
* stdio-common/tst-unbputc.c: New file.
* stdio-common/tst-unbputc.sh: New file.
* stdio-common/Makefile: Add rules to build and run tst-unbputc.
* po/en_GB.po: New file.
Contributed by Robert Brady <rwb197@ecs.soton.ac.uk>.
2000-03-28 Ulrich Drepper <drepper@redhat.com>
* iconvdata/TESTS: Use UCS-2BE instead of UCS2.
* iconv/loop.c: Define get16, get32, put16, and put32 macros to
allow as well reading from/writing to unaligned addresses on machines
which don't support this in hardware. Use FCTNAME macro to define
function name. Include the file a second time for platforms which
need special unaligned handling.
* iconv/skeleton.c: Define get16u, get32u, put16u, and put32u macros
to access potentially unaligned addresses. These macros are intended
to be used only outside the loops.
(unaligned): New definition. In case the machine can handle unaligned
access define as zero. Otherwise as a variable which is initialized
as nonzero in case the buffer passed in at runtime is unaligned with
respect to the character set encoding involved.
Call aligned or unaligned looop functions according to unaligned
variable.
* iconvdata/8bit-gap.c: Use get16, get32, put16, and put32 instead
of direct casting pointer to potentially handle unaligned memory
accesses.
* iconvdata/8bit-generic.c: Likewise.
* iconvdata/ansi_x3.110.c: Likewise.
* iconvdata/big5.c: Likewise.
* iconvdata/euc-cn.c: Likewise.
* iconvdata/euc-jp.c: Likewise.
* iconvdata/euc-kr.c: Likewise.
* iconvdata/euc-tw.c: Likewise.
* iconvdata/gbk.c: Likewise.
* iconvdata/iso-2022-cn.c: Likewise.
* iconvdata/iso-2022-jp.c: Likewise.
* iconvdata/iso-2022-kr.c: Likewise.
* iconvdata/iso646.c: Likewise.
* iconvdata/iso_6937-2.c: Likewise.
* iconvdata/iso_6937.c: Likewise.
* iconvdata/johab.c: Likewise.
* iconvdata/sjis.c: Likewise.
* iconvdata/t.61.c: Likewise.
* iconvdata/uhc.c: Likewise.
* iconvdata/unicode.c: Likewise.
* iconvdata/utf-16.c: Likewise.
* locale/programs/simple-hash.c: Little optimizations. Remove K&R
prototypes.
* malloc/Versions [libc] (GLIBC_2.2): Add mcheck_check_all.
* malloc/mcheck.c (mcheck_check_all): Renamed from check_all and made
public.
* malloc/mcheck.h (mcheck_check_all): Declare.
* stdio-common/Makefile (tests): Add tst-obprintf.
2000-01-28 Ulrich Drepper <drepper@cygnus.com>
* locale/C-monetary.c: Add initializers for new fields.
* locale/C-numeric.c: Likewise.
* locale/Makefile (distribute): Add indigits.h, indigitswc.h,
outdigits.h, and outdigitswc.h.
* locale/langinfo.h: Add _NL_MONETARY_DECIMAL_POINT_WC,
_NL_MONETARY_THOUSANDS_SEP_WC, _NL_NUMERIC_DECIMAL_POINT_WC,
and _NL_NUMERIC_THOUSANDS_SEP_WC.
* locale/indigits.h: New file.
* locale/indigitswc.h: New file.
* locale/outdigits.h: New file.
* locale/outdigitswc.h: New file.
* locale/programs/ld-monetary.c: Write out decimal point and
thousands separator info in wide character form.
* locale/programs/ld-numeric.c: Likewise.
* stdio-common/Makefile (routines): Add _i18n_itoa and _i18n_itowa.
(distribute): Add _i18n_itoa.h and _i18n_itowa.h.
* stdio-common/_i18n_itoa.c: New file.
* stdio-common/_i18n_itoa.h: New file.
* stdio-common/_i18n_itowa.c: New file.
* stdio-common/_i18n_itowa.h: New file.
* stdio-common/printf-parse.h: Parse 'I' flag.
* stdio-common/printf.h (struct printf_info): Add i18n field.
* stdio-common/vfprintf.c: Implement 'I' flag to print using locales'
outdigits.
1999-08-23 Ulrich Drepper <drepper@cygnus.com>
* stdio-common/Makefile: Mode addition to routines to the right place.
* sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sigcontextinfo.h: Likewise.
1999-08-21 Mark Kettenis <kettenis@gnu.org>
* stdio-common/vfscanf.c [! USE_IN_LIBIO]: Add necessary
definitions for MEMCPY, ISSPACE, ISDIGIT, ISXDIGIT, TOLOWER, L_,
CHAR_T, UCHAR_T and WIN_T to make the code compile again when
stdio is used instead of libio.
* stdio-common/vfprintf.c [! USE_IN_LIBIO]: Add necessary
definitions for CHAR_T, UCHAR_T, INT_T, L_, ISDIGIT, PAD and PUTC
to make the code compile again when stdio is used instead of
libio.
(vfprintf): Only check for correct orientation if ORIENT is
defined.
* stdio-common/Makefile (routines): Only add vfwprintf and
vfwscanf if we're using libio.
1999-08-21 Mark Kettenis <kettenis@gnu.org>
* include/stdio.h [! USE_IN_LIBIO && __need_FILE]: Avoid defining
any additional prototype just as we do for libio.
1999-08-21 Mark Kettenis <kettenis@gnu.org>
* include/bits/xopen_lim.h: Do not define STREAM_MAX and
TZNAME_MAX. These limits are not X/Open specific.
* stdio-common/stdio_lim.h.in: Allow inclusion when __need_IOV_MAX
is defined.
1999-08-21 Mark Kettenis <kettenis@gnu.org>
* Rules: When generated stdio_lim.h, avoid defining IOV_MAX if
UIO_MAXIOV is left undefined in sys/uio.h.
* stdio-common/stdio_lim.h.in: Adapt for change above.
1999-08-21 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/unix/sysv/linux/mips/bits/sigaction.h (SA_RESETHAND): Add it.
* sysdeps/mips/bits/dlfcn.h: Remove SGI specific calls, add RTLD_LOCAL.
Patches by Ralf Baechle <ralf@uni-koblenz.de>