Jeff Johnston
8ca367408d
2009-01-05 Craig Howland <howland@LGSInnovations.com>
...
* libc/stdio/fwide.c: Correct typo in TRAD_SYNOPSIS for _fwide_r.
2009-01-05 19:08:03 +00:00
Jeff Johnston
cdb0b90956
2008-12-15 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/stdio.tex: Remove putwc and getwc references as they
are included as part of fputwc and fgetwc, respectively.
2008-12-15 20:31:47 +00:00
Jeff Johnston
c43663737c
2008-12-12 Ralf Corsepius <ralf.corsepius@rtems.org>
...
* libc/stdio/fputws.c: Fix documentation.
* libc/stdio/getwchar.c: Ditto.
* libc/stdio/putwchar.c: Ditto.
2008-12-12 17:21:08 +00:00
Corinna Vinschen
6897665e67
* libc/stdio/freopen.c: Add <string.h> for memset prototype.
...
* libc/stdio/fseek.c: Ditto.
* libc/stdio/fwide.c: Add <wchar.h> for fwide prototype.
2008-12-12 15:45:19 +00:00
Jeff Johnston
7dd0c33097
2008-12-11 Craig Howland <howland@LGSInnovations.com>
...
* libc/include/sys/lock.h: Add void cast to avoid "statement has no
effect" warnings from gcc.
* libc/include/sys/stdio.h: Ditto.
* libc/include/sys/time.h: Correct gettimeofday() prototype.
* libc/stdlib/__exp10.c: Add #include "std.h" for function prototype.
* libc/stdlib/__ten_mu.c: Ditto.
* libc/stdlib/std.h: Correct __exp10's ANSI prototype.
* libc/stdlib/ldtoa.c: Change eiisinf definition to ANSI form. (Are
already others in file without _ansi method, so did not bother.)
* libc/stdlib/system.c: Use _ansi forms for function prototypes and
definitions.
* libc/time/mktime.c: Ditto.
* libc/misc/__dprintf.c: Ditto.
* libc/include/stdio.h: Add function prototypes for _fgetc_r,
_fgetpos_r, _fsetpos_r, _freopen_r, _rewind_r, freopen64, _freopen64_r,
_funopen_r, and _fopencookie_r.
* libc/include/reent.h: Add function prototype for _stat64_r, align
_execve_r prototype with POSIX definition for execve.
* libc/reent/execr.c: Align function prototype with POSIX definition.
* libc/stdio/asniprintf.c: Add #include "local.h".
* libc/stdio/vasniprintf.c: Ditto.
* libc/stdio/fread.c: Remove unused variable newcount.
* libc/stdio/local.h: Add function prototype for __sccl.
* libc/stdio/open_memstream.c: Remove unused variable flags.
* libc/stdio/vfscanf.c: Proper prototyping for ccfn, remove prototype
for __sccl since now in local.h.
* libc/string/memcpy.c: Add #include <string.h> (for real and for
traditional synopsis), remove extraneous stddef.h and limits.h.
* libc/syscalls/sysclose.c: Add #include <unistd.h>.
* libc/syscalls/sysfork.c: Ditto.
* libc/syscalls/sysgetpid.c: Ditto.
* libc/syscalls/sysexecve.c: Add #include <unistd.h>, align function
prototype with POSIX definition.
* libc/syscalls/sysfstat.c: Add #include <sys/stat.h>.
* libc/syscalls/sysgettod.c: Correct sys/times.h to sys/time.h.
* libc/syscalls/syskill.c: Add #include <signal.h>.
* libc/syscalls/syslink.c: Add #include <unistd.h>, fix prototype.
* libc/syscalls/sysunlink.c: Ditto.
* libc/syscalls/sysstat.c: Add #include <sys/stat.h>, fix prototype.
* libc/syscalls/syswait.c: Add #include <sys/wait.h>, fix prototype.
2008-12-11 17:27:56 +00:00
Jeff Johnston
0751f22675
2008-12-10 Corinna Vinschen <corinna@vinschen.de>
...
Implement basic wide char stdio functionality, based on FreeBSD.
* libc/include/stdio.h (__SORD): Define.
(__SWID): Define.
* libc/include/wchar.h: Add declarations for new wide char functions.
(getwc): Define as macro.
(getwchar): Ditto.
(putwc): Ditto.
(putwchar): Ditto.
* libc/include/sys/reent.h (struct __sFILE): Add _mbstate member.
(struct __sFILE64): Ditto.
* libc/stdio/Makefile.am (ELIX_4_SOURCES): Add fgetwc.c, fgetws.c,
fputwc.c, fputws.c, fwide.c, getwc.c, getwchar.c, putwc.c, putwchar.c
and ungetwc.c.
(CHEWOUT_FILES): Add fgetwc.def, fgetws.def, fputwc.def, fputws.def,
fwide.def, getwc.def, getwchar.def, putwc.def, putwchar.def and
ungetwc.def.
Add header dependency rules for the new files.
* libc/stdio/Makefile.in: Regenerate.
* libc/stdio/fgetwc.c: New file, implementing fgetwc and _fgetwc_r.
* libc/stdio/fgetws.c: New file, implementing fgetws and _fgetws_r.
* libc/stdio/findfp.c (std): Initialize FILE's _mbstate member.
(__sfmoreglue): Ditto.
* libc/stdio/fputs.c (_fputs_r): Set stream orientation.
* libc/stdio/fputwc.c: New file, implementing fputwc and _fputwc_r.
* libc/stdio/fputws.c: New file, implementing fputws and _fputws_r.
* libc/stdio/fread.c (_fread_r): Set stream orientation.
* libc/stdio/freopen.c (_freopen_r): Reset stream orientation. Reset
_mbstate.
* libc/stdio/fseek.c (_fseek_r): Reset _mbstate.
* libc/stdio/fwide.c: New file, implementing fwide and _fwide_r.
* libc/stdio/fwrite.c (_fwrite_r): Set stream orientation.
* libc/stdio/getwc.c: New file, implementing getwc and _getwc_r.
* libc/stdio/getwchar.c: New file, implementing getwchar and
_getwchar_r.
* libc/stdio/local.h (ORIENT): New macro.
* libc/stdio/puts.c (_puts_r): Set stream orientation.
* libc/stdio/putwc.c: New file, implementing putwc and _putwc_r.
* libc/stdio/putwchar.c: New file, implementing putwchar and
_putwchar_r.
* libc/stdio/refill.c (__srefill_r): Set stream orientation.
* libc/stdio/stdio.tex: Add documentation for new functions.
* libc/stdio/ungetc.c (_ungetc_r): Set stream orientation.
* libc/stdio/ungetwc.c: New file, implementing ungetwc and _ungetwc_r.
* libc/stdio/vfscanf.c (__SVFSCANF_R): Set stream orientation.
* libc/stdio/wbuf.c (__swbuf_r): Ditto.
2008-12-10 23:43:12 +00:00
Corinna Vinschen
a11451b353
* libc/stdio/gets.c (_gets_r): Lock stdin here and call
...
__sgetc_r instead of _getchar_r.
2008-11-25 09:33:43 +00:00
Jeff Johnston
6818a5c539
2008-11-24 Craig Howland <howland@LGSInnovations.com>
...
* libc/stdlib/wcstoull_r.c: Add EINVAL return for bad base value,
include wchar.h for prototype, remove extraneous includes, use
C99/POSIX ULLONG_MAX (but allow for poor limits.h).
* libc/stdlib/wcstoull.c: Fix usage comments (mistakes and to add
base value check noted above), remove extraneous includes.
* libc/stdio/asnprintf.c: Add #include "local.h" to get function
prototype for _svfprintf_r().
* libc/stdio/vasnprintf.c: Ditto.
* libc/stdio/local.h: Add function prototype for __submore().
* libc/include/stdio.h: Add function prototypes for _fseeko_r and
_ftello_r.
* libc/posix/namespace.h: Commented out define for write to
eliminate write() prototype being missing for collate.c (which is
the only file that presently includes namespace.h).
* libc/include/reent.h: Added _rename_r.
* libc/reent/renamer.c: Corrected function prototypes in synopses.
* libc/locale/ldpart.c: Use struct stat64 when calling fstat64.
2008-11-24 22:08:02 +00:00
Jeff Johnston
0aca33c823
2008-11-24 Craig Howland <howland@LGSInnovations.com>
...
* libc/stdlib/wcstoull_r.c: Add EINVAL return for bad base value,
include wchar.h for prototype, remove extraneous includes, use
C99/POSIX ULLONG_MAX (but allow for poor limits.h).
* libc/stdlib/wcstoull.c: Fix usage comments (mistakes and to add
base value check noted above), remove extraneous includes.
* libc/stdio/asnprintf.c: Add #include "local.h" to get function
prototype for _svfprintf_r().
* libc/stdio/vasnprintf.c: Ditto.
* libc/stdio/local.h: Add function prototype for __submore().
* libc/include/stdio.h: Add function prototypes for _fseeko_r and
_ftello_r.
* libc/posix/namespace.h: Commented out define for write to
eliminate write() prototype being missing for collate.c (which is
the only file that presently includes namespace.h).
* libc/include/reent.h: Added _rename_r.
* libc/reent/renamer.c: Corrected function prototypes in synopses.
* libc/locale/ldpart.c: Use struct stat64 when calling fstat64.
2008-11-24 21:27:33 +00:00
Corinna Vinschen
14773e10a0
* libc/include/stdio.h (__SMOD): Remove definition of unused flag.
...
* libc/include/sys/reent.h (struct __sFILE): Add _flags2 member.
* libc/stdio/findfp.c (std): Initialize _flags2.
(__sfp): Ditto.
* libc/stdio/refill.c (__srefill_r): Drop resetting __SMOD flag.
* libc/stdio/vfscanf.c (__ssrefill_r): Ditto.
* libc/stdio/fseek.c (_fseek_r): Drop checking __SMOD flag.
* libc/stdio64/fseeko64.c (_fseeko64_r): Ditto.
2008-11-24 17:15:43 +00:00
Jeff Johnston
1dc1ccd4ae
2008-10-31 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/diprintf.c: Modify documentation so eclipse newlib
libhover docs generate properly.
* libc/stdio/dprintf.c: Ditto.
* libc/stdio/fflush.c: Ditto.
* libc/stdio/fopencookie.c: Ditto.
* libc/stdio/fread.c: Ditto.
* libc/stdio/fsetpos.c: Ditto.
* libc/stdio/getc_u.c: Ditto.
* libc/stdio/getchar_u.c: Ditto.
* libc/stdio/putc_u.c: Ditto.
* libc/stdio/putchar_u.c: Ditto.
* libc/stdio/remove.c: Ditto.
* libc/stdio/siprintf.c: Ditto.
* libc/stdio/siscanf.c: Ditto.
* libc/stdio/sprintf.c: Ditto.
* libc/stdio/sscanf.c: Ditto.
* libc/stdio/vfprintf.c: Ditto.
* libc/stdio/vfscanf.c: Ditto.
* libc/stdio/viprintf.c: Ditto.
* libc/stdio/viscanf.c: Ditto.
* libc/stdlib/calloc.c: Ditto.
* libc/stdlib/efgcvt.c: Ditto.
* libc/stdlib/envlock.c: Ditto.
* libc/time/asctime.c: Ditto.
* libc/time/ctime.c: Ditto.
* libc/time/gmtime.c: Ditto.
* libc/time/lcltime.c: Ditto.
* libc/time/tzset.c: Ditto.
* libc/stdlib/envlock.h: Moved to libc/include.
2008-10-31 21:08:03 +00:00
Jeff Johnston
236e5c4017
2008-10-15 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/vfscanf.c (__ssvfiscanf_r): Do not support %lc, %C, %ls or
%S conversions when the EL/IX level is 1.
2008-10-15 19:33:10 +00:00
Steve Ellcey
fab8d8d808
* configure: Regenerate for new libtool.
...
* aclocal.m4: Ditto.
* Makefile.in: Ditto.
* newlib.hin: Ditto.
* doc/Makefile.in: Ditto.
* doc/configure: Ditto.
* iconvdata/Makefile.in: Ditto.
* iconvdata/aclocal.m4: Ditto.
* iconvdata/configure: Ditto.
* libc/Makefile.in: Ditto.
* libc/aclocal.m4: Ditto.
* libc/configure: Ditto.
* libc/argz/Makefile.in: Ditto.
* libc/ctype/Makefile.in: Ditto.
* libc/errno/Makefile.in: Ditto.
* libc/iconv/Makefile.in: Ditto.
* libc/iconv/ccs/Makefile.in: Ditto.
* libc/iconv/ccs/binary/Makefile.in: Ditto.
* libc/iconv/ces/Makefile.in: Ditto.
* libc/iconv/lib/Makefile.in: Ditto.
* libc/locale/Makefile.in: Ditto.
* libc/machine/Makefile.in: Ditto.
* libc/machine/aclocal.m4: Ditto.
* libc/machine/configure: Ditto.
* libc/machine/a29k/Makefile.in: Ditto.
* libc/machine/a29k/configure: Ditto.
* libc/machine/arm/Makefile.in: Ditto.
* libc/machine/arm/configure: Ditto.
* libc/machine/bfin/Makefile.in: Ditto.
* libc/machine/bfin/configure: Ditto.
* libc/machine/cris/Makefile.in: Ditto.
* libc/machine/cris/configure: Ditto.
* libc/machine/crx/Makefile.in: Ditto.
* libc/machine/crx/configure: Ditto.
* libc/machine/d10v/Makefile.in: Ditto.
* libc/machine/d10v/configure: Ditto.
* libc/machine/d30v/Makefile.in: Ditto.
* libc/machine/d30v/configure: Ditto.
* libc/machine/fr30/Makefile.in: Ditto.
* libc/machine/fr30/configure: Ditto.
* libc/machine/frv/Makefile.in: Ditto.
* libc/machine/frv/configure: Ditto.
* libc/machine/h8300/Makefile.in: Ditto.
* libc/machine/h8300/configure: Ditto.
* libc/machine/h8500/Makefile.in: Ditto.
* libc/machine/h8500/configure: Ditto.
* libc/machine/hppa/Makefile.in: Ditto.
* libc/machine/hppa/configure: Ditto.
* libc/machine/i386/Makefile.in: Ditto.
* libc/machine/i386/aclocal.m4: Ditto.
* libc/machine/i386/configure: Ditto.
* libc/machine/i960/Makefile.in: Ditto.
* libc/machine/i960/configure: Ditto.
* libc/machine/iq2000/Makefile.in: Ditto.
* libc/machine/iq2000/configure: Ditto.
* libc/machine/m32c/Makefile.in: Ditto.
* libc/machine/m32c/configure: Ditto.
* libc/machine/m32r/Makefile.in: Ditto.
* libc/machine/m32r/configure: Ditto.
* libc/machine/m68hc11/Makefile.in: Ditto.
* libc/machine/m68hc11/configure: Ditto.
* libc/machine/m68k/Makefile.in: Ditto.
* libc/machine/m68k/configure: Ditto.
* libc/machine/m88k/Makefile.in: Ditto.
* libc/machine/m88k/configure: Ditto.
* libc/machine/mep/Makefile.in: Ditto.
* libc/machine/mep/configure: Ditto.
* libc/machine/mips/Makefile.in: Ditto.
* libc/machine/mips/configure: Ditto.
* libc/machine/mn10200/Makefile.in: Ditto.
* libc/machine/mn10200/configure: Ditto.
* libc/machine/mn10300/Makefile.in: Ditto.
* libc/machine/mn10300/configure: Ditto.
* libc/machine/mt/Makefile.in: Ditto.
* libc/machine/mt/configure: Ditto.
* libc/machine/necv70/Makefile.in: Ditto.
* libc/machine/necv70/configure: Ditto.
* libc/machine/powerpc/Makefile.in: Ditto.
* libc/machine/powerpc/configure: Ditto.
* libc/machine/sh/Makefile.in: Ditto.
* libc/machine/sh/configure: Ditto.
* libc/machine/sparc/Makefile.in: Ditto.
* libc/machine/sparc/configure: Ditto.
* libc/machine/spu/Makefile.in: Ditto.
* libc/machine/spu/configure: Ditto.
* libc/machine/tic4x/Makefile.in: Ditto.
* libc/machine/tic4x/configure: Ditto.
* libc/machine/tic80/Makefile.in: Ditto.
* libc/machine/tic80/configure: Ditto.
* libc/machine/v850/Makefile.in: Ditto.
* libc/machine/v850/configure: Ditto.
* libc/machine/w65/Makefile.in: Ditto.
* libc/machine/w65/configure: Ditto.
* libc/machine/x86_64/Makefile.in: Ditto.
* libc/machine/x86_64/configure: Ditto.
* libc/machine/xscale/Makefile.in: Ditto.
* libc/machine/xscale/configure: Ditto.
* libc/machine/xstormy16/Makefile.in: Ditto.
* libc/machine/xstormy16/configure: Ditto.
* libc/machine/z8k/Makefile.in: Ditto.
* libc/machine/z8k/configure: Ditto.
* libc/misc/Makefile.in: Ditto.
* libc/posix/Makefile.in: Ditto.
* libc/reent/Makefile.in: Ditto.
* libc/search/Makefile.in: Ditto.
* libc/signal/Makefile.in: Ditto.
* libc/stdio/Makefile.in: Ditto.
* libc/stdio64/Makefile.in: Ditto.
* libc/stdlib/Makefile.in: Ditto.
* libc/string/Makefile.in: Ditto.
* libc/sys/Makefile.in: Ditto.
* libc/sys/aclocal.m4: Ditto.
* libc/sys/configure: Ditto.
* libc/sys/a29khif/Makefile.in: Ditto.
* libc/sys/a29khif/configure: Ditto.
* libc/sys/arc/Makefile.in: Ditto.
* libc/sys/arc/configure: Ditto.
* libc/sys/arm/Makefile.in: Ditto.
* libc/sys/arm/configure: Ditto.
* libc/sys/d10v/Makefile.in: Ditto.
* libc/sys/d10v/configure: Ditto.
* libc/sys/decstation/Makefile.in: Ditto.
* libc/sys/decstation/configure: Ditto.
* libc/sys/h8300hms/Makefile.in: Ditto.
* libc/sys/h8300hms/configure: Ditto.
* libc/sys/h8500hms/Makefile.in: Ditto.
* libc/sys/h8500hms/configure: Ditto.
* libc/sys/linux/Makefile.in: Ditto.
* libc/sys/linux/aclocal.m4: Ditto.
* libc/sys/linux/configure: Ditto.
* libc/sys/linux/argp/Makefile.in: Ditto.
* libc/sys/linux/cmath/Makefile.in: Ditto.
* libc/sys/linux/dl/Makefile.in: Ditto.
* libc/sys/linux/iconv/Makefile.in: Ditto.
* libc/sys/linux/intl/Makefile.in: Ditto.
* libc/sys/linux/linuxthreads/Makefile.in: Ditto.
* libc/sys/linux/linuxthreads/aclocal.m4: Ditto.
* libc/sys/linux/linuxthreads/configure: Ditto.
* libc/sys/linux/linuxthreads/machine/Makefile.in: Ditto.
* libc/sys/linux/linuxthreads/machine/aclocal.m4: Ditto.
* libc/sys/linux/linuxthreads/machine/configure: Ditto.
* libc/sys/linux/linuxthreads/machine/i386/Makefile.in: Ditto.
* libc/sys/linux/linuxthreads/machine/i386/aclocal.m4: Ditto.
* libc/sys/linux/linuxthreads/machine/i386/configure: Ditto.
* libc/sys/linux/machine/Makefile.in: Ditto.
* libc/sys/linux/machine/aclocal.m4: Ditto.
* libc/sys/linux/machine/configure: Ditto.
* libc/sys/linux/machine/i386/Makefile.in: Ditto.
* libc/sys/linux/machine/i386/aclocal.m4: Ditto.
* libc/sys/linux/machine/i386/configure: Ditto.
* libc/sys/linux/net/Makefile.in: Ditto.
* libc/sys/linux/stdlib/Makefile.in: Ditto.
* libc/sys/m88kbug/Makefile.in: Ditto.
* libc/sys/m88kbug/configure: Ditto.
* libc/sys/mmixware/Makefile.in: Ditto.
* libc/sys/mmixware/configure: Ditto.
* libc/sys/netware/Makefile.in: Ditto.
* libc/sys/netware/configure: Ditto.
* libc/sys/rdos/Makefile.in: Ditto.
* libc/sys/rdos/configure: Ditto.
* libc/sys/rtems/Makefile.in: Ditto.
* libc/sys/rtems/configure: Ditto.
* libc/sys/sh/Makefile.in: Ditto.
* libc/sys/sh/configure: Ditto.
* libc/sys/sparc64/Makefile.in: Ditto.
* libc/sys/sparc64/configure: Ditto.
* libc/sys/sun4/Makefile.in: Ditto.
* libc/sys/sun4/configure: Ditto.
* libc/sys/sysmec/Makefile.in: Ditto.
* libc/sys/sysmec/configure: Ditto.
* libc/sys/sysnec810/Makefile.in: Ditto.
* libc/sys/sysnec810/configure: Ditto.
* libc/sys/sysnecv850/Makefile.in: Ditto.
* libc/sys/sysnecv850/configure: Ditto.
* libc/sys/sysvi386/Makefile.in: Ditto.
* libc/sys/sysvi386/configure: Ditto.
* libc/sys/sysvnecv70/Makefile.in: Ditto.
* libc/sys/sysvnecv70/configure: Ditto.
* libc/sys/tic80/Makefile.in: Ditto.
* libc/sys/tic80/configure: Ditto.
* libc/sys/w65/Makefile.in: Ditto.
* libc/sys/w65/configure: Ditto.
* libc/sys/z8ksim/Makefile.in: Ditto.
* libc/sys/z8ksim/configure: Ditto.
* libc/syscalls/Makefile.in: Ditto.
* libc/time/Makefile.in: Ditto.
* libc/unix/Makefile.in: Ditto.
* libm/Makefile.in: Ditto.
* libm/aclocal.m4: Ditto.
* libm/configure: Ditto.
* libm/common/Makefile.in: Ditto.
* libm/machine/Makefile.in: Ditto.
* libm/machine/aclocal.m4: Ditto.
* libm/machine/configure: Ditto.
* libm/machine/i386/Makefile.in: Ditto.
* libm/machine/i386/aclocal.m4: Ditto.
* libm/machine/i386/configure: Ditto.
* libm/machine/spu/Makefile.in: Ditto.
* libm/machine/spu/configure: Ditto.
* libm/math/Makefile.in: Ditto.
* libm/mathfp/Makefile.in: Ditto.
2008-09-29 15:40:48 +00:00
Eric Blake
f77a1a8848
Fix 2008-04-14 regression in asprintf(ptr,"").
...
* libc/stdio/asnprintf.c (asnprintf, _asnprintf_r): Avoid stdio
baggage.
* libc/stdio/asniprintf.c (asniprintf, _asniprintf_r): Likewise.
* libc/stdio/asiprintf.c (asiprintf, _asiprintf_r): Likewise.
* libc/stdio/vasniprintf.c (_vasniprintf_r): Likewise.
* libc/stdio/vsnprintf.c (_vsnprintf_r): Likewise.
* libc/stdio/vfprintf.c (_VFPRINTF_R) [STRING_ONLY]: Always malloc
an initial buffer for asprintf.
2008-04-30 02:47:14 +00:00
Jeff Johnston
eabd7de028
2008-04-14 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/Makefile.am: Build vfprintf.c and vfscanf.c with
-DSTRING_ONLY defined with and without -DINTEGER_ONLY defined
to build special versions for sprintf/sscanf family functions.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio/vfprintf.c[STRING_ONLY][INTEGER_ONLY](_VFPRINTF_R):
Redefine to be _svfiprintf_r which is optimized to work with siprintf
family of functions (i.e. no I/O) and does not support floating-point.
[STRING_ONLY][!INTEGER_ONLY](_VFPRINTF_R): Redefine to be
_svfprintf_r which is optimized to work with sprintf family of
functions and not use I/O.
[STRING_ONLY](__sprint_r): New string only version of static function.
designed to work with sprintf family of functions.
* libc/stdio/vfscanf.c[STRING_ONLY][INTEGER_ONLY](_SVFSCANF_R):
Redefine to be _ssvfiscanf_r which is optimized to work with siscanf
family of functions (i.e. no I/O) and no float-point support.
[STRING_ONLY][!INTEGER_ONLY](_SVFSCANF_R): Redefine to be
__ssvfscanf_r which is optimized to work with sscanf family of
functions and does not require I/O functions.
* libc/stdio/asprintf.c: Call _svfprintf_r instead of _vfprintf_r.
* libc/stdio/snprintf.c: Ditto.
* libc/stdio/sprintf.c: Ditto.
* libc/stdio/vasnprintf.c: Ditto.
* libc/stdio/vasprintf.c: Ditto.
* libc/stdio/siprintf.c: Call _svfiprintf_r instead of _vfiprintf_r.
* libc/stdio/sniprintf.c: Ditto.
* libc/stdio/vasiprintf.c: Ditto.
* libc/stdio/vsiprintf.c: Ditto.
* libc/stdio/vsniprintf.c: Ditto.
* libc/stdio/vsprintf.c: Ditto.
* libc/stdio/local.h: Add prototypes for _svfprintf_r, _svfiprintf_r,
_ssvfscanf_r, and _ssvfiscanf_r.
* libc/stdio/sscanf.c: Call _ssvfscanf_r instead of _svfscanf_r.
* libc/stdio/vsscanf.c: Ditto.
* libc/stdio/siscanf.c: Call _ssvfiscanf_r instead of _svfiscanf_r.
* libc/stdio/vsiscanf.c: Ditto.
2008-04-14 21:14:55 +00:00
Jeff Johnston
d84985f794
2008-03-11 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/rgetc.c (__srget_r): Invoke CHECK_INIT to ensure
stdin gets resolved properly before refilling.
2008-03-11 19:13:30 +00:00
Jeff Johnston
88348faf5b
2008-03-11 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/rgetc.c (__srget): Invoke CHECK_INIT to ensure
stdin gets resolved properly before refilling.
2008-03-11 19:08:39 +00:00
Jeff Johnston
0382d26727
2008-03-07 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/sys/reent.h(_REENT_SMALL_CHECK_INIT): Specify
this macro completely instead of referring to CHECK_STD_INIT which
is only found in libc/stdio/local.h.
* libc/stdio/dprintf.c: Add include of local.h.
* libc/stdio/vdprintf.c: Ditto.
* libc/stdio/vdiprintf.c: Ditto.
2008-03-07 16:45:04 +00:00
Eric Blake
9ae00e9e07
Fix ftell bug after ungetc.
...
* libc/stdio/ftell.c (_ftell_r): Don't flush ungetc buffer on
ftell.
* libc/stdio64/ftello64.c (_ftello64_r): Likewise.
* libc/stdio/fflush.c (_fflush_r): Clear unget buffer when
repositioning underlying fd offset.
-------------------------------------------------------------------
2008-03-04 02:22:36 +00:00
Jeff Johnston
a639937a9a
2008-01-03 Jeff Johnston <jjohnstn@redhat.com>
...
Make isatty syscall handling consistent with other newlib syscalls.
* libc/include/_syslist.h: Add _isatty.
* libc/include/reent.h: Add _isatty_r.
* libc/include/sys/unistd.h: Add _isatty.
* libc/posix/Makefile.am: Add new _isatty.c file.
* libc/posix/Makefile.in: Regenerated.
* libc/posix/_isatty.c: New file.
* libc/posix/isatty.c: Changed to call _isatty().
* libc/reent/Makefile.am: Add new isattyr.c file.
* libc/reent/Makefile.in: Regenerated.
* libc/reent/isattyr.c: New file.
* libc/stdio/freopen.c: Changed to call _isatty_r().
* libc/stdio/makebuf.c: Ditto.
* libc/sys/a29khif/_isatty.S: Change isatty to _isatty.
* libc/sys/arc/isatty.c: Ditto.
* libc/sys/arm/syscalls.c: Ditto.
* libc/sys/d10v/syscalls.c: Ditto.
* libc/sys/h8300hms/syscalls.c: Ditto.
* libc/sys/h8500hms/syscalls.c: Ditto.
* libc/sys/linux/Makefile.am: Add new isatty.c file.
* libc/sys/linux/Makefile.in: Regenerated.
* libc/sys/linux/isatty.c: New file.
* libc/syscalls/Makefile.am: Add new sysisatty.c file.
* libc/syscalls/Makefile.in: Regenerated.
* libc/syscalls/sysisatty.c: New file.
2008-01-03 22:33:37 +00:00
Jeff Johnston
26b8429317
2007-12-19 Jeff Johnston <jjohnstn@redhat.com>
...
* NEWS: Update with 1.16.0 info.
* README: Ditto.
* acinclude.m4: Change version number to 1.16.0.
* aclocal.m4: Regenerated.
* configure: Ditto.
* doc/aclocal.m4: Ditto.
* doc/configure: Ditto.
* libc/*/aclocal.m4: Ditto.
* libc/*/configure: Ditto.
* libc/libc.texinfo: Ditto.
* libm/*/aclocal.m4: Ditto.
* libm/*/configure: Ditto.
* libm/libm.texinfo: Ditto.
* libc/sys/linux/shared.ld: Add VERS_1.16.
2007-12-19 22:36:48 +00:00
Corinna Vinschen
478df8bb91
* libc/stdio/vfprintf.c (_VFPRINTF_R): Use correct pointer in call to
...
_wcsrtombs_r.
2007-12-19 17:06:19 +00:00
Eric Blake
c99e78b85c
* libc/stdio/vfprintf.c (_VFPRINTF_R) [__OPTIMIZE_SIZE__]:
...
Correctly nest else within conditionals.
Reported by Artur Lipowski.
2007-10-13 15:26:20 +00:00
Jeff Johnston
3908c98592
2007-09-18 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/reent/renamer.c: New file.
* libc/reent/Makefile.am: Add new file.
* libc/reent/Makefile.in: Regenerated.
* libc/stdio/rename.c: Break out _rename_r code into reent/renamer.c
and add check for rename syscall.
2007-09-18 19:32:43 +00:00
Eric Blake
ba21046d03
Obey POSIX on printf("%.s", (char*)NULL).
...
* libc/stdio/vfprintf.c (_VFPRINTF_R): Take precision into account
for %s on NULL. Skip NULL check when optimizing for size.
2007-09-17 20:14:29 +00:00
Jeff Johnston
6ddf8bef40
2007-08-31 Antony King <antony.king@st.com>
...
* libc/stdlib/mprec.h [_DOUBLE_IS_32BITS}: Define IEEE_Arith
bits and redefine associated dword0 macro (rvalue issue).
* libc/stdio/vfieeefp.h: Ditto.
* libc/stdlib/strtod.c: Add checks for _DOUBLE_IS_32BITS
to prevent setting dword1 which is an rvalue only.
2007-08-31 21:21:27 +00:00
Eric Blake
6ddcdb9da5
Implement fmemopen and open_memstream.
...
* libc/stdio/fmemopen.c (_fmemopen_r, fmemopen): New file.
* libc/stdio/open_memstream.c (_open_memstream_r, open_memstream):
New file.
* libc/stdio/fopencookie.c (fcwriter): Minor optimization.
* libc/include/stdio.h (dprintf, vdprintf): Group all POSIX 200x
functions together.
(fmemopen, open_memstream): Declare new functions.
* libc/stdio/stdio.tex: Document them.
* libc/stdio/Makefile.am (ELIX_4_SOURCES, CHEWOUT_FILES): Add
fmemopen and open_memstream.
* libc/stdio/Makefile.in: Regenerate.
2007-08-02 20:23:06 +00:00
Eric Blake
f7c978d50f
More POSIX stream corner cases.
...
* libc/stdio/findfp.c (__sinit): Open stderr read/write.
* libc/stdio/fdopen.c (_fdopen_r): Set O_APPEND on fd when
requested.
* libc/stdio64/fdopen64.c (_fdopen64_r): Likewise.
2007-07-31 20:49:40 +00:00
Eric Blake
391b530a05
Fix 'make info'.
...
* libc/stdio/stdio.tex: Add missing include.
* libc/stdio/vfprintf.c: Use expected node name.
* libc/stdio/vfscanf.c: Likewise.
* libc/stdio/sscanf.c: Likewise.
* libc/stdio/sprintf.c: Likewise.
* libc/stdio/siscanf.c: Likewise.
* libc/stdio/siprintf.c: Likewise.
* libc/stdio/fopencookie.c: Quote raw {}.
Reported by DJ Delorie.
2007-07-19 03:42:21 +00:00
Eric Blake
08146e5adb
Fix fflush issues.
...
* libc/stdio/fflush.c (_fflush_r): New function.
(fflush): Fix reentrancy and large offset behavior.
* libc/include/stdio.h (_fflush_r): Add prototype.
* libc/stdio/fclose.c (_fclose_r): All fflush callers changed.
* libc/stdio/freopen.c (_freopen_r): Likewise.
* libc/stdio/fseek.c (_fseek_r): Likewise.
* libc/stdio/ftell.c (_ftell_r): Likewise.
* libc/stdio/fvwrite.c (__sfvwrite_r): Likewise.
* libc/stdio/refill.c (__srefill_r): Likewise.
* libc/stdio/setvbuf.c (setvbuf): Likewise.
* libc/stdio/ungetc.c (_ungetc_r): Likewise.
* libc/stdio/vfprintf.c (__sbprintf): Likewise.
* libc/stdio/wbuf.c (__swbuf_r): Likewise.
* libc/stdio64/freopen64.c (_freopen64_r): Likewise.
* libc/stdio64/fseeko64.c (_fseeko64_r): Likewise. Defer to
32-bit version if not large file.
* libc/stdio64/ftello64.c (_ftello64_r): Likewise.
* libc/stdio64/tmpfile64.c (_tmpfile64_r): Avoid compile warning.
2007-07-13 20:37:53 +00:00
Eric Blake
88c8888127
Documentation updates.
...
* libc/stdio/ungetc.c: Document ungetc.
* libc/stdio/Makefile.am (CHEWOUT_FILES): Sort, match current list
of files with documentation.
* libc/stdio/Makefile.in: Regenerate.
* libc/stdio/stdio.tex: Sort and update stdio documentation index.
2007-07-13 17:07:28 +00:00
Eric Blake
17c61d6a2c
Implement funopen, fopencookie.
...
* libc/include/sys/reent.h (struct __sFILE, struct __sFILE64):
Switch to reentrant callbacks.
* libc/include/stdio.h (funopen): Fix declaration.
(fopencookie): Declare.
* libc/stdio/local.h (__sread, __swrite, __sseek, __sclose)
(__sseek64, __swrite64): Fix prototypes.
[__SCLE]: Pull in setmode declaration.
* libc/stdio/stdio.c (__sread, __swrite, __sseek, __sclose): Fix
reentrancy.
* libc/stdio64/stdio64.c (__sseek64_r, __swrite64_r): Delete.
(__sseek64, __swrite64): Fix reentrancy.
* libc/stdio/fseek.c (_fseek_r): Account for overflow, and fix
reentrancy.
* libc/stdio/ftell.c (_ftell_r): Likewise.
* libc/stdio/flags.c (__sflags): Don't lose __SAPP on "a+".
* libc/stdio/fclose.c (_fclose_r): Fix reentrancy.
* libc/stdio/freopen.c (_freopen_r): Likewise.
* libc/stdio/fvwrite.c (__sfvwrite_r): Likewise.
* libc/stdio/refill.c (__srefill_r): Likewise.
* libc/stdio/siscanf.c (eofread): Likewise.
* libc/stdio/sscanf.c (eofread): Likewise.
* libc/stdio/vsiscanf.c (eofread1): Likewise.
* libc/stdio/vsscanf.c (eofread1): Likewise.
* libc/stdio64/freopen64.c (_freopen64_r): Likewise.
* libc/stdio64/fseeko64.c (_fseeko64_r): Likewise.
* libc/stdio64/ftello64.c (_ftello64_r): Likewise.
* libc/stdio/fflush.c (fflush): Improve reentrancy, although more
could be fixed.
* libc/stdio/fopencookie.c (_fopencookie_r, fopencookie): New file.
* libc/stdio/funopen.c (_funopen_r, funopen): New file.
* libc/stdio/Makefile.am (ELIX_4_SOURCES, CHEWOUT_FILES): Build
new files.
* libc/stdio/Makefile.in: Regenerate.
2007-06-04 18:10:17 +00:00
Eric Blake
75acf0bb2e
* libc/stdio/vfprintf.c (_VFPRINTF_R): Populate 'ox' when
...
handling %p.
2007-05-27 14:19:15 +00:00
Eric Blake
f5c58e9a34
* libc/stdio/rewind.c (rewind): Fix regression of 2003-08-22.
2007-05-25 17:05:09 +00:00
Steve Ellcey
d9a1ecc006
* ltmain.sh: Update from GCC.
...
* libtool.m4: Update from GCC.
* ltsugar.m4: New. Update from GCC.
* ltversion.m4: New. Update from GCC.
* ltoptions.m4: New. Update from GCC.
* ltconfig: Remove.
* ltcf-c.sh: Remove.
* ltcf-cxx.sh: Remove.
* ltcf-gcj.sh: Remove.
* src-release: Update with new libtool file list.
* newlib/*/configure.in: invoke _LD_DECL_SED.
* newlib/*/Makefile.am: Ensure toplevel is included in ACLOCAL_AMFLAGS.
* Regenerate subdirectories
2007-05-24 17:33:42 +00:00
Eric Blake
aa5341f9ac
* libc/stdio/vfprintf.c (_VFPRINTF_R): Don't truncate %p when
...
sizeof(void*) is 8 but sizeof(long) is 4.
* libc/stdio/vfscanf.c (__SVFSCANF_R): Likewise. Fix %i scanning
of "-0x". Support "-nan" and "inf" for %e. Audit usage of ungetc
to fix reentrancy and bug on encoding error in multibyte locales.
Always return EOF on read error.
2007-05-24 04:25:18 +00:00
Eric Blake
9a3ec8622b
* libc/stdio/vfscanf.c (__SVFSCANF_R): Support scanf(%1$s).
...
Avoid warning when !FLOATING_POINT.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Simplify _NO_POS_ARGS
slightly.
2007-05-23 20:36:28 +00:00
Eric Blake
8aab2bc260
* libc/stdio/vfprintf.c [_WANT_IO_LONG_LONG]: Allow non-gcc
...
compilers.
* libc/stdio/vfscanf.c: Likewise.
2007-05-18 14:33:30 +00:00
Eric Blake
487e9075d0
* stdio/tmpfile.c: Include <sys/stat.h>.
...
* stdio64/tmpfile64.c: Ditto.
2007-05-17 12:10:29 +00:00
Eric Blake
d009633d30
Close security hole in tmpfile.
...
* libc/stdio/tmpfile.c (_tmpfile_r): Avoid window between filename
generation and opening the fd.
* libc/stdio64/tmpfile64.c (_tmpfile64_r): Likewise.
2007-05-16 20:06:08 +00:00
Eric Blake
34507ce026
Reduce stack size of *printf.
...
* libc/stdio/vfprintf.c (_VFPRINTF_R): Fix use of decimal point
in %f. Avoid malloc when possible for %S.
(BUF): Improve stack locality by using smaller size.
(MAXEXPLEN, _PRINTF_FLOAT_TYPE): Define.
(exponent): Use smaller stack size.
2007-05-14 19:42:47 +00:00
Eric Blake
0962fe9178
Minimize printf/scanf size on platforms that don't need C99.
...
* acconfig.h (_WANT_IO_C99_FORMATS): New macro.
* newlib.hin (_WANT_IO_C99_FORMATS): Likewise.
* configure.in (newlib-io-c99-formats): New configure option.
(_WANT_IO_C99_FORMATS): Define appropriately.
* configure.host (*-linux*, cygwin): Default c99-formats to yes.
* libc/stdio/vfprintf.c (_VFPRINTF_R) [!_WANT_IO_C99_FORMATS]:
Cripple ' flag; hh, z, j, t sizes; a, A, F, C, S specifiers.
* libc/stdio/vfscanf.c (_VFSCANF_R) [!_WANT_IO_C99_FORMATS]:
Likewise.
* configure: Regenerate.
2007-05-11 20:09:00 +00:00
Eric Blake
b8a37af936
* libc/stdio/vfprintf.c (_VFPRINTF_R, cvt, exponent, chclass)
...
(get_arg): Support '%a' and '%A'.
2007-05-11 13:09:44 +00:00
Eric Blake
81274c6726
Allow zero size with non-null buf in *asnprintf.
...
* libc/stdio/asnprintf.c (_asnprintf_r, asnprintf): Avoid free'ing
user's buf.
* libc/stdio/asniprintf.c (_asniprintf_r, asniprintf): Likewise.
* libc/stdio/vasniprintf.c (_vasniprintf_r): Likewise.
* libc/stdio/vasnprintf.c (_vasnprintf_r): Likewise.
2007-05-09 19:27:30 +00:00
Eric Blake
38ed4e5111
* libc/stdio/vfprintf.c: Fix typo in comments that breaks docs.
2007-05-08 03:59:13 +00:00
Eric Blake
b9db529222
Add support for asnprintf, and improve *printf documentation.
...
* libc/stdio/Makefile.am (ELIX_SOURCES): Rename...
(ELIX_2_SOURCES): ...to this.
(ELIX_4_SOURCES): Add new variable. Build asnprintf.
(GENERAL_SOURCES): Move dprintf to ELIX_4_SOURCES.
(CHEWOUT_FILES): Include diprintf in documentation.
* libc/stdio/Makefile.in: Regenerate.
* libc/stdio/diprintf.c: Improve documentation.
* libc/stdio/dprintf.c: Likewise.
* libc/stdio/siprintf.c: Likewise.
* libc/stdio/sprintf.c: Likewise.
* libc/stdio/vfprintf.c: Likewise.
* libc/stdio/viprintf.c: Likewise.
* libc/stdio/vsniprintf.c: Consolidate documentation.
* libc/stdio/asiprintf.c: Refer to documentation.
* libc/stdio/asprintf.c: Likewise.
* libc/stdio/fiprintf.c: Likewise.
* libc/stdio/fprintf.c: Likewise.
* libc/stdio/iprintf.c: Likewise.
* libc/stdio/printf.c: Likewise.
* libc/stdio/sniprintf.c: Likewise.
* libc/stdio/vdiprintf.c: Likewise.
* libc/stdio/vdprintf.c: Likewise.
* libc/stdio/vsiprintf.c: Likewise.
* libc/stdio/fvwrite.c (__sfvwrite_r): Handle asnprintf.
* libc/stdio/asniprintf.c (asniprintf, _asniprintf_r): New file.
* libc/stdio/asnprintf.c (asnprintf, _asnprintf_r): New file.
* libc/stdio/vasniprintf.c (vasniprintf, _vasniprintf_r): New
file.
* libc/stdio/vasnprintf.c (vasnprintf, _vasnprintf_r): New file.
* libc/stdio/vdprintf.c (_vdprintf_r): Rewrite to avoid malloc in
typical case.
* libc/stdio/vdiprintf.c (_vdiprintf_r): Likewise.
* libc/include/stdio.h: Add prototypes for new functions; sort
existing functions.
2007-05-04 02:55:16 +00:00
Eric Blake
b4f095585f
* libc/stdio64/local64.h: Delete, move contents to...
...
* libc/stdio/local.h: ...here.
* libc/stdio64/fdopen64.c: Update includes.
* libc/stdio64/fopen64.c: Likewise.
* libc/stdio64/freopen64.c: Likewise.
* libc/stdio64/fseeko64.c: Likewise.
* libc/stdio64/ftello64.c: Likewise.
* libc/stdio/findfp.c (std) [__LARGE64_FILES]: Open stdin, stdout,
and stderr with 64-bit offset.
* libc/stdio/fseek.c (_fseek_r): Avoid compile warning.
* libc/stdio/makebuf.c (__smakebuf_r): Likewise.
* libc/stdio/mktemp.c (_gettemp): Likewise.
2007-05-01 23:03:36 +00:00
Jeff Johnston
8b36608695
2007-04-25 Eric Blake <ebb9@byu.net>
...
* libc/stdio/vfprintf.c (get_arg): Support %1$lc. Simplify types
that promote to int.
2007-04-25 19:47:36 +00:00
Eric Blake
5866c02352
* libc/stdio/vfprintf.c (_VFPRINTF_R): Don't zero pad on infinity
...
or NaN with %05f.
2007-04-24 20:09:50 +00:00
Eric Blake
27e5e9ab05
* libc/stdio/vfprintf.c (_VFPRINTF_R): Avoid multibyte when not
...
_MB_CAPABLE.
2007-04-24 19:55:28 +00:00
Eric Blake
68f2517f72
* libc/include/limits.h (NL_ARGMAX): Define a default value.
...
* libc/stdio/vfprintf.c (MAX_POS_ARGS): Define in terms of
NL_ARGMAX, if present.
2007-04-24 16:01:15 +00:00
Jeff Johnston
714d0b7a88
2007-04-23 Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de>
...
* confsubdir.m4 (AC_CONFIG_SUBDIRS, _AC_OUTPUT_SUBDIRS): New
file. Override Autoconf-2.59's version of these macros with
fixed handling of multiple adjacent whitespace in arguments.
* aclocal.m4: Regenerated forcefully.
* configure: Ditto.
* Makefile.in: Ditto.
* libc/*Makefile.in: Ditto.
* libc/*aclocal.m4: Ditto.
* libc/*configure: Ditto.
* libm/*Makefile.in: Ditto.
* libm/*aclocal.m4: Ditto.
* libm/*configure: Ditto.
2007-04-23 22:52:37 +00:00
Jeff Johnston
930b1861ce
2007-04-23 Brian Dessent <brian@dessent.net>
...
* libc/stdio/vfprintf.c (_vfprintf_r): When the alternate-form flag
has been specified with types 'f', 'F', 'g', or 'G', ensure the
trailing decimal is printed.
2007-04-23 21:55:31 +00:00
Jeff Johnston
fb5750bfb4
2007-04-17 Brian Dessent <brian@dessent.net>
...
* libc/stdio/sscanf.c: Update documentation comments.
* libc/stdio/vfscanf.c (__SVFSCANF_R): Handle j, t, and z modifiers.
2007-04-17 20:53:24 +00:00
Eric Blake
ba3ccd633d
* libc/stdio/vfprintf.c (_VFPRINTF_F, cvt): Don't confuse %F with %e.
...
(chclass): Recognize 'F', 'X', 'n', and not 'W'.
(get_arg): Handle %1$F, %1$n.
2007-04-13 01:57:33 +00:00
Jeff Johnston
db7aa4b168
2007-04-04 Eric Blake <ebb9@byu.net>
...
* libc/stdio/asiprintf.c (_asiprintf_r): Fix reentrancy.
(asiprintf): Avoid overhead.
* libc/stdio/asprintf.c (_asprintf_r): Fix reentrancy.
(asprintf): Avoid overhead.
* libc/stdio/diprintf.c (_diprintf_r, diprintf): New file.
* libc/stdio/dprintf.c (_dprintf_r, dprintf): Use _DEFUN.
* libc/stdio/fiprintf.c (_fiprintf_r): Add reentrant version.
(fiprintf): Avoid overhead.
* libc/stdio/fprintf.c (_fprintf_r): Add reentrant version.
(fprintf): Avoid overhead.
* libc/stdio/iprintf.c (_iprintf_r): Use _DEFUN.
(iprintf): Avoid overhead.
* libc/stdio/printf.c (_printf_r): Use _DEFUN.
(printf): Avoid overhead.
* libc/stdio/vasiprintf.c (vasiprintf): Reduce binary size.
* libc/stdio/vasprintf.c (vasprintf): Reduce binary size.
* libc/stdio/vdiprintf.c (_vdiprintf_r, vdiprintf): New file.
* libc/stdio/vdprintf.c (vdprintf): Avoid overhead.
* libc/stdio/vsiprintf.c (vsiprintf): Reduce binary size.
* libc/stdio/vsniprintf.c (vsniprintf): Reduce binary size.
* libc/stdio/vsnprintf.c (vsnprintf): Reduce binary size.
* libc/stdio/vsprintf.c (vsprintf): Reduce binary size.
* libc/stdio/Makefile.am (GENERAL_SOURCES): Add diprintf.c,
vdiprintf.c.
* libc/include/stdio.h (diprintf, _diprintf_r, vdiprintf)
(_vdiprintf_r, _fiprintf_r, _vfiprintf_r): Add prototypes.
2007-04-04 18:32:49 +00:00
Jeff Johnston
826b5591dd
2007-03-15 Jeff Johnston <jjohnstn@redhat.com>
...
* configure.in: Add new --enable-newlib-reent-small option.
* configure: Regenerated.
* acconfig.h: Add _WANT_REENT_SMALL.
* newlib.hin: Regenerated minus PACKAGE macros to add
_WANT_REENT_SMALL macro.
* libc/include/sys/config.h[_WANT_REENT_SMALL]: Set _REENT_SMALL
if not already set.
* libc/stdio/fflush.c[_REENT_SMALL]: Return immediately if
there is no buffer.
* libc/stdio/local.h[_REENT_SMALL]: Fix CHECK_INIT macro to
use reentrant pointer passed in when resetting the file
pointer to one of the std streams.
2007-03-15 21:32:13 +00:00
Jeff Johnston
14ba5e14d9
2007-03-15 Eric Blake <ebb9@byu.net>
...
* libc/stdio/local.h (cantwrite, FREEUB, FREELB): Make reentrant.
(__smakebuf): Rename...
(__smakebuf_r): to this.
* libc/stdio/fvwrite.h (__swsetup_r): Rename, from __swsetup.
* libc/stdio/makebuf.c (__smakebuf): Detect failed asprint
allocation, then rename...
(__smakebuf_r): ...to this and fix reentrancy.
* libc/stdio/wsetup.c (__swsetup): Detect failed asprintf
allocation, then rename...
(__swsetup_r): ...to this and fix reentrancy.
* libc/stdio/fseek.c (_fseek_r): Fix reentrancy.
* libc/stdio/refill.c (__srefill_r): Likewise.
* libc/stdio/fclose.c (_fclose_r): Likewise.
* libc/stdio/fread.c (_fread_r): Likewise.
* libc/stdio/freopen.c (_freopen_r): Likewise.
* libc/stdio/wbuf.c (__swbuf_r): Likewise.
* libc/stdio64/fseeko64.c (_fseeko64_r): Likewise.
* libc/stdio/fvwrite.c (__sfvwrite_r): Set errno properly on
failed asprintf allocation, and fix reentrancy.
* libc/stdio/snprintf.c (snprintf, _snprintf_r): Report overflow,
as required by POSIX.
* libc/stdio/sniprintf.c (sniprintf, _sniprintf_r): Likewise.
* libc/stdio/vsnprintf.c (vsnprintf, _vsnprintf_r): Likewise.
* libc/stdio/vsniprintf.c (vsniprintf, _vsniprintf_r): Likewise.
2007-03-15 18:40:48 +00:00
Jeff Johnston
99304ce6c4
2007-03-12 Eric Blake <ebb9@byu.net>
...
* libc/stdio/fvwrite.c (__sfvwrite_r): Fix reentrancy.
* libc/stdio/vasprintf.c (vasprintf, _vasprintf_r): Pass failed
allocation to caller.
* libc/stdio/asprintf.c (_asprintf_r, asprintf): Likewise.
* libc/stdio/asiprintf.c (_asiprintf_r, asiprintf): Likewise.
* libc/stdio/vasiprintf.c (vasiprintf, _vasiprintf_r): Likewise.
2007-03-12 20:30:08 +00:00
Jeff Johnston
0733ae3bca
2007-01-31 Kazunori Asayama <asayama@sm.sony.co.jp>
...
* configure.host: Define stdio directory as a variable.
* libc/Makefile.am: Define stdio related names
as macros.
* libc/configure.in: Add detection routine of stdio directory.
* libc/Makefile.in: Regenerated.
* libc/configure: Ditto.
* libc/argz/Makefile.in: Ditto.
* libc/ctype/Makefile.in: Ditto.
* libc/errno/Makefile.in: Ditto.
* libc/iconv/Makefile.in: Ditto.
* libc/iconv/ccs/Makefile.in: Ditto.
* libc/iconv/ccs/binary/Makefile.in: Ditto.
* libc/iconv/ces/Makefile.in: Ditto.
* libc/iconv/lib/Makefile.in: Ditto.
* libc/locale/Makefile.in: Ditto.
* libc/misc/Makefile.in: Ditto.
* libc/posix/Makefile.in: Ditto.
* libc/reent/Makefile.in: Ditto.
* libc/search/Makefile.in: Ditto.
* libc/signal/Makefile.in: Ditto.
* libc/stdio/Makefile.in: Ditto.
* libc/stdio64/Makefile.in: Ditto.
* libc/stdlib/Makefile.in: Ditto.
* libc/string/Makefile.in: Ditto.
* libc/syscalls/Makefile.in: Ditto.
* libc/time/Makefile.in: Ditto.
* libc/unix/Makefile.in: Ditto.
2007-01-31 19:34:38 +00:00
Jeff Johnston
78b7c6f817
2006-12-18 Jeff Johnston <jjohnstn@redhat.com>
...
* aclocal.m4 */aclocal.m4: Regenerated using aclocal 1.9.6.
* Makefile.in */Makefile.in: Regenerated using automake 1.9.6.
2006-12-18 20:32:52 +00:00
Jeff Johnston
4c0b8a072b
2006-12-14 Jeff Johnston <jjohnstn@redhat.com>
...
Eric Blake <ebb9@byu.net>
* libc/stdio/fflush.c (fflush): On seekable streams, always flush
read but unused data.
* libc/stdio/fclose.c (_fclose_r): Always flush streams, since
even read streams may have side effects that must happen.
2006-12-14 22:47:12 +00:00
Jeff Johnston
7d79436443
2006-11-29 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/makebuf.c (__smakebuf): If dealing with
an asprintf-family buffer, make the default initial size 64.
2006-11-30 00:35:57 +00:00
Jeff Johnston
c4c7f13966
2006-11-29 Eric Blake <ebb9@byu.net>
...
* libc/stdio/fvwrite.c (__sfvwrite_r): Avoid off-by-one error in
asprintf, as well as quadratic realloc behavior.
2006-11-29 21:36:54 +00:00
Jeff Johnston
d1a2fe1a62
2006-11-14 Eric Blake <ebb9@byu.net>
...
* libc/stdio/vfprintf.c (_vfprintf_r): Support ' flag.
(chclass): ' is a flag. j, t, and z are modifiers.
2006-11-14 21:29:26 +00:00
Jeff Johnston
e5e148d15b
2006-09-26 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/stdio.h[_REENT_SMALL]: Do not allow macros
for clearerr, feof, or fileno.
* libc/include/sys/reent.h[_REENT_SMALL](struct _reent): Change
the dummy std stream scheme to use pointers to const external
fake files, one for each standard stream.
* libc/stdio/local.h (CHECK_INIT): Change to take a file pointer
argument. For _REENT_SMALL, reset the file pointer if it
matches one of the fake std stream pointers.
* libc/stdio/clearerr.c: Fix CHECK_INIT macro to add file pointer
argument.
* libc/stdio/fclose.c: Ditto.
* libc/stdio/feof.c: Ditto.
* libc/stdio/ferror.c: Ditto.
* libc/stdio/fflush.c: Ditto.
* libc/stdio/fgetc.c: Ditto.
* libc/stdio/fgets.c: Ditto.
* libc/stdio/fileno.c: Ditto.
* libc/stdio/findfp.c: Ditto.
* libc/stdio/fputc.c: Ditto.
* libc/stdio/fputs.c: Ditto.
* libc/stdio/fread.c: Ditto.
* libc/stdio/freopen.c: Ditto.
* libc/stdio/fseek.c: Ditto.
* libc/stdio/ftell.c: Ditto.
* libc/stdio/fwrite.c: Ditto.
* libc/stdio/getc.c: Ditto.
* libc/stdio/getdelim.c: Ditto.
* libc/stdio/putc.c: Ditto.
* libc/stdio/refill.c: Ditto.
* libc/stdio/setvbuf.c: Ditto.
* libc/stdio/ungetc.c: Ditto.
* libc/stdio/vfprintf.c: Ditto.
* libc/stdio/vfscanf.c: Ditto.
* libc/stdio/wbuf.c: Ditto.: Ditto.
* libc/stdio/wsetup.c: Ditto.
* libc/stdio64/freopen64.c: Ditto.
* libc/stdio64/fseeko64.c: Ditto.
* libc/stdio64/ftello64.c: Ditto.
* libc/machine/powerpc/vfprintf.c: Ditto.
* libc/machine/powerpc/vfscanf.c: Ditto.
2006-09-26 21:22:19 +00:00
Jeff Johnston
d39002f9ca
2006-09-06 Eric Blake <ebb9@byu.net>
...
* libc/stdio/vfprintf.c (_vfprintf_r, get_arg): Add 'hh', 'j',
't', and 'z' modifiers.
2006-09-06 20:03:27 +00:00
Jeff Johnston
2ebf115df9
2006-08-01 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/Makefile.am: Add libc_TEXINFOS dependency on
generated .texi files.
* libm/Makefile.am: Add libm_TEXINFOS dependency on
generated .texi files.
* libc/Makefile.in: Regenerated.
* libm/Makefile.in: Ditto.
2006-08-01 20:20:25 +00:00
Jeff Johnston
0a85d87f03
2006-07-31 Jeff Johnston <jjohnstn@redhat.com>
...
* acinclude.m4: Check for readelf tool.
* configure.in: Use ${READELF} instead of hard-coding.
* Regenerate all aclocal.m4, Makefile.in, and configure files.
2006-07-31 23:01:28 +00:00
Jeff Johnston
c8956c6fec
2006-06-15 Corinna Vinschen <corinna@vinschen.de>
...
* libc/include/stdio.h (__sgetc_r): Fix typo.
* libc/stdio/fread.c (_fread_r): Convert crlf calls to crlf_r.
* libc/stdio/rget.c (__srbuf): Reinstantiate.
* libc/stdio/wbuf.c (__swbuf): Ditto.
2006-06-15 16:08:09 +00:00
Jeff Johnston
4dc0c0c4e5
2006-06-14 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/stdio.h: Add new reentrant I/O prototypes for
read/write functions. Change getc/putc macros to have reentrant underlying
macros/functions. This includes __sgetc_raw_r, __sgetc_r, and __sputc_r.
* libc/stdio/fgetc.c: Fix and/or add reentrant version to call
new reentrant I/O functions/macros for reading/writing.
* libc/stdio/fgets.c: Ditto.
* libc/stdio/fputc.c: Ditto.
* libc/stdio/fputs.c: Ditto.
* libc/stdio/fread.c: Ditto.
* libc/stdio/fseek.c: Ditto.
* libc/stdio64/fseeko64.c: Ditto.
* libc/stdio/fwrite.c: Ditto.
* libc/stdio/getc.c: Ditto.
* libc/stdio/getc_u.c: Ditto.
* libc/stdio/getchar.c: Ditto.
* libc/stdio/getchar_u.c: Ditto.
* libc/stdio/putc.c: Ditto.
* libc/stdio/putc_u.c: Ditto.
* libc/stdio/putchar.c: Ditto.
* libc/stdio/puts.c: Ditto.
* libc/stdio/vfprintf.c: Ditto.
* libc/stdio/vfscanf.c: Ditto.
* libc/stdio/fvwrite.c: Change __sfvwrite into reentrant __sfvwrite_r.
Change all previous callers of __sfvwrite. Set errno to EBADF and
set error flag on if attempt is made to write to file that does not
allow writing.
* libc/stdio/fvwrite.h: Fix new reentrant prototypes.
* libc/stdio/local.h: Ditto.
* libc/stdio/refill.c: Turn __srefill into reentrant __srefill_r.
Set errno to EBADF and the error flag on if attempt is made to
read unreadable file. Change all previous callers of __srefill.
* libc/stdio/rget.c
* libc/stdio/wbuf.c: Turn __swbuf into reentrant __swbuf_r. Change
all previous callers of __swbuf.
* libc/sys/linux/machine/i386/huge_val.h: Ifdef out file contents since
huge value macros are already defined correctly for i386 by <math.h>.
2006-06-14 20:49:11 +00:00
Jeff Johnston
8f8f1db12f
2006-05-01 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/argz/Makefile.am: Prefix any objects specified with $(lpfx). If source file can
be specified instead of object, do so.
* libc/ctype/Makefile.am: Ditto.
* libc/iconv/ccs/Makefile.am: Ditto.
* libc/iconv/ces/Makefile.am: Ditto.
* libc/iconv/lib/Makefile.am: Ditto.
* libc/locale/Makefile.am: Ditto.
* libc/posix/Makefile.am: Ditto.
* libc/reent/Makefile.am: Ditto.
* libc/search/Makefile.am: Ditto.
* libc/stdio/Makefile.am: Ditto.
* libc/stdio64/Makefile.am: Ditto.
* libc/stdlib/Makefile.am: Ditto.
* libc/string/Makefile.am: Ditto.
* libc/syscalls/Makefile.am: Ditto.
* libc/unix/Makefile.am: Ditto.
* libc/machine/a29k/Makefile.am: Specify lib_a_CCASFLAGS so .S files will get
prefix added automatically. Any specified rules must use $(lpfx) for
object file names.
* libc/machine/arm/Makefile.am: Ditto.
* libc/machine/cris/Makefile.am: Ditto.
* libc/machine/crx/Makefile.am: Ditto.
* libc/machine/d10v/Makefile.am: Ditto.
* libc/machine/d30v/Makefile.am: Ditto.
* libc/machine/fr30/Makefile.am: Ditto.
* libc/machine/frv/Makefile.am: Ditto.
* libc/machine/h8300/Makefile.am: Ditto.
* libc/machine/h8500/Makefile.am: Ditto.
* libc/machine/hppa/Makefile.am: Ditto.
* libc/machine/i386/Makefile.am: Ditto.
* libc/machine/i960/Makefile.am: Ditto.
* libc/machine/iq2000/Makefile.am: Ditto.
* libc/machine/m32c/Makefile.am: Ditto.
* libc/machine/m32r/Makefile.am: Ditto.
* libc/machine/m68hc11/Makefile.am: Ditto.
* libc/machine/m68k/Makefile.am: Ditto.
* libc/machine/m88k/Makefile.am: Ditto.
* libc/machine/mips/Makefile.am: Ditto.
* libc/machine/mn10200/Makefile.am: Ditto.
* libc/machine/mn10300/Makefile.am: Ditto.
* libc/machine/mt/Makefile.am: Ditto.
* libc/machine/necv70/Makefile.am: Ditto.
* libc/machine/powerpc/Makefile.am: Ditto.
* libc/machine/sh/Makefile.am: Ditto.
* libc/machine/sh/Makefile.in: Ditto.
* libc/machine/sparc/Makefile.am: Ditto.
* libc/machine/tic4x/Makefile.am: Ditto.
* libc/machine/tic80/Makefile.am: Ditto.
* libc/machine/v850/Makefile.am: Ditto.
* libc/machine/w65/Makefile.am: Ditto.
* libc/machine/xscale/Makefile.am: Ditto.
* libc/machine/xstormy16/Makefile.am: Ditto.
* libc/machine/z8k/Makefile.am: Ditto.
* libc/sys/a29khif/Makefile.am: Ditto.
* libc/sys/arm/Makefile.am: Ditto.
* libc/sys/d10v/Makefile.am: Ditto.
* libc/sys/h8300hms/Makefile.am: Ditto.
* libc/sys/h8500hms/Makefile.am: Ditto.
* libc/sys/linux/Makefile.am: Ditto.
* libc/sys/linux/linuxthreads/Makefile.am: Ditto.
* libc/sys/linux/net/Makefile.am: Ditto.
* libc/sys/linux/stdlib/Makefile.am: Ditto.
* libc/sys/m88kbug/Makefile.am: Ditto.
* libc/sys/mmixware/Makefile.am: Ditto.
* libc/sys/rdos/Makefile.am: Ditto.
* libc/sys/rtems/Makefile.am: Ditto.
* libc/sys/sh/Makefile.am: Ditto.
* libc/sys/sun4/Makefile.am: Ditto.
* libc/sys/sysmec/Makefile.am: Ditto.
* libc/sys/sysnec810/Makefile.am: Ditto.
* libc/sys/sysnecv850/Makefile.am: Ditto.
* libc/sys/sysvi386/Makefile.am: Ditto.
* libc/sys/sysvnecv70/Makefile.am: Ditto.
* libc/sys/tic80/Makefile.am: Ditto.
* libc/sys/w65/Makefile.am: Ditto.
* libc/sys/z8ksim/Makefile.am: Ditto.
* libc/machine/necv70/fastmath.S: Renamed from .s file.
* libc/machine/necv70/setjmp.S: Ditto.
* libc/machine/necv70/fastmath.s: Removed.
* libc/machine/necv70/setjmp.s: Ditto.
* libc/machine/w65/*.S: New files renamed from .s files.
* libc/machine/w65/*.s: Renamed and removed.
* libc/sys/a29khif/*.S: New files renamed from .s files.
* libc/sys/a29khif/*.s: Renamed and removed.
* libc/sys/sysvi386/*.S: New files renamed from .s files.
* libc/sys/sysvi386/*.s: Renamed and removed.
* libc/sys/sysvnecv70/*.S: New files renamed from .s files.
* libc/sys/sysvnecv70/*.s: Renamed and removed.
* libc/*Makefile.in: Regenerated as appropriate.
2006-05-01 22:01:07 +00:00
Jeff Johnston
7ad962240c
2006-04-13 Ralf Corsepius <ralf.corsepius@rtems.org>
...
* acinclude.m4: New _NEWLIB_VERSION.
* acinclude.m4(NEWLIB_CONFIGURE): AC_REQUIRE(_NEWLIB_VERSION).
Use AC_CANONICAL_HOST instead of AC_CANONICAL_SYSTEM.
Use new form of AC_INIT_AUTOMAKE.
* configure.in: AC_PREREQ(2.59).
Use autoconf-2.5.x version of AC_INIT.
Use AC_CONFIG_FILES and autoconf-2.5x AC_OUTPUT instead of
autoconf-2.13's AC_OUTPUT.
* libm/configure.in: Ditto.
* libm/machine/configure.in: Ditto.
* libm/machine/i386/configure.in: Ditto.
* libc/configure.in: Ditto.
* libc/machine/a29k/configure.in: Ditto.
* libc/machine/arm/configure.in: Ditto.
* libc/machine/configure.in: Ditto.
* libc/machine/mn10300/configure.in: Ditto.
* libc/machine/powerpc/configure.in: Ditto.
* libc/machine/z8k/configure.in: Ditto.
* libc/machine/h8300/configure.in: Ditto.
* libc/machine/mips/configure.in: Ditto.
* libc/machine/crx/configure.in: Ditto.
* libc/machine/m68hc11/configure.in: Ditto.
* libc/machine/h8500/configure.in: Ditto.
* libc/machine/xscale/configure.in: Ditto.
* libc/machine/d10v/configure.in: Ditto.
* libc/machine/fr30/configure.in: Ditto.
* libc/machine/sh/configure.in: Ditto.
* libc/machine/tic80/configure.in: Ditto.
* libc/machine/m32r/configure.in: Ditto.
* libc/machine/xstormy16/configure.in: Ditto.
* libc/machine/i386/configure.in: Ditto.
* libc/machine/d30v/configure.in: Ditto.
* libc/machine/mn10200/configure.in: Ditto.
* libc/machine/frv/configure.in: Ditto.
* libc/machine/mt/configure.in: Ditto.
* libc/machine/i960/configure.in: Ditto.
* libc/machine/v850/configure.in: Ditto.
* libc/machine/necv70/configure.in: Ditto.
* libc/machine/tic4x/configure.in: Ditto.
* libc/machine/cris/configure.in: Ditto.
* libc/machine/m68k/configure.in: Ditto.
* libc/machine/m32c/configure.in: Ditto.
* libc/machine/hppa/configure.in: Ditto.
* libc/machine/w65/configure.in: Ditto.
* libc/machine/iq2000/configure.in: Ditto.
* libc/machine/sparc/configure.in: Ditto.
* libc/machine/m88k/configure.in: Ditto.
* libc/sys/linux/configure.in: Ditto.
* libc/sys/linux/machine/configure.in: Ditto.
* libc/sys/linux/machine/i386/configure.in: Ditto.
* libc/sys/linux/linuxthreads/configure.in: Ditto.
* libc/sys/linux/linuxthreads/machine/configure.in: Ditto.
* libc/sys/linux/linuxthreads/machine/i386/configure.in: Ditto.
* libc/sys/arm/configure.in: Ditto.
* libc/sys/configure.in: Ditto.
* libc/sys/decstation/configure.in: Ditto.
* libc/sys/a29khif/configure.in: Ditto.
* libc/sys/sysnecv850/configure.in: Ditto.
* libc/sys/d10v/configure.in: Ditto.
* libc/sys/netware/configure.in: Ditto.
* libc/sys/mmixware/configure.in: Ditto.
* libc/sys/h8500hms/configure.in: Ditto.
* libc/sys/sh/configure.in: Ditto.
* libc/sys/tic80/configure.in: Ditto.
* libc/sys/rdos/configure.in: Ditto.
* libc/sys/sysmec/configure.in: Ditto.
* libc/sys/sysvi386/configure.in: Ditto.
* libc/sys/h8300hms/configure.in: Ditto.
* libc/sys/sparc64/configure.in: Ditto.
* libc/sys/arc/configure.in: Ditto.
* libc/sys/sysnec810/configure.in: Ditto.
* libc/sys/m88kbug/configure.in: Ditto.
* libc/sys/sysvnecv70/configure.in: Ditto.
* libc/sys/z8ksim/configure.in: Ditto.
* libc/sys/rtems/configure.in: Ditto.
* libc/sys/w65/configure.in: Ditto.
* libc/sys/sun4/configure.in: Ditto.
* doc/configure.in: Ditto.
* iconvdata/configure.in: Ditto.
* configure.in: Use AC_CONFIG_HEADER instead of AM_CONFIG_HEADER.
2006-04-13 19:56:32 +00:00
Jeff Johnston
34e666798a
2006-04-11 Jeff Johnston <jjohnstn@redhat.com>
...
* acinclude.m4: Properly add square brackets for
AC_DEFUN macros. Rewrite LIB_AC_PROG_CC to remove
macros no longer available. Add LIB_AM_PROG_AS to
remove prereq of AC_PROG_CC. Add LIB_AC_PROG_CC_GNU
macro. Substitute lpfx (library object prefix).
* configure.host: Set lpfx depending on whether
libtool is used or not.
* configure.in: Individually specify libc and libm
to AC_CONFIG_SUBDIRS. Add square bracket quoting as
necessary.
* Makefile.am: Use $(lpfx) to get object names for
math-library functions that should also be in libc.
* libc/machine/configure.in: Use case statement to determine
AC_CONFIG_SUBDIRS statement.
* libc/sys/linux/linuxthreads/machine/configure.in: Ditto.
* libc/sys/linux/machine/configure.in: Ditto.
* libc/sys/configure.in: Ditto.
* libm/machine/configure.in: Ditto.
* libc/sys/linux/configure.in: Fix up AC_CONFIG_SUBDIRS.
* libm/configure.in: Add AM_CONDITIONAL statement
for HAVE_LIBM_MACHINE_DIR.
* libc/machine/a29k/Makefile.am: Modified to work with
latest automake. Change includes setting AM_CCASFLAGS
so building .S files will properly pick up flags used
to build C files.
* libc/machine/arm/Makefile.am: Ditto.
* libc/machine/crx/Makefile.am: Ditto.
* libc/machine/d10v/Makefile.am: Ditto.
* libc/machine/d30v/Makefile.am: Ditto.
* libc/machine/fr30/Makefile.am: Ditto.
* libc/machine/frv/Makefile.am: Ditto.
* libc/machine/h8300/Makefile.am: Ditto.
* libc/machine/h8500/Makefile.am: Ditto.
* libc/machine/hppa/Makefile.am: Ditto.
* libc/machine/i386/Makefile.am: Ditto.
* libc/machine/iq2000/Makefile.am: Ditto.
* libc/machine/m32c/Makefile.am: Ditto.
* libc/machine/m32r/Makefile.am: Ditto.
* libc/machine/m68hc11/Makefile.am: Ditto.
* libc/machine/m68k/Makefile.am: Ditto.
* libc/machine/m88k/Makefile.am: Ditto.
* libc/machine/mips/Makefile.am: Ditto.
* libc/machine/mn10200/Makefile.am: Ditto.
* libc/machine/mn10300/Makefile.am: Ditto.
* libc/machine/mt/Makefile.am: Ditto.
* libc/machine/necv70/Makefile.am: Ditto.
* libc/machine/powerpc/Makefile.am: Ditto.
* libc/machine/sh/Makefile.am: Ditto.
* libc/machine/sparc/Makefile.am: Ditto.
* libc/machine/tic4x/Makefile.am: Ditto.
* libc/machine/tic80/Makefile.am: Ditto.
* libc/machine/v850/Makefile.am: Ditto.
* libc/machine/w65/Makefile.am: Ditto.
* libc/machine/xscale/Makefile.am: Ditto.
* libc/machine/xstormy16/Makefile.am: Ditto.
* libc/machine/z8k/Makefile.am: Ditto.
* libc/sys/a29khif/Makefile.am: Ditto.
* libc/sys/arc/Makefile.am: Ditto.
* libc/sys/arm/Makefile.am: Ditto.
* libc/sys/d10v/Makefile.am: Ditto.
* libc/sys/decstation/Makefile.am: Ditto.
* libc/sys/h8300hms/Makefile.am: Ditto.
* libc/sys/h8500hms/Makefile.am: Ditto.
* libc/sys/linux/linuxthreads/machine/i386/Makefile.am: Ditto.
* libc/sys/linux/machine/i386/Makefile.am: Ditto.
* libc/sys/m88kbug/Makefile.am: Ditto.
* libc/sys/mmixware/Makefile.am: Ditto.
* libc/sys/netware/Makefile.am: Ditto.
* libc/sys/rdos/Makefile.am: Ditto.
* libc/sys/rtems/Makefile.am: Ditto.
* libc/sys/sh/Makefile.am: Ditto.
* libc/sys/sparc64/Makefile.am: Ditto.
* libc/sys/sysmec/Makefile.am: Ditto.
* libc/sys/sysnec810/Makefile.am: Ditto.
* libc/sys/sysnecv850/Makefile.am: Ditto.
* libc/sys/sysvi386/Makefile.am: Ditto.
* libc/sys/sysvnecv70/Makefile.am: Ditto.
* libc/sys/tic80/Makefile.am: Ditto.
* libc/sys/w65/Makefile.am: Ditto.
* libc/sys/z8ksim/Makefile.am: Ditto.
* libm/machine/i386/Makefile.am: Ditto.
* libc/sys/arm/Makefile.am: Ditto plus add EXTRA sources including
trap.S so that automake will generate a .S.o suffix rule.
* libc/argz/Makefile.am: Modified to work with
latest automake. Change includes adding lib_a_CFLAGS
so automake doesn't complain about libtool and non-libtool
libraries sharing objects.
* libc/ctype/Makefile.am: Ditto.
* libc/errno/Makefile.am: Ditto.
* libc/iconv/ccs/Makefile.am: Ditto.
* libc/iconv/ces/Makefile.am: Ditto.
* libc/iconv/lib/Makefile.am: Ditto.
* libc/locale/Makefile.am: Ditto.
* libc/misc/Makefile.am: Ditto.
* libc/posix/Makefile.am: Ditto.
* libc/reent/Makefile.am: Ditto.
* libc/search/Makefile.am: Ditto.
* libc/signal/Makefile.am: Ditto.
* libc/stdio/Makefile.am: Ditto.
* libc/stdio64/Makefile.am: Ditto.
* libc/stdlib/Makefile.am: Ditto.
* libc/string/Makefile.am: Ditto.
* libc/sys/linux/Makefile.am: Ditto.
* libc/sys/linux/argp/Makefile.am: Ditto.
* libc/sys/linux/cmath/Makefile.am: Ditto.
* libc/sys/linux/dl/Makefile.am: Ditto.
* libc/sys/linux/iconv/Makefile.am: Ditto.
* libc/sys/linux/intl/Makefile.am: Ditto.
* libc/sys/linux/linuxthreads/Makefile.am: Ditto.
* libc/sys/linux/net/Makefile.am: Ditto.
* libc/sys/linux/stdlib/Makefile.am: Ditto.
* libc/syscalls/Makefile.am: Ditto.
* libc/time/Makefile.am: Ditto.
* libc/unix/Makefile.am: Ditto.
* libm/Makefile.am: Ditto.
* libm/common/Makefile.am: Ditto.
* libm/math/Makefile.am: Ditto.
* libm/mathfp/Makefile.am: Ditto.
* Regenerate all aclocal.m4, Makefile.in, and configure files.
2006-04-11 19:02:16 +00:00
Jeff Johnston
6507c09718
2006-03-29 Eric Blake <ebb9@byu.net>
...
* libc/stdio/freopen.c (_freopen_r) [__SCLE]: Fix typo.
* libc/stdio64/freopen64.c (_freopen64_r) [__SCLE]: Likewise.
2006-03-29 21:57:21 +00:00
Jeff Johnston
490cfb83e9
2006-03-15 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/wsetup.c (__swsetup): Don't make a buffer
for a string I/O file that isn't using the asprintf family.
2006-03-15 22:38:59 +00:00
Jeff Johnston
ce10f1789e
2006-03-07 Eric Blake <ebb9@byu.net>
...
* libc/stdio/freopen.c (_freopen_r) [HAVE_FCNTL]: For NULL
filename, allow read-only or write-only FILE atop O_RDWR file
descriptor.
* libc/stdio64/freopen64.c (_freopen64_r) [HAVE_FCNTL]: Likewise.
2006-03-07 22:20:18 +00:00
Jeff Johnston
99db626d21
2006-02-20 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/fflush.c (fflush): For an fflush on a read-only
stream, turn off fseek/rewind optimization as per POSIX/SUSv3.
* libc/stdio/fseek.c (_fseek_r): After a successful unoptimized
seek, turn off the __SNPT no-optimization flag.
2006-02-20 23:24:00 +00:00
Jeff Johnston
dea958bc06
2006-01-10 Eric Blake <ebb9@byu.net>
...
* libc/stdio/freopen.c (_freopen_r): Fix use of oflags.
* libc/stdio64/freopen64.c (_freopen64_r): Likewise.
2006-01-10 17:09:43 +00:00
Jeff Johnston
64ae8ab5f0
2006-01-09 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/freopen.c: Switch to use isatty instead of _isatty.
* libc/stdio64/freopen64.c: Ditto.
2006-01-09 20:01:09 +00:00
Jeff Johnston
0da7297ef1
2006-01-09 Eric Blake <ebb9@byu.net>
...
* libc/stdio/freopen.c (_freopen_r): Accept NULL filename.
* libc/stdio64/freopen64.c (_freopen64_r): Likewise.
2006-01-09 17:51:01 +00:00
Jeff Johnston
884c0ff016
2005-10-28 Bob Wilson <bob.wilson@acm.org>
...
* libc/stdio/siprintf.c: Wrap long lines in ANSI_SYNOPSIS.
* libc/stdio/siscanf.c: Likewise.
* libc/stdio/sprintf.c: Likewise.
* libc/stdio/sscanf.c: Likewise.
* libc/stdio/vfprintf.c: Likewise.
* libc/stdio/vfscanf.c: Likewise.
* libc/stdio/viprintf.c: Likewise.
* libc/stdio/viscanf.c: Likewise.
2005-10-28 21:38:59 +00:00
Jeff Johnston
239c2bf93e
2005-10-28 Bob Wilson <bob.wilson@acm.org>
...
* libc/misc/unctrl.c: Replace FUNCTION description.
* libc/signal/signal.c: Remove documentation for raise and _raise_r.
* libc/stdio/getdelim.c: Fix spelling errors.
* libc/stdio/getw.c: Put RETURNS on a separate line. Fix punctuation.
* libc/stdio/putw.c: Likewise.
* libc/stdlib/a64l.c: Fix formatting, spelling and punctuation in
documentation.
* libc/stdlib/assert.c: Do not capitalize FUNCTION description.
* libc/stdlib/efgcvt.c: Add spaces to FUNCTION description.
* libc/stdlib/envlock.c: Use em-dash in FUNCTION description.
* libc/stdlib/mlock.c: Likewise.
* libc/stdlib/mstats.c: Likewise.
* libc/time/tzlock.c: Likewise.
* libc/stdlib/rand.c: Use "multi-threaded" and "thread-safe" in NOTES.
* libc/stdlib/rand48.c: Remove extra space in FUNCTION description
and hyphenate "pseudo-random".
* libc/string/bcmp.c: Remove extra blank lines in documentation.
* libc/string/strncat.c: Likewise.
* libc/string/memchr.c: Remove extra ">" character in documentation.
* libc/string/strcspn.c: Use "characters" instead of "chars".
* libc/string/strpbrk.c: Likewise.
* libc/string/strerror_r.c: Capitalize "GNU".
* libc/string/strnlen.c: Likewise.
* libc/string/strtok.c: Fix formatting, spelling and punctuation in
documentation. Use "multi-threaded" and "thread-safe" in NOTES.
* libc/string/wcscat.c: Split PORTABILITY into two paragraphs.
* libc/string/wcschr.c: Likewise.
* libc/string/wcscmp.c: Likewise.
* libc/string/wcscpy.c: Likewise.
* libc/string/wcscspn.c: Likewise.
* libc/string/wcslen.c: Likewise.
* libc/string/wcsncat.c: Likewise.
* libc/string/wcsncmp.c: Likewise.
* libc/string/wcsncpy.c: Likewise.
* libc/string/wcsnlen.c: Likewise.
* libc/string/wcspbrk.c: Likewise.
* libc/string/wcsrchr.c: Likewise.
* libc/string/wcsspn.c: Likewise.
* libc/string/wmemchr.c: Likewise.
* libc/string/wmemcmp.c: Likewise.
* libc/string/wmemcpy.c: Likewise.
* libc/string/wmemset.c: Likewise.
* libc/string/wmemmove.c: Likewise. Also fix FUNCTION description.
* libc/string/wcswidth.c: Formatting and punctuation in documentation.
* libc/string/wcwidth.c: Likewise.
* libm/common/s_modf.c: Remove extra period from documentation.
* libm/math/s_isnan.c: Fix formatting, grammar and punctuation in
documentation.
* libm/mathfp/s_isnan.c: Likewise.
* libm/math/s_ldexp.c: Fix punctuation.
* libm/mathfp/s_ldexp.c: Likewise.
* libm/math/w_log.c: Likewise.
* libm/mathfp/s_logarithm.c: Likewise.
* libm/math/w_j0.c: Add spaces to FUNCTION description.
* libm/mathfp/w_jn.c: Likewise.
2005-10-28 21:21:08 +00:00
Jeff Johnston
1012585f1f
2005-10-14 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/vfprintf.c (_VFPRINTF_R): Fix up "inf" and
"nan" processing for systems that have long double support.
2005-10-14 21:03:13 +00:00
Jeff Johnston
339195bf12
2005-10-11 Shaun Jackman <sjackman@gmail.com>
...
* libc/include/stdio.h (dprintf): New declaration.
(vdprintf): Ditto.
* libc/stdio/Makefile.am (GENERAL_SOURCES): Add dprintf.c
and vdprintf.c.
* libc/stdio/Makefile.in: Regenerate.
* libc/stdio/dprintf.c: New file.
* libc/stdio/vdprintf.c: New file.
* libc/stdio/stdio.tex (dprintf): New entry.
2005-10-11 23:59:32 +00:00
Jeff Johnston
da71e51811
2005-10-11 David Weatherford <weath@tensilica.com>
...
* libc/stdio/vfprintf.c (_VFPRINTF_R): Recognize 'F' format.
Print "inf" and "nan" in lowercase for e/f/g formats and in
uppercase for E/F/G formats.
2005-10-11 22:51:37 +00:00
Jeff Johnston
68cdbb18da
2005-06-16 Christopher Faylor <cgf@timesys.com>
...
* libc/stdio/vfprintf.c (cvt): Don't rely on pointer aliasing to
determine characteristics of long double. Use a union instead.
* ldtoa.c (_ldtoa_r): Ditto.
(_ldcheck): Ditto.
(_strtold): Ditto.
(union uconv): New union.
2005-06-16 19:14:01 +00:00
Jeff Johnston
5456408b84
2005-04-28 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/vfscanf.c (__svfscanf_r): Fix code thinko
when checking for multiple flags.
2005-04-28 18:26:08 +00:00
Jeff Johnston
85da703991
2005-04-05 Dave Korn <dave.korn@artimi.com>
...
* libc/stdio/vfscanf.c (__svfscanf_r): If an error occurs processing
something that looks like a "NaN", put back the characters processed.
2005-04-05 18:38:09 +00:00
Jeff Johnston
d4eb892018
2005-03-21 Nicholas Wourms <nwourms@netscape.net>
...
* libc/stdio/vfprintf.c: Move newlib.h before _WANT_IO_POS_ARGS test,
since _WANT_IO_POS_ARGS is now defined in there. Remove duplicate
reent.h include.
2005-03-21 22:34:35 +00:00
Jeff Johnston
1159e0fd94
2005-02-07 Antony King <antony.king@st.com>
...
* libc/stdio/clearerr.c (clearerr): Ensure CHECK_INIT() is
called before _flockfile to prevent lock object use before
initialisation. _REENT_SMALL_CHECK_INIT() and CHECK_INIT()
take a struct _reent * instead of a FILE *.
* libc/stdio/fclose.c (_fclose_r): Ditto.
* libc/stdio/feof.c (feof): Ditto.
* libc/stdio/ferror.c (ferror): Ditto.
* libc/stdio/fflush.c (fflush): Ditto.
* libc/stdio/fgetc.c (fgetc): Ditto.
* libc/stdio/fgets.c (fgets): Ditto.
* libc/stdio/fileno.c (fileno): Ditto.
* libc/stdio/fputc.c (fputc): Ditto.
* libc/stdio/fputs.c (fputs): Ditto.
* libc/stdio/fread.c (fread): Ditto.
* libc/stdio/freopen.c (_freopen_r): Ditto.
* libc/stdio/fseek.c (_fseek_r): Ditto.
* libc/stdio/ftell.c (_ftell_r): Ditto.
* libc/stdio/fwrite.c (fwrite): Ditto.
* libc/stdio/getc.c (getc): Ditto.
* libc/stdio/getdelim.c (__getdelim): Ditto.
* libc/stdio/putc.c (putc): Ditto.
* libc/stdio/setvbuf.c (setvbuf): Ditto.
* libc/stdio/ungetc.c (_ungetc_r): Ditto.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Ditto.
* libc/stdio64/freopen64.c (_freopen64_r): Ditto.
* libc/stdio64/fseeko64.c (_fseeko64_r): Ditto.
* libc/stdio64/ftello64.c (_ftello64_r): Ditto.
* libc/stdio/local.h (CHECK_INIT): Argument is now a struct
_reent * instead of a FILE * and so replace incorrect use of
_REENT with argument.
* libc/sys/arm/syscalls.c (CHECK_INIT): Ditto.
* libc/stdio/getchar.c (getchar): _REENT_SMALL_CHECK_INIT() and
CHECK_INIT() take a struct _reent * instead of a FILE *.
* libc/stdio/iprintf.c (iprintf, _iprintf_r): Ditto.
* libc/stdio/iscanf.c (iscanf, _iscanf_r): Ditto.
* libc/stdio/perror.c (perror): Ditto.
* libc/stdio/printf.c (printf, _printf_r): Ditto.
* libc/stdio/putchar.c (putchar): Ditto.
* libc/stdio/puts.c (puts): Ditto.
* libc/stdio/refill.c (__srefill): Ditto.
* libc/stdio/scanf.c (scanf, _scanf_r): Ditto.
* libc/stdio/vfscanf.c (VFSCANF, _VFSCANF_R): Ditto.
* libc/stdio/viprintf.c (viprintf, _viprintf_r): Ditto.
* libc/stdio/viscanf.c (viscanf, _viscanf_r): Ditto.
* libc/stdio/vprintf.c (vprintf, _vprintf_r): Ditto.
* libc/stdio/vscanf.c (vscanf, _vscanf_r): Ditto.
* libc/stdio/wbuf.c (__swbuf): Ditto.
* libc/stdio/wsetup.c (__swsetup): Ditto.
* libc/stdlib/mallocr.c (malloc_stats): Ditto.
* libc/stdlib/mstats.c (_mstats_r): Ditto.
* libc/include/sys/reent.h (_REENT_SMALL_CHECK_INIT): Ditto.
* libc/machine/powerpc/vfscanf.c (vfscanf): Ditto.
* libc/stdio/fgetpos.c (_fgetpos_r): Removed unnecessary calls
to _flockfile and _funlockfile; rely on locking in _ftell_r.
* libc/stdio64/fgetpos64.c (_fgetpos64_r): Ditto (_ftello64_r).
* libc/machine/powerpc/vfprintf.c (__sbprintf): Removed unnecessary
initialision of _data field in FILE structure.
* libc/machine/powerpc/vfprintf.c (VFPRINTF): Added CHECK_INIT() call.
2005-02-08 01:33:19 +00:00
Jeff Johnston
3d91567088
2005-02-07 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/findfp.c (__sinit): Protect with new lock.
(__sinit_lock): New lock.
(__sinit_lock_acquire, __sinit_lock_release): New functions.
* libc/stdio/local.h: Add reference to new __sinit locking
functions.
2005-02-08 01:05:50 +00:00
Jeff Johnston
8fa6cb9a5d
2005-01-06 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdlib/strtod.c (_strtod_r): Add NaN support.
* (strtof): Ditto.
* libc/stdio/vfscanf.c (__svfscanf_r): Ditto.
* Makefile.am (MATHOBJS_IN_LIBC): Add s_nan and sf_nan
functions for use by strtod and strtof.
* Makefile.in: Regenerated.
2005-01-06 23:31:56 +00:00
Jeff Johnston
034a3909ae
2005-01-06 Hans-Peter Nilsson <hp@axis.com>
...
* libc/stdio/ftell.c (ftell_r): Add parenthesis for __SWR
bit-test in combination with NULL test.
2005-01-06 20:10:56 +00:00
Jeff Johnston
82673116e1
2004-12-13 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/fread.c (fread): For unbuffered I/O, attempt
a low-level read if we don't get the full amount of bytes so
EOF or error flags will be set.
2004-12-13 19:42:16 +00:00
Jeff Johnston
16ac96ee69
2004-11-24 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/Makefile.am: Fix missing vfscanf.
* libc/stdio/Makefile.in: Regenerated.
2004-11-24 22:31:05 +00:00
Jeff Johnston
3bf091476a
2004-11-23 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/stdio.h: Add new iprintf and iscanf variants. Also
do some reordering.
* libc/machine/powerpc/vfscanf.c: Remove __sccl function.
* libc/stdio/Makefile.am: Add support for new iprintf and iscanf
family functions.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio/fiprintf.c: Remove doc to siprintf.c.
* libc/stdio/iprintf.c: Ditto.
* libc/stdio/local.h (__svfiscanf_r): New prototype.
* libc/stdio/siprintf.c: Add docs for various iprintf family functions.
* libc/stdio/sniprintf.c: Move docs to siprintf.c.
* libc/stdio/stdio.tex: Add new functions.
* libc/stdio/vfscanf.c: Split out __sccl function to separate
file and add special name defines so this file can be used
to build vfiscanf.o.
* libc/stdio/asiprintf.c: New file.
* libc/stdio/fiscanf.c: Ditto.
* libc/stdio/iscanf.c: Ditto.
* libc/stdio/sccl.c: Ditto.
* libc/stdio/siscanf.c: Ditto.
* libc/stdio/vasiprintf.c: Ditto.
* libc/stdio/viprintf.c: Ditto.
* libc/stdio/viscanf.c: Ditto.
* libc/stdio/vsiprintf.c: Ditto.
* libc/stdio/vsiscanf.c: Ditto.
* libc/stdio/vsniprintf.c: Ditto.
2004-11-24 00:45:41 +00:00
Jeff Johnston
0f0fcb042a
2004-11-19 Shaun Jackman <sjackman@gmail.com>
...
* libc/include/stdio.h: Add sniprintf.
* libc/stdio/Makefile.am: Add sniprintf.c.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio/sniprintf.c: New file.
* libc/stdio/stdio.tex: Add sniprintf.
2004-11-20 01:42:35 +00:00
Christopher Faylor
1f8f7e2d54
* libc/stdio/refill.c (__srefill): Try again after EOF on Cygwin. Clear EOF
...
flag if successful.
2004-11-17 17:02:10 +00:00
Jeff Johnston
65b1964f1a
2004-10-26 Jason Tishler <jason@tishler.net>
...
* libc/stdio/fread.c (fread): Fix return value for unbuffered
fread.
2004-10-26 18:21:09 +00:00
Jeff Johnston
3ea9de7644
2004-10-04 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/vfscanf.c (__svfscanf_r): For int conversions,
count skipped zero characters as part of the nread count for %n.
* libc/machine/powerpc/vfscanf.c: Ditto.
2004-10-04 17:51:50 +00:00
Jeff Johnston
2a6e122363
2004-09-24 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/local.h: Include <stdlib.h>.
2004-09-24 16:03:46 +00:00
Corinna Vinschen
d163f2fc83
* libc/stdio/fread.c (fread): Include <malloc.h>.
2004-09-24 09:13:11 +00:00
Jeff Johnston
602de58268
2004-09-22 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/fread.c (fread): For non-space-optimized case,
add special code for unbuffered files to use user buffer and
only require one low-level system read.
2004-09-22 21:22:07 +00:00
Jeff Johnston
ed6859b8f0
2004-09-16 Antony King <antony.king@st.com>
...
* libc/include/sys/lock.h: Replaced empty {} with (0) to conform
with locking API.
* libc/include/sys/stdio.h: (_flockfile)[!_SINGLE_THREAD]: Add
check for__SSTR in _flags and if set, skip lock request.
(_funlockfile)[!SINGLE_THREAD]: Ditto.
* libc/stdio/local.h (CHECK_INIT): Added check that _REENT is
not NULL.
* libc/stdio/siprintf.c (siprintf, _siprintf_r): Added missing
initialisation of _file to -1 in local FILE.
* libc/stdio/snprintf.c (snprintf, _snprintf_r): Ditto.
* libc/stdio/sscanf.c (sscanf, _sscanf_r): Ditto.
* libc/stdio/vsnprintf.c (vsnprintf, _vsnprintf_r): Ditto.
* libc/stdio/vsscanf.c (_vsscanf_r): Ditto.
* libc/stdio/sscanf.c (sscanf, _sscanf_r): Added __SSTR flag to
_flags in local FILE to prevent locking.
* libc/stdio/vsscanf.c (_vsscanf_r): Ditto.
2004-09-16 21:30:51 +00:00
Jeff Johnston
7a0f696676
2004-09-16 Antony King <antony.king@st.com>
...
* libc/stdio/fwalk.c (_fwalk): Remove check for _GLOBAL_REENT
and only walk the reentrancy parameter.
(_fwalk_reent): Ditto.
* libc/stdlib/exit.c: Remove out of date _REENT_ONLY check.
2004-09-16 21:26:51 +00:00
Jeff Johnston
14613e5e74
2004-09-16 Antony King <antony.king@st.com>
...
* libc/ctype/ctype.tex: Added missing documentation.
* libc/stdio/stdio.tex Ditto.
* libc/stdlib/stdlib.tex Ditto.
* libc/string/strings.tex Ditto.
* libc/time/time.tex: Ditto.
* libc/stdio/setbuffer.c: Removed setlinebuf documentation.
2004-09-16 21:15:14 +00:00
Jeff Johnston
721a934c16
2004-08-16 Nathan Sidwell <nathan@codesourcery.com>
...
* libc/stdio/vfscanf.c (_NO_LONGLONG): Move out of FLOATING_POINT
#if.
2004-08-16 17:09:31 +00:00
Jeff Johnston
dbfd3394e9
2004-07-16 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/fvwrite.c (_sfvwrite): For asprintf family
calls, if realloc fails, free up buffer as it is no longer
used.
2004-07-16 15:47:15 +00:00
Jeff Johnston
d0bd3e6f56
2004-06-11 Antony King <antony.king@st.com>
...
* libc/include/sys/_types.h: Include <sys/lock.h> and change
_flock_t to be of type _LOCK_RECURSIVE_T.
* libc/include/sys/reent.h: (_REENT_INIT): Reformat.
(_REENT_INIT_PTR): Ditto. Use memset where appropriate.
(_global_impure_ptr): New declaration.
(_GLOBAL_REENT): Change to be _global_impure_ptr.
* libc/include/sys/stdio.h: Include <sys/lock.h> and
<sys/reent.h>.
(_flockfile)[!_SINGLE_THREAD]: Add code for lock call.
(_funlockfile)[!SINGLE_THREAD]: Ditto.
* libc/reent/impure.c: Set _global_impure_ptr to _impure_ptr.
* libc/stdio/fclose.c: Remove casting of fp lock to
_LOCK_RECURSIVE_T.
* libc/stdio/findfp.c: Ditto.
* libc/stdio/fopen.c: Ditto.
* libc/stdio/freopen.c: Ditto.
* libc/stdio/vfprintf.c: Ditto.
* libc/stdio64/fopen64.c: Ditto.
* libc/stdlib/envlock.c: Add default stubs that use generic
locking code.
* libc/stdlib/mlock.c: Ditto.
Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/sys/_types.h (__flock_mutex_t): New subtype.
(_flock_t): Change to be a struct containing a single member
named mutex which is of type __flock_mutex_t.
2004-06-11 20:37:10 +00:00
Jeff Johnston
8b57e664af
2004-06-02 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/vfscanf.c (__svfscanf_r): For CT_INT conversions,
reset digit flags appropriately after we have discovered "0x".
* libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto.
2004-06-02 19:22:14 +00:00
Jeff Johnston
3f611058b7
2004-05-27 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/vfprintf.c (_VFPRINTF): Move file locking
from here ...
(_VFPRINTF_R): ... to here so all I/O printf routines
are covered.
2004-05-27 14:56:54 +00:00
Jeff Johnston
227e6ef6c3
2004-05-25 Artem B. Bityuckiy <abitytsky@softminecorp.com>
...
* newlib.hin: (_WANT_IO_POS_ARGS): New define.
(_WANT_IO_LONG_LONG): Ditto.
(_WANT_IO_LONG_DOUBLE): Ditto.
* configure.in: Add new configuration options
--enable-newlib-io-long-long and --enable-newlib-io-long-double
which tie to new defines in newlib.hin.
* configure: Regenerated.
* configure.host: Add checks for new configuration options. Also
fix up check for --enable-newlib-io-pos-args so configuration
option will override any default for a given platform.
Remove defining compiler flags for the _WANT_IO* options.
* libc/stdio/vfprintf.c: Change to use new newlib.hin defines
instead of looking for old compiler flags.
* libc/stdio/vfscanf.c: Ditto.
* libc/stdio/vfieeefp.h: Ditto.
* libc/machine/powerpc/vfprintf.c: Ditto.
* libc/machine/powerpc/vfscanf.c: Ditto.
2004-05-26 00:19:14 +00:00
Jeff Johnston
5b4c8ae219
2004-05-11 Artem B. Bityuckiy <abitytsky@softminecorp.com>
...
* libc/stdio/vfprintf.c (VFPRINTF_R): Use _free_r instead
of free.
2004-05-11 20:59:20 +00:00
Jeff Johnston
186420eccf
2004-05-07 Artem B. Bityuckiy <abitytsky@softminecorp.com>
...
* libc/stdio/iprintf.c (_iprintf_r): Fix old-style argument
list for reentrant pointer. Call _vfiprintf_r.
* libc/stdio/siprintf.c (_siprintf_r): New function.
* libc/stdio/vfprintf.c (__sbprintf): Add reetrant struct
pointer argument. Change all callers. Call _VFPRINTF_R.
* libc/include/stdio.h (_siprintf_r, _vfiprintf_r): New
prototypes.
2004-05-07 21:00:41 +00:00
Jeff Johnston
1af84bb7f5
2004-05-03 Artem B. Bityuckiy <abitytsky@softminecorp.com>
...
* libc/stdio/vfprintf.c (_VFPRINTF_R): Set error flag when
multibyte functions return failure for %C, %S, %lc, and %ls
format specifiers.
2004-05-03 20:17:59 +00:00
Jeff Johnston
20b0251ab3
2004-05-03 Artem B. Bityuckiy <abitytsky@softminecorp.com>
...
* libc/include/stdio.h (_ungetc_r): New prototype.
* libc/stdio/ungetc.c (_ungetc_r): New reentrant function.
(__submore): Add reentrant struct pointer argument.
(ungetc): Change to call _ungetc_r.
2004-05-03 17:27:56 +00:00
Jeff Johnston
6194cf4a4b
2004-04-28 Artem B. Bityuckiy <abitytsky@softminecorp.com>
...
* libc/stdio/local.h (_fwalk_reent): Specify prototype of
function pointer argument.
* libc/stdio/fwalk.c (_fwalk, _fwalk_reent): Change prototypes
to specify function pointer arguments.
(__fwalk, __fwalk_reent): Ditto.
2004-04-28 18:02:38 +00:00
Jeff Johnston
f777e3a5ac
2004-04-23 Artem B. Bityuckiy <abitytsky@softminecorp.com>
...
* configure.in: Define _MB_CAPABLE if mb supported.
* configure: Regenerated.
* configure.host: Remove manual setting of MB_CAPABLE compiler
flag.
* newlib.hin: Add _MB_CAPABLE flag.
* libc/ctype/iswalpha.c, libc/ctype/iswblank.c: Include <newlib.h>
and check for _MB_CAPABLE flag instead of MB_CAPABLE.
* libc/ctype/iswcntrl.c, libc/ctype/iswprint.c: Ditto.
* libc/ctype/iswpunct.c, libc/ctype/iswspace.c: Ditto.
* libc/ctype/jp2uc.c: Ditto.
* libc/ctype/towlower.c, libc/ctype/towupper.c: Ditto.
* libc/locale/locale.c: Ditto
* libc/machine/powerpc/vfscanf.c: Ditto
* libc/stdio/vfprintf.c, libc/stdio/vfscanf.c: Ditto
* libc/stdlib/mblen.c: Ditto
* libc/stdlib/mblen_r.c, libc/stdlib/mbrlen.c: Ditto
* libc/stdlib/mbrtowc.c, libc/stdlib/mbsrtowcs.c: Ditto
* libc/stdlib/mbstowcs.c, libc/stdlib/mbtowc.c: Ditto
* libc/stdlib/mbtowc_r.c, libc/stdlib/wcrtomb.c: Ditto
* libc/stdlib/wcsrtombs.c, libc/stdlib/wcstombs.c: Ditto
* libc/stdlib/wctomb.c, libc/sys/linux/intl/dcigettext.c: Ditto
* libc/sys/linux/intl/explodename.c: Ditto
* libc/sys/linux/intl/finddomain.c: Ditto
* libc/sys/linux/intl/l10nflist.c: Ditto
* libc/sys/linux/intl/loadmsgcat.c: Ditto
* libc/sys/linux/intl/localealias.c: Ditto
2004-04-23 21:44:22 +00:00
Jeff Johnston
05b315770a
2004-04-23 Artem B. Bityuckiy <abitytsky@softminecorp.com>
...
* libc/stdio/asprintf.c libc/stdio/clearerr.c,
libc/stdio/fclose.c libc/stdio/fcloseall.c libc/stdio/fdopen.c,
libc/stdio/feof.c libc/stdio/ferror.c libc/stdio/fflush.c,
libc/stdio/fgetc.c libc/stdio/fgetpos.c libc/stdio/fgets.c,
libc/stdio/fileno.c libc/stdio/findfp.c libc/stdio/fiprintf.c,
libc/stdio/flags.c libc/stdio/fopen.c libc/stdio/fprintf.c,
libc/stdio/fputc.c libc/stdio/fputs.c libc/stdio/fread.c,
libc/stdio/freopen.c libc/stdio/fscanf.c libc/stdio/fseek.c,
libc/stdio/fseeko.c libc/stdio/fsetpos.c libc/stdio/ftell.c,
libc/stdio/ftello.c libc/stdio/fvwrite.c libc/stdio/fwalk.c,
libc/stdio/fwrite.c libc/stdio/getc.c libc/stdio/getc_u.c,
libc/stdio/getchar.c libc/stdio/getchar_u.c,
libc/stdio/getdelim.c libc/stdio/getline.c libc/stdio/gets.c,
libc/stdio/getw.c libc/stdio/iprintf.c libc/stdio/local.h,
libc/stdio/makebuf.c libc/stdio/mktemp.c libc/stdio/perror.c,
libc/stdio/printf.c libc/stdio/putc.c libc/stdio/putc_u.c,
libc/stdio/putchar.c libc/stdio/putchar_u.c libc/stdio/puts.c,
libc/stdio/putw.c libc/stdio/refill.c libc/stdio/remove.c,
libc/stdio/rename.c libc/stdio/rewind.c libc/stdio/rget.c,
libc/stdio/scanf.c libc/stdio/setbuf.c libc/stdio/setbuffer.c,
libc/stdio/setlinebuf.c libc/stdio/setvbuf.c,
libc/stdio/siprintf.c libc/stdio/snprintf.c,
libc/stdio/sprintf.c libc/stdio/sscanf.c libc/stdio/stdio.c,
libc/stdio/tmpfile.c libc/stdio/tmpnam.c libc/stdio/ungetc.c,
libc/stdio/vasprintf.c libc/stdio/vfieeefp.h,
libc/stdio/vfprintf.c libc/stdio/vfscanf.c,
libc/stdio/vprintf.c libc/stdio/vscanf.c,
libc/stdio/vsnprintf.c libc/stdio/vsprintf.c,
libc/stdio/vsscanf.c libc/stdio/wbuf.c,
libc/stdio/wsetup.c: Perform minor formatting changes. Move
copyright notices to top of file, ensure that <_ansi.h> is
included, be consistent with open parentheses, use _DEFUN macro,
include "local.h" where needed, and remove various compiler
warnings.
2004-04-23 20:01:55 +00:00
Jeff Johnston
04e8fca153
2004-04-21 J"orn Rennecke <joern.rennecke@superh.com>
...
* libc/stdio/vfscanf.c (NNZDIGITS): New define.
(__svfscanf_r): In integer conversions, leave out leading zeroes
which are not part of a base prefix.
Keep track of width truncation to fit into buf, not counting left-out
zeroes against width till the truncation has been compensated for.
2004-04-22 21:58:15 +00:00
Jeff Johnston
47dcaf565d
2004-04-08 Artem B. Bityuckiy <abitytsky@softminecorp.com>
...
* libc/stdio/fclose.c (_fclose_r): New function.
* libc/stdio/freopen.c (_freopen_r): Call _fclose_r.
* libc/stdio/fcloseall.c (_fcloseall_r): Call _fwalk_reent.
* libc/stdio64/freopen64.c (_freopen64_r): Use _fclose_r.
* libc/include/stdio.h (_fclose_r): New prototype.
* libc/stdio/fopen.c: Fix typo in comment.
2004-04-08 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/fwalk.c (_fwalk_reent): New version of _fwalk
to handle _r reentrant functions.
2004-04-08 22:26:50 +00:00
Jeff Johnston
38f4f02370
2004-04-01 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/vfscanf.c (__svfscanf_r): Add locking/unlocking
of file.
2004-04-02 00:59:17 +00:00
Jeff Johnston
cacc0d4421
2003-03-30 Thomas Pfaff <tpfaff@gmx.net>
...
* libc/stdio/findfp.c (__fp_lock_all): Add call to
__sfp_lock_acquire.
(__fp_unlock_all): Add call to __sfp_lock_release.
2004-03-30 21:11:53 +00:00
Jeff Johnston
10dcf7e718
2004-03-25 Thomas Pfaff <tpfaff@gmx.net>
...
* libc/stdio/fclose.c (fclose): Protect file pointer list when
releasing a file.
* libc/stdio/fcloseall.c (_fcloseall_r): Close all files via
fwalk.
* libc/stdio/fdopen.c (_fdopen_r): Add calls to
_flockfile/_funlockfile.
* libc/stdio/findfp.c: Move __sfp_lock. Change __sfp_lock type
to recursive.
Change __lock_acquire/__lock_release calls for __sfp_lock to
__sfp_lock_acquire/__sfp_lock_release throughout.
(std): Make sure that file lock is only initialized once.
(__sfp): Move _file initialization. Initialize file lock.
(__sfp_lock_acquire): New function.
(__sfp_lock_release): Ditto.
(__fp_lock_all): Remove __sfp_lock_acquire call.
(__fp_unlock_all): Remove __sfp_lock_release call.
* libc/stdio/fopen.c (_fopen_r): Protect file pointer list.
Add calls to _flockfile/_funlockfile. Remove
__lock_init_recursive call.
* libc/stdio/freopen.c (_freopen_r): Protect file pointer list.
* libc/stdio/fwalk.c (__fwalk): New static function.
(_fwalk): Protect file pointer list. Use __fwalk to walk through
file pointers.
* libc/stdio/local.h: Add defines for
__sfp_lock_acquire/__sfp_lock_release when
single threaded. Add function prototypes otherwise.
* libc/stdio64/fdopen64.c (_fdopen64_r): Add calls to
_flockfile/_funlockfile.
* libc/stdio/fopen64.c (_fopen64_r): Protect file pointer list.
Add calls to _flockfile/_funlockfile. Remove
__lock_init_recursive call.
* libc/stdio/freopen64.c (_freopen64_r): Protect file pointer
list.
2004-03-25 22:29:18 +00:00
Jeff Johnston
41c3da6ae1
2004-03-09 Thomas Pfaff <tpfaff@gmx.net>
...
* libc/stdio/findfp.c (__sfp): Rename lock to __sfp_lock.
Change __sfp_lock to static global.
(__fp_lock): New static function.
(__fp_unlock): Ditto.
(__fp_lock_all): New function.
(__fp_unlock_all): Ditto.
2004-03-09 21:27:37 +00:00
Jeff Johnston
c730e0e7ca
2004-01-30 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/fwalk.c (_fwalk.c): Don't traverse the
file chain on the passed in reentrancy struct if it
is _GLOBAL_REENT.
2004-01-31 00:39:07 +00:00
Jeff Johnston
ff41498a19
2004-01-30 Thomas Pfaff <tpfaff@gmx.net>
...
Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/fwalk.c (_fwalk): Traverse the given reentrancy
struct for std streams and traverse the global reeentrancy
struct for all other streams.
2004-01-30 20:32:04 +00:00
Jeff Johnston
01e0a77749
2004-01-27 Artem B. Bityuckiy <abitytsky@softminecorp.com>
...
* configure.in: Add support to generate iconv converter flags
for newlib.h
* newlib.hin: Add iconv converter flags.
* configure: Regenerated.
* libc/Makefile.in: Ditto.
* libc/configure.in: Moved iconv converter parsing logic to
top level newlib configure.in.
* libc/configure: Regenerated.
* libc/iconv/Makefile.in: Ditto.
* libc/iconv/README.TODO
* libc/iconv/charset.aliases: Remove wrong BE aliases for
UCS2/UCS4/UTF8.
* libc/iconv/ccs/Makefile.am: Remove C flag setting now that
newlib.h can be used.
* libc/iconv/ces/Makefile.am: Ditto.
* libc/iconv/lib/Makefile.am: Ditto.
* libc/iconv/ccs/Makefile.in: Regenerated.
* libc/iconv/ces/Makefile.in: Ditto.
* libc/iconv/lib/Makefile.in: Ditto.
* libc/iconv/ccs/README.CCS.SOURCES: Updated.
* libc/iconv/ccs/iconv_mktbl: Don't write junk strings to binaries.
* libc/iconv/ccs/big5.c: Switch to use new underscored flags
defined in newlib.h.
* libc/iconv/ccs/cns11643_plane1.c: Ditto.
* libc/iconv/ccs/cns11643_plane14.c: Ditto.
* libc/iconv/ccs/cns11643_plane2.c: Ditto.
* libc/iconv/ccs/cp775.c: Ditto.
* libc/iconv/ccs/cp850.c: Ditto.
* libc/iconv/ccs/cp852.c: Ditto.
* libc/iconv/ccs/cp855.c: Ditto.
* libc/iconv/ccs/cp866.c: Ditto.
* libc/iconv/ccs/gb_2312_80.c: Ditto.
* libc/iconv/ccs/iso_8859_1.c: Ditto.
* libc/iconv/ccs/iso_8859_15.c: Ditto.
* libc/iconv/ccs/iso_8859_2.c: Ditto.
* libc/iconv/ccs/iso_8859_4.c: Ditto.
* libc/iconv/ccs/iso_8859_5.c: Ditto.
* libc/iconv/ccs/jis_x0201.c: Ditto.
* libc/iconv/ccs/jis_x0208_1983.c: Ditto.
* libc/iconv/ccs/jis_x0212_1990.c: Ditto.
* libc/iconv/ccs/koi8_r.c: Ditto.
* libc/iconv/ccs/koi8_u.c: Ditto.
* libc/iconv/ccs/ksx1001.c: Ditto.
* libc/iconv/ccs/shift_jis.c: Ditto.
* libc/iconv/ccs/us_ascii.c: Ditto.
* libc/iconv/ccs/binary/big5.cct: Newly generated.
* libc/iconv/ccs/binary/cns11643_plane1.cct: Ditto.
* libc/iconv/ccs/binary/cns11643_plane14.cct: Ditto.
* libc/iconv/ccs/binary/cns11643_plane2.cct: Ditto.
* libc/iconv/ccs/binary/cp775.cct: Ditto.
* libc/iconv/ccs/binary/cp850.cct: Ditto.
* libc/iconv/ccs/binary/cp852.cct: Ditto.
* libc/iconv/ccs/binary/cp855.cct: Ditto.
* libc/iconv/ccs/binary/cp866.cct: Ditto.
* libc/iconv/ccs/binary/gb_2312_80.cct: Ditto.
* libc/iconv/ccs/binary/iso_8859_1.cct: Ditto.
* libc/iconv/ccs/binary/iso_8859_15.cct: Ditto.
* libc/iconv/ccs/binary/iso_8859_2.cct: Ditto.
* libc/iconv/ccs/binary/iso_8859_4.cct: Ditto.
* libc/iconv/ccs/binary/iso_8859_5.cct: Ditto.
* libc/iconv/ccs/binary/jis_x0201.cct: Ditto.
* libc/iconv/ccs/binary/jis_x0208_1983.cct: Ditto.
* libc/iconv/ccs/binary/jis_x0212_1990.cct: Ditto.
* libc/iconv/ccs/binary/koi8_r.cct: Ditto.
* libc/iconv/ccs/binary/koi8_u.cct: Ditto.
* libc/iconv/ccs/binary/ksx1001.cct: Ditto.
* libc/iconv/ccs/binary/shift_jis.cct: Ditto.
* libc/iconv/ccs/binary/us_ascii.cct: Ditto.
* libc/iconv/lib/bialiasesi.c: Sync with charset.aliases.
* libc/iconv/ces/euc-jp.c: Use newlib.h macros.
* libc/iconv/ces/euc-kr.c: Ditto.
* libc/iconv/ces/euc-tw.c: Ditto.
* libc/iconv/ces/gb2312.c: Ditto.
* libc/iconv/ces/iso-10646-ucs-2.c: Ditto.
* libc/iconv/ces/iso-10646-ucs-4.c: Ditto.
* libc/iconv/ces/ucs-2-internal.c: Ditto.
* libc/iconv/ces/ucs-4-internal.c: Ditto.
* libc/iconv/ces/utf-16.c: Ditto.
* libc/iconv/ces/utf-8.c: Ditto.
* libc/iconv/lib/aliases.c: Ditto.
* libc/iconv/lib/biccs.c: Ditto.
* libc/iconv/lib/bices.c: Ditto.
* libc/iconv/lib/ccs.c: Ditto.
* libc/iconv/lib/ces.c: Ditto.
* libc/iconv/lib/ces_euc.c: Ditto.
* libc/iconv/lib/ces_iso2022.c: Ditto.
* libc/iconv/lib/ces_table.c: Ditto.
* libc/iconv/lib/converter.c: Ditto.
* libc/iconv/lib/deps.h: Ditto.
* libc/iconv/lib/endian.h: Ditto.
* libc/iconv/lib/iconv.c: Ditto.
* libc/iconv/lib/loaddata.c: Ditto.
* libc/iconv/lib/local.h: Include newlib.h.
* libc/argz/Makefile.in: Regenerated.
* libc/ctype/Makefile.in: Ditto.
* libc/errno/Makefile.in: Ditto.
* libc/iconv/ccs/binary/Makefile.in: Ditto.
* libc/locale/Makefile.in: Ditto.
* libc/misc/Makefile.in: Ditto.
* libc/posix/Makefile.in: Ditto.
* libc/reent/Makefile.in: Ditto.
* libc/search/Makefile.in: Ditto.
* libc/signal/Makefile.in: Ditto.
* libc/stdio/Makefile.in: Ditto.
* libc/stdio64/Makefile.in: Ditto.
* libc/stdlib/Makefile.in: Ditto.
* libc/string/Makefile.in: Ditto.
* libc/syscalls/Makefile.in: Ditto.
* libc/time/Makefile.in: Ditto.
* libc/unix/Makefile.in: Ditto.
* testsuite/newlib.iconv/iconv.exp: New file.
* testsuite/newlib.iconv/iconvjp.c: Ditto.
* testsuite/newlib.iconv/iconvnm.c: Ditto.
* testsuite/newlib.iconv/iconvru.c: Ditto.
2004-01-27 23:26:26 +00:00
Jeff Johnston
786ab12ce2
2004-01-23 Artem B. Bityuckiy <abitytsky@softminecorp.com>
...
* acinclude.m4 (--enable-newlib-iconv): New configuration option.
(--enable-newlib-builtin-converters): Ditto.
* configure.in: Add code to set _ICONV_ENABLED flag.
Set _MB_LEN_MAX to 1 if not mb enabled.
* configure: Regenerated.
* aclocal.m4: Ditto.
* Makefile.in: Ditto.
* newlib.hin: Add _ICONV_ENABLED flag.
* libc/Makefile.am: Add support for iconv.
* libc/configure.in: Ditto.
* libc/Makefile.in: Regenerated.
* libc/aclocal.m4: Ditto.
* libc/configure: Ditto.
* libc/libc.texinfo: Add iconv documentation.
* libc/iconv/AUTHORS, libc/iconv/COPYING, libc/iconv/Makefile.am,
libc/iconv/Makefile.in, libc/iconv/README.ORIGINAL,
libc/iconv/README.TODO, libc/iconv/charset.aliases,
libc/iconv/iconv.tex, libc/iconv/ccs/Makefile.am,
libc/iconv/ccs/Makefile.in, libc/iconv/ccs/README.CCS.SOURCES,
libc/iconv/ccs/big5.c, libc/iconv/ccs/cns11643_plane1.c,
libc/iconv/ccs/cns11643_plane14.c, libc/iconv/ccs/cns11643_plane2.c,
libc/iconv/ccs/cp775.c, libc/iconv/ccs/cp850.c,
libc/iconv/ccs/cp852.c, libc/iconv/ccs/cp855.c,
libc/iconv/ccs/cp866.c, libc/iconv/ccs/gb_2312_80.c,
libc/iconv/ccs/iconv_mktbl, libc/iconv/ccs/iso_8859_1.c,
libc/iconv/ccs/iso_8859_15.c, libc/iconv/ccs/iso_8859_2.c,
libc/iconv/ccs/iso_8859_4.c, libc/iconv/ccs/iso_8859_5.c,
libc/iconv/ccs/jis_x0201.c, libc/iconv/ccs/jis_x0208_1983.c,
libc/iconv/ccs/jis_x0212_1990.c, libc/iconv/ccs/koi8_r.c,
libc/iconv/ccs/koi8_u.c, libc/iconv/ccs/ksx1001.c,
libc/iconv/ccs/shift_jis.c, libc/iconv/ccs/us_ascii.c,
libc/iconv/ccs/binary/Makefile.am, libc/iconv/ccs/binary/Makefile.in,
libc/iconv/ccs/binary/big5.cct,
libc/iconv/ccs/binary/cns11643_plane1.cct,
libc/iconv/ccs/binary/cns11643_plane14.cct,
libc/iconv/ccs/binary/cns11643_plane2.cct,
libc/iconv/ccs/binary/cp775.cct, libc/iconv/ccs/binary/cp850.cct,
libc/iconv/ccs/binary/cp852.cct, libc/iconv/ccs/binary/cp855.cct,
libc/iconv/ccs/binary/cp866.cct, libc/iconv/ccs/binary/gb_2312_80.cct,
libc/iconv/ccs/binary/iso_8859_1.cct,
libc/iconv/ccs/binary/iso_8859_15.cct,
libc/iconv/ccs/binary/iso_8859_2.cct,
libc/iconv/ccs/binary/iso_8859_4.cct,
libc/iconv/ccs/binary/iso_8859_5.cct,
libc/iconv/ccs/binary/jis_x0201.cct,
libc/iconv/ccs/binary/jis_x0208_1983.cct,
libc/iconv/ccs/binary/jis_x0212_1990.cct,
libc/iconv/ccs/binary/koi8_r.cct, libc/iconv/ccs/binary/koi8_u.cct,
libc/iconv/ccs/binary/ksx1001.cct,
libc/iconv/ccs/binary/shift_jis.cct,
libc/iconv/ccs/binary/us_ascii.cct,
libc/iconv/ces/Makefile.am, libc/iconv/ces/Makefile.in,
libc/iconv/ces/euc-jp.c, libc/iconv/ces/euc-kr.c,
libc/iconv/ces/euc-tw.c, libc/iconv/ces/gb2312.c,
libc/iconv/ces/iso-10646-ucs-2.c, libc/iconv/ces/iso-10646-ucs-4.c,
libc/iconv/ces/ucs-2-internal.c, libc/iconv/ces/ucs-4-internal.c,
libc/iconv/ces/utf-16.c, libc/iconv/ces/utf-8.c,
libc/iconv/lib/Makefile.am, libc/iconv/lib/Makefile.in,
libc/iconv/lib/aliases.c, libc/iconv/lib/bialiasesi.c,
libc/iconv/lib/biccs.c, libc/iconv/lib/bices.c,
libc/iconv/lib/ccs.c, libc/iconv/lib/ces.c,
libc/iconv/lib/ces_euc.c, libc/iconv/lib/ces_iso2022.c,
libc/iconv/lib/ces_table.c, libc/iconv/lib/converter.c,
libc/iconv/lib/deps.h, libc/iconv/lib/endian.h,
libc/iconv/lib/iconv.c, libc/iconv/lib/loaddata.c,
libc/iconv/lib/local.h, libc/include/iconv.h: New files.
* libc/sys/linux/include/iconv.h: Ditto.
* libc/include/sys/_types.h (_iconv_t): Added.
* doc/aclocal.m4: Regenerated.
* doc/configure: Ditto.
* doc/Makefile.in: Ditto.
* iconvdata/Makefile.in: Ditto.
* iconvdata/aclocal.m4: Ditto.
* iconvdata/configure: Ditto.
* libc/*aclocal.m4: Ditto.
* libc/*Makefile.in: Ditto.
* libc/*configure: Ditto.
* libm/*aclocal.m4: Ditto.
* libm/*Makefile.in: Ditto.
* libm/*configure: Ditto.
2004-01-23 21:37:46 +00:00
Jeff Johnston
ed1a95dc25
2004-01-22 Thomas Pfaff <tpfaff@gmx.net>
...
* libc/stdio/findfp.c (__sfp): Protect global FILE pointer list
by a lock when newlib is multithreaded.
2004-01-22 22:06:57 +00:00
Jeff Johnston
403f752cb2
2004-01-19 Thomas Pfaff <tpfaff@gmx.net>
...
* libc/stdio/fclose.c (fclose): Release FILE as the last step.
* libc/stdio/freopen.c (freopen): Ditto.
2004-01-19 21:30:34 +00:00
Christopher Faylor
85b6d63ba4
* libc/stdio/vfprintf.c: Add sys/lock.h include.
2004-01-17 04:29:54 +00:00
Jeff Johnston
4af71a917c
2004-01-16 Thomas Pfaff <tpfaff@gmx.net>
...
* libc/stdio/findfp.c (__sfp): Remove unnecessary memset.
* libc/stdio/vfprintf.c (__sbprintf): Ditto.
Add calls to __lock_init_recursive and __lock_close_recursive
instead.
2004-01-16 19:29:16 +00:00
Jeff Johnston
6a15098793
2004-01-15 Thomas Pfaff <tpfaff@gmx.net>
...
* libc/stdio/fclose.c: Include sys/lock.h.
(fclose): Destroy lock when file is closed.
* libc/stdio/findfp.c (__sfp): Initialize file pointers _lock
member.
* libc/stdio/freopen.c: Include sys/lock.h.
(_freopen_r): Destroy lock when file is closed.
* libc/stdio/vfprintf.c (__sbprintf): Initialize file pointers
_lock member.
2004-01-15 19:12:17 +00:00
Jeff Johnston
5d109bdeb0
2003-12-04 Artem B. Bityuckiy <abitytsky@softminecorp.com>
...
* libc/stdio/vfprintf.c (_VFPRINTF_R): Use _r versions
of mb routines for %lc and %ls support.
* libc/stdio/vfscanf.c (_svfscanf_r): Add %lc, %C,
%ls, and %S support. Remove CYGNUS_NEC markers and
code within.
2003-12-05 01:42:26 +00:00
Jeff Johnston
6db165c2a5
2003-11-24 Artem B. Bityuckiy <mail_lists@mail.ru>
...
* libc/stdio/vfprintf.c (_VFPRINTF_R): Fix check for 'C' format
specifier to use ch instead of *fmt.
2003-11-24 18:39:04 +00:00
Jeff Johnston
759a097e72
2003-11-21 Artem B. Bityuckiy <mail_lists@mail.ru>
...
* libc/stdio/vfprintf.c (_VFPRINTF_R, get_arg): Move mb-specific
code within checks for MB_CAPABLE. For non-mb-capable platforms,
use simple byte logic.
2003-11-22 01:07:24 +00:00
Jeff Johnston
4f6149d6f0
2003-11-21 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/vfscanf.c (__svfscanf_r)[!_NO_LONGDBL]: Don't use
_strtold routine for processing floats and doubles since it
is not as fast as _strtod_r.
2003-11-21 20:48:49 +00:00
Jeff Johnston
64cfc6f213
2003-11-19 Nicholas Wourms <nwourms@netscape.net>
...
* configure.host: Enable positional arguments for printf
family for Cygwin.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Remove extraneous
pointer reference for quad_ptr_t.
2003-11-19 17:07:36 +00:00
Jeff Johnston
e1dc8171ae
2003-11-19 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/scanf.c: Don't include local.h more than once.
2003-11-19 16:57:51 +00:00
Jeff Johnston
2985521f84
2003-11-07 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/vfprintf.c (_VFPRINTF_R): Fix typos that should be
referring to _NO_LONGLONG macro.
2003-11-07 16:01:17 +00:00
Jeff Johnston
d2ffac097d
2003-11-05 Jeff Johnston <jjohnstn@redhat.com>
...
Artem B. Bityuckiy <mail_lists@mail.ru>
* libc/stdio/vfprintf.c (_VFPRINTF_R): Add support for
%ls, %S, %lc, and %C format specifiers.
(get_arg): Ditto.
* libc/stdio/sprintf.c: Add documentation regarding new
format specifiers added in vfprintf.c.
2003-11-06 00:50:57 +00:00
Jeff Johnston
76a7df5256
2003-10-20 Bob Wilson <bob.wilson@acm.org>
...
* libc/locale/locale.c: Use double quotes in code.
* libc/locale/locale.tex: Likewise.
* libc/libc.texinfo: Hyphenate "floating-point".
* libc/machine/necv70/necv70.tex: Likewise.
* libc/stdio/sprintf.c: Likewise.
* libc/stdio/sscanf.c: Likewise.
* libc/stdlib/atof.c: Likewise.
* libc/stdlib/ldtoa.c: Fix comment typo.
* libc/stdlib/div.c: Use @ifnottex instead of @ifinfo.
* libc/stdlib/ldiv.c: Likewise.
* libm/common/s_expm1.c: Likewise.
* libm/common/s_ilogb.c: Hyphenate "floating-point". Use "nonzero".
* libm/common/s_infinity: Hyphenate "double- and single-precision".
* libm/common/s_nan.c: Likewise. Also correct the FUNCTION summary.
* libm/common/s_nextafter.c: Fix typo. Hyphenate "double-precision"
and "floating-point".
* libm/common/s_scalbn.c: Correct the FUNCTION summary.
* libm/math/e_pow.c: Fix comment typo.
* libm/math/math.tex: Hyphenate "single-precision" and "floating-point".
* libm/math/s_asinh.c: Use @ifnottex instead of @ifinfo.
* libm/math/s_atan.c: Likewise.
* libm/math/s_frexp.c: Likewise. Also use "nonzero".
* libm/math/s_isnan.c: Hyphenate "single-precision" and
"floating-point". Use "nonzero".
* libm/math/s_ldexp.c: Use @ifnottex instead of @ifinfo.
* libm/math/w_acos.c: Likewise.
* libm/math/w_acosh.c: Likewise.
* libm/math/w_asin.c: Likewise.
* libm/math/w_atan2.c: Likewise.
* libm/math/w_atanh.c: Likewise.
* libm/math/w_cosh.c: Likewise.
* libm/math/w_exp.c: Likewise.
* libm/math/w_exp2.c: Likewise. Add missing @end and missing @tex
version of 2^x in the description.
* libm/math/w_fmod.c: Use @ifnottex instead of @ifinfo.
* libm/math/w_gamma.c: Likewise.
* libm/math/w_hypot.c: Likewise.
* libm/math/w_j0.c: Likewise.
* libm/math/w_sinh.c: Likewise.
* libm/math/w_pow.c: Replace "exp1.0nt" with "exponent".
* libm/mathfp/mathfp.tex: Hyphenate "single-precision" and
"floating-point".
* libm/mathfp/e_acosh.c: Use @ifnottex instead of @ifinfo.
* libm/mathfp/e_atanh.c: Likewise.
* libm/mathfp/e_hypot.c: Likewise.
* libm/mathfp/er_lgamma.c: Likewise.
* libm/mathfp/s_acos.c: Likewise.
* libm/mathfp/s_asine.c: Likewise.
* libm/mathfp/s_asinh.c: Likewise.
* libm/mathfp/s_atan.c: Likewise.
* libm/mathfp/s_atan2.c: Likewise.
* libm/mathfp/s_atangent.c: Likewise.
* libm/mathfp/s_cosh.c: Likewise.
* libm/mathfp/s_exp.c: Likewise.
* libm/mathfp/s_fmod.c: Likewise.
* libm/mathfp/s_frexp.c: Likewise. Also use "nonzero".
* libm/mathfp/s_isnan.c: Hyphenate "single-precision" and
"floating-point". Use "nonzero".
* libm/math/s_pow.c: Replace "exp1.0nt" with "exponent".
* libm/mathfp/s_ldexp.c: Use @ifnottex instead of @ifinfo.
* libm/mathfp/s_sineh.c: Likewise.
* libm/mathfp/w_jn.c: Likewise.
2003-10-20 18:46:38 +00:00
Jeff Johnston
9fc9e1c916
2003-08-22 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/sys/reent.h: Add _GLOBAL_REENT macro.
* libc/stdio: Globally remove/replace all references to fp->_data.
Replace with _REENT or _GLOBAL_REENT where appropriate.
* libc/stdio/asprintf.c: Ditto.
* libc/stdio/fclose.c: Ditto.
* libc/stdio/fvwrite.c: Ditto.
* libc/stdio/makebuf.c: Ditto.
* libc/stdio/refill.c: Ditto.
* libc/stdio/local.h: Ditto.
* libc/stdio/setvbuf.c: Ditto.
* libc/stdio/sscanf.c: Ditto.
* libc/stdio/stdio.c: Ditto.
* libc/stdio/ungetc.c: Ditto.
* libc/stdio/vfscanf.c: Ditto.
* libc/stdio/vsscanf.c: Ditto.
* libc/stdio/fopen.c: Ditto. Also use _fseek_r in _fopen_r.
* libc/stdio/vasprintf.c: Ditto. Also call _vfprintf_r directly.
* libc/stdio/vsnprintf.c: Ditto.
* libc/stdio/vsprintf.c: Ditto.
* libc/stdio/fcloseall.c(fcloseall): Use _GLOBAL_REENT macro
instead of _REENT to walk file list.
* libc/stdio/fflush.c: Ditto.
* libc/stdio/fgetpos.c: Add reentrant version and have regular
version call reentrant version with _REENT argument.
* libc/stdio/fsetpos.c: Ditto.
* libc/stdio/fseek.c: Ditto.
* libc/stdio/fseeko.c: Ditto.
* libc/stdio/ftell.c: Ditto.
* libc/stdio/ftello.c: Ditto.
* libc/stdio/freopen.c: Ditto.
* libc/stdio/findfp.c: Use _GLOBAL_REENT pointer when adding
new files to chain. Also use _GLOBAL_REENT pointer for
cleaning up.
* libc/stdio/fiprintf.c: Reformatted to minimize duplicate code.
* libc/stdio/siprintf.c: Ditto.
* libc/stdio/iprintf.c: Ditto.
* libc/stdio/fprintf.c: Ditto.
* libc/stdio/printf.c: Ditto.
* libc/stdio/snprintf.c: Call _vfprintf_r directly.
* libc/stdio/sprintf.c: Ditto.
* libc/stdio/vprintf.c: Ditto. Also add _REENT_ONLY check.
* libc/stdio/rewind.c: Call _fseek_r directly.
* libc/stdio/tmpfile.c: Call _fopen_r and _remove_r directly.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Change _r routines to use
data pointer.
(get_arg): Add extra struct _reent pointer argument.
* libc/stdio64/fgetpos64.c: Add _r versions, remove any reference
to fp->_data.
* libc/stdio64/fopen64.c: Ditto.
* libc/stdio64/freopen64.c: Ditto.
* libc/stdio64/fsetpos64.c: Ditto.
* libc/stdio64/ftello64.c: Ditto.
* libc/stdio64/local64.h: Ditto.
* libc/stdio64/stdio64.c: Ditto.
* libc/stdio64/fseeko64.c: Ditto plus use _fstat_r instead of
_fstat64_r for the meantime.
2003-08-22 18:52:25 +00:00
Jeff Johnston
42de559299
2003-07-29 Honda Hiroki <hhonda@ipflex.com>
...
* libc/stdio/vfprintf.c: Set output size to 1 when
we have %f format with precision 0 and # flag not specified.
2003-07-29 20:45:11 +00:00
Corinna Vinschen
8a4b4764b8
* libc/ctype/ctype_.c: Remove checks for deprecated __CYGWIN32__.
...
* libc/include/stdio.h: Ditto.
* libc/include/sys/config.h: Ditto.
* libc/stdio/mktemp.c: Ditto.
2003-05-13 09:46:48 +00:00
Corinna Vinschen
837e070f31
* libc/locale/ldpart.c (__part_load_locale): Substitute
...
__CYGWIN_USE_BIG_TYPES__ by __USE_INTERNAL_STAT64.
* libc/search/hash.c (__hash_open): Ditto.
(init_hash): Ditto.
* libc/stdio/fseek.c (fseek): Ditto.
* libc/stdio/makebuf.c (__smakebuf): Ditto.
* libc/stdio/mktemp.c (_gettemp): Ditto.
2003-05-13 09:19:15 +00:00
Corinna Vinschen
11e3a52072
* configure.host: Accomodate removing the libc/sys/cygwin dir.
...
* libc/locale/ldpart.c (__part_load_locale): Use 64 bit stat call
if __CYGWIN_USE_BIG_TYPES__ is set.
* libc/search/hash.c (__hash_open): Ditto.
(init_hash): Ditto.
* libc/stdio/fseek.c (fseek): Ditto.
* libc/stdio/makebuf.c (__smakebuf): Ditto.
* libc/stdio/mktemp.c (_gettemp): Ditto.
* libc/sys/cygwin/Makefile.am: Remove.
* libc/sys/cygwin/Makefile.in: Remove.
* libc/sys/cygwin/aclocal.m4: Remove.
* libc/sys/cygwin/configure: Remove.
* libc/sys/cygwin/configure.in: Remove.
* libc/sys/cygwin/crt0.c: Move to winsup/cygwin directory.
* libc/sys/cygwin/sys/dirent.h: Move to winsup/cygwin/include/sys
directory.
* libc/sys/cygwin/sys/param.h: Ditto.
* libc/sys/cygwin/sys/utime.h: Ditto.
* libc/sys/cygwin/sys/utmp.h: Ditto.
2003-05-12 11:09:39 +00:00
Corinna Vinschen
31ee99a41e
* libc/stdio/sscanf.c: Update flags description.
...
* libc/stdio/vfscanf.c: Add CHAR flag value to denote 8 bit target
type.
(__svfscanf_r): Add 'hh' and 'll' handling.
2003-04-01 16:27:52 +00:00
Jeff Johnston
e6bdc6c5eb
2003-03-20 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/vfscanf.c (__svfscanf_r): For floating point conversion,
count all characters used to create number against maximum width.
* libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto.
2003-03-20 17:23:57 +00:00
Corinna Vinschen
2a940c1a22
* libc/include/stdio.h: Declare fgetpos, fsetpos, fseeko and ftello
...
with internal (_fpos_t and _off_t) datatypes when compiling newlib.
* libc/include/sys/unistd.h: Declare _lseek using _off_t.
* libc/reent/lseekr.c (_lseek_r): Use _off_t instead of off_t.
* libc/stdio/fseeko.c (fseeko): Ditto.
* libc/stdio/ftello.c (ftello): Ditto.
* libc/stdio/stdio.c (__swrite): Ditto.
(__sseek): Ditto.
* libc/stdio/fgetpos.c (fgetpos): Use _fpos_t instead of fpos_t.
* libc/stdio/fseek.c (fseek): Ditto.
* libc/stdio/fsetpos.c (fsetpos): Ditto.
* libc/stdio/ftell.c (ftell): Ditto.
* libc/stdio/local.h: Declare __sseek using _off_t.
2003-03-14 18:39:05 +00:00
Jeff Johnston
5017a3dafa
2003-02-05 Jonathan Larmour <jifl@eCosCentric.com>
...
* libc/stdio/vsprintf.c (vsprintf, _vsprintf_r): Set _file fd to
-1 to be sure it cannot later match a valid file fd causing
isatty() to return 1.
* libc/stdio/asprintf.c (asprintf, _asprintf_r): Ditto.
* libc/stdio/sprintf.c (sprintf, _sprintf_r): Ditto.
* libc/stdio/vasprintf.c (vasprintf, _vasprintf_r): Ditto.
2003-02-05 16:52:34 +00:00
Jeff Johnston
be9c60e52e
2003-01-07 Charles Wilson <cwilson@ece.gatech.edu>
...
* libc/stdio/sprintf.c: fix typo
* libc/stdio/vfprintf.c: fix typo
2003-01-07 20:02:33 +00:00
Jeff Johnston
b2294aaa30
2003-01-06 Charles Wilson <cwilson@ece.gatech.edu>
...
* Makefile.am: Add vasprintf.
* Makefile.in: Regenerated.
2003-01-07 01:45:32 +00:00
Jeff Johnston
ea5e5daf7c
2003-01-06 Charles Wilson <cwilson@ece.gatech.edu>
...
* asprintf.c (_asprintf_r): insure both declarations
are the same.
2003-01-06 20:51:25 +00:00
Jeff Johnston
50558bf3bd
2002-09-19 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/posix/opendir.c (opendir): Change code to check
for HAVE_FCNTL before calling fcntl.
* libc/search/hash.c (hash_open): Ditto.
* libc/search/hash_page.c (open_tmp): Ditto.
* libc/reent/Makefile.am: Add fcntlr.c.
* libc/reent/Makefile.in: Regenerated.
* libc/reent/fcntlr.c: New file.
* libc/stdio/fdopen.c (_fdopen_r): Change to call _fcntl_r
instead of _fcntl when HAVE_FCNTL flag is set.
* libc/syscalls/sysfcntl.c (fcntl): Check for HAVE_FCNTL flag
to see if _fcntl or _fcntl_r should be called. If flag is not
set, default to ENOSYS stub.
2002-09-19 21:28:52 +00:00
Jeff Johnston
3db40db7d8
2002-09-03 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/sys/_types.h (_flock_t): Added.
* libc/include/sys/lock.h (__lock_try_acquire): New interface.
(__lock_try_acquire_recursive): Ditto.
* libc/include/sys/reent.h (__sFILE, __sFILE64): Add new
_lock field.
* libc/stdio/findfp.c (std)[!__SINGLE_THREAD__]: Initialize _lock
field.
* libc/stdio/fopen.c (_fopen_r)[!__SINGLE_THREAD__]: Ditto.
* libc/stdio64/fopen64.c (_fopen64_r)[!__SINGLE_THREAD__]: Ditto.
* libc/sys/linux/include/time.h (struct timespec): Moved from
<sys/types.h> and added check for __need_timespec flag so type
can be defined by itself.
* libc/sys/linux/sys/_types.h (_flock_t): New type.
* libc/sys/linux/sys/types.h (struct timespec): Moved to
<time.h>.
2002-09-03 19:40:36 +00:00
Jeff Johnston
90b65e2d06
2002-08-26 Jeff Johnston <jjohnstn@redhat.com>
...
* Makefile.am(LIBC_OBJECTLISTS): Add STDIO64_OBJECTLIST.
* Makefile.in: Regenerated.
* acinclude.m4: Add support for --enable-newlib-elix-level option.
* aclocal.m4: Regenerated.
* configure: Ditto.
* configure.host: Add code to define _ELIX_LEVEL if
--enable-newlib-elix-level option is used.
* configure.in:
* libc/aclocal.m4: Regenerated.
* libc/configure: Ditto.
* libc/argz/Makefile.am: Add EL/IX level checking.
* libc/argz/Makefile.in: Regenerated.
* libc/argz/dummy.c: New file.
* libc/ctype/Makefile.am: Add EL/IX level checking.
* libc/ctype/Makefile.in: Regenerated.
* libc/locale/Makefile.am: Add EL/IX level checking.
* libc/locale/Makefile.in: Regenerated.
* libc/posix/Makefile.am: Add EL/IX level checking.
* libc/posix/Makefile.in: Regenerated.
* libc/posix/telldir.c: Add EL/IX level checking.
* libc/reent/Makefile.am: Ditto.
* libc/reent/fstat64r.c: Ditto.
* libc/reent/lseek64r.c: Ditto.
* libc/reent/open64r.c: Ditto.
* libc/reent/Makefile.in: Regenerated.
* libc/search/Makefile.am: Add EL/IX level checking.
* libc/search/Makefile.in: Regenerated.
* libc/stdio/Makefile.am: Add EL/IX level checking.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio64/Makefile.am: Add EL/IX level checking.
* libc/stdio64/Makefile.in: Regenerated.
* libc/stdio64/dummy.c: New file.
* libc/stdio64/fgetpos64.c: Fix so _LARGEFILE_64 macro is checked
after first include.
* libc/stdio64/fopen64.c: Ditto.
* libc/stdio64/freopen64.c: Ditto.
* libc/stdio64/fseeko64.c: Ditto.
* libc/stdio64/fsetpos64.c: Ditto.
* libc/stdio64/ftello64.c: Ditto.
* libc/stdio64/tmpfile64.c: Ditto.
* libc/stdlib/Makefile.am: Add EL/IX level checking.
* libc/stdlib/Makefile.in: Regenerated.
* libc/stdlib/mstats.c: Add EL/IX level checking.
* libc/string/Makefile.am: Ditto.
* libc/string/Makefile.in: Regenerated.
* libc/sys/linux/Makefile.am: Add EL/IX level checking.
* libc/sys/linux/Makefile.in: Regenerated.
* libc/sys/linux/aclocal.m4: Ditto.
* libc/sys/linux/configure: Ditto.
* libc/sys/linux/aio.c: Add EL/IX level checking.
* libc/sys/linux/ftok.c: Ditto.
* libc/sys/linux/getdate.c: Ditto.
* libc/sys/linux/ids.c: Ditto.
* libc/sys/linux/inode.c: Ditto.
* libc/sys/linux/io.c: Ditto.
* libc/sys/linux/process.c: Ditto.
* libc/sys/linux/resource.c: Ditto.
* libc/sys/linux/sched.c: Ditto.
* libc/sys/linux/sig.c: Ditto.
* libc/sys/linux/termios.c: Ditto.
* libc/sys/linux/wait.c: Ditto plus add __waitpid and
__libc___waitpid weak aliases.
* libc/sys/linux/machine/i386/syscall.h: Add new _base macros
that generate the code for a syscall, but do not create a
weak alias.
* libc/syscalls/Makefile.am: Add EL/IX level checking.
* libc/syscalls/Makefile.in: Regenerated.
* libc/time/tzset_r.c: Change to replace strdup with equivalent
functionality.
* libc/unix/Makefile.am: Add EL/IX level checking.
* libc/unix/Makefile.in: Regenerated.
2002-08-26 18:56:09 +00:00
Thomas Fitzsimmons
8d9112f2f3
* libc/include/langinfo.h: New file.
...
* libc/include/wchar.h: Likewise.
* libc/include/sys/syslimits.h: Likewise.
* libc/locale/fix_grouping.c: Likewise.
* libc/locale/ldpart.c: Likewise.
* libc/locale/ldpart.h: Likewise.
* libc/locale/lmessages.c: Likewise.
* libc/locale/lmessages.h: Likewise.
* libc/locale/lmonetary.c: Likewise.
* libc/locale/lmonetary.h: Likewise.
* libc/locale/lnumeric.c: Likewise.
* libc/locale/lnumeric.h: Likewise.
* libc/locale/nl_langinfo.3: Likewise.
* libc/locale/nl_langinfo.c: Likewise.
* libc/locale/timelocal.c: Likewise.
* libc/locale/timelocal.h: Likewise.
* libc/stdlib/btowc.c: Likewise.
* libc/stdlib/mbrlen.c: Likewise.
* libc/stdlib/mbrtowc.c: Likewise.
* libc/stdlib/mbsinit.c: Likewise.
* libc/stdlib/mbsrtowcs.c: Likewise.
* libc/stdlib/wcrtomb.c: Likewise.
* libc/stdlib/wcsrtombs.c: Likewise.
* libc/stdlib/wctob.c: Likewise.
* libc/sys/linux/prof-freq.c: Likewise.
* libc/sys/linux/profile.c: Likewise.
* libc/sys/linux/machine/i386/dl-procinfo.c: Likewise.
* libc/sys/linux/machine/i386/dl-procinfo.h: Likewise.
* libc/include/stdlib.h: Change re-entrant functions to take
mbstate_t pointers.
* libc/include/sys/_types.h: Define _mbstate_t.
* libc/include/sys/config.h (MB_LEN_MAX): New macro.
* libc/include/sys/errno.h (EILSEQ): New error code.
* libc/include/sys/reent.h: Include wchar.h. Change reentrant
structure to use mbstate_t.
* libc/locale/Makefile.am (LIB_SOURCES): Add new files.
* libc/machine/powerpc/vfprintf.c: Use mbstate_t.
* libc/machine/powerpc/vfscanf.c: Likewise.
* libc/stdio/getdelim.c: Reallocate buffer only when necessary.
* libc/stdio/vfprintf.c: Likewise.
* libc/stdio/vfscanf.c: Likewise.
* libc/stdlib/Makefile.am (LIB_SOURCES): Add new files.
* libc/stdlib/mblen.c: Use mbstate_t.
* libc/stdlib/mblen_r.c: Likewise.
* libc/stdlib/mbstowcs.c: Likewise.
* libc/stdlib/mbstowcs_r.c: Likewise.
* libc/stdlib/mbtowc.c: Likewise.
* libc/stdlib/mbtowc_r.c: Likewise.
* libc/stdlib/wcstombs.c: Likewise.
* libc/stdlib/wcstombs_r.c: Likewise.
* libc/stdlib/wctomb_r.c: Likewise.
* libc/sys/linux/Makefile.am (LIB_SOURCES): Add prof-freq.c and
profile.c.
* libc/sys/linux/machine/i386/Makefile.am (LIB_SOURCES): Add
dl-procinfo.c.
* libc/sys/linux/sys/errno.h (EILSEQ): New error code.
* libc/sys/linux/sys/types.h (off_t): Define type.
* testsuite/newlib.locale/UTF-8.c: Change locale name from UTF-8
to C-UTF-8.
* testsuite/newlib.locale/UTF-8.exp: Likewise.
2002-08-23 01:56:05 +00:00
Jeff Johnston
037240a242
2002-08-09 Jeff Johnston <jjohnstn@redhat.com>
...
* configure.host: Add check for --enable-newlib-io-pos-args
and define WANT_IO_POS_ARGS flag if enabled. Define
the flag by default for x86-linux configurations.
* configure.in: Add support for --enable-newlib-io-pos-args.
* libc/configure.in: Ditto.
* configure: Regenerated.
* libc/configure: Ditto.
* libc/stdio/Makefile.am: Specify -fshort-enums for compiling
vfprintf.c and vfiprintf.c.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio/vfprintf.c: Add positional argument support that
is enabled by compiling with -DWANT_IO_POS_ARGS.
2002-08-09 21:12:09 +00:00
Jeff Johnston
f5f27f0778
2002-07-22 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/stdio.h (fcloseall, _fcloseall_r): Added prototypes.
* libc/stdio/Makefile.am: Added fcloseall.c support.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio/fcloseall.c: New file.
* libc/stdio64/Makefile.am: Remove missing .def references.
* libc/stdio64/Makefile.in: Regenerated.
2002-07-22 23:53:50 +00:00
Thomas Fitzsimmons
9b022d6db8
* libc/argz/argz_replace.c: Include buf_findstr.h.
...
* libc/argz/buf_findstr.c: Likewise.
* libc/argz/envz_entry.c: Include buf_findstr.h. Cast return
value to (char *).
* libc/argz/envz_get.c: Likewise.
* libc/include/sys/unistd.h: Add getopt and getsubopt declarations.
* libc/stdlib/Makefile.am (LIB_SOURCES): Add getsubopt.c.
* libc/stdlib/getsubopt.3: New file.
* libc/stdlib/getsubopt.c: New file.
* libc/sys/linux/machine/i386/socketcall.h (__sockcall_base):
Change esp to ebp.
2002-07-19 20:36:09 +00:00
Jeff Johnston
dee5139131
2002-07-17 Jeff Johnston <jjohnstn@redhat.com>
...
* configure.host(stdio64_dir): New setting that is used to
enable building of new stdio64 directory.
* libc/Makefile.am[HAVE_STDIO64_DIR]: Add support for
large files.
(stmp-stdio64,stdio64.texi): New targets to optionally add in
stdio64 info to info files.
* libc/Makefile.in: Regenerated.
* libc/configure: Ditto.
* libc/configure.in: Add configuration variables that are set
when stdio64 is selected as subdir in configure.host.
* libc/libc.texinfo: Add optional menu item for Stdio64, based
on whether STDIO64 flag is set or not.
* libc/sys.tex: Add optional stdio64 syscalls based on whether
STDIO64 flag is set or not.
* libc/include/reent.h[__LARGE64_FILES]: Add new stdio64
_r sycall routines.
* libc/include/stdio.h[__LARGE64_FILES]: Add new stdio64 prototypes.
(FILE): Typedef'd to __FILE instead of struct __sFILE directly.
(__SL64): New file flag indicating file is opened via fopen64.
* libc/include/sys/_types.h(_off64_t): Added.
* libc/include/sys/config.h: For x86-linux, define __LARGE64_FILES.
* libc/include/sys/reent.h(struct __sFILE64): New file structure
for 64-bit offset large file support.
(__FILE): New intermediate type either set to struct __sFILE64 or
struct __sFILE, depending on whether __LARGE64_FILES is set or not.
* libc/reent/Makefile.am[HAVE_STDIO64_DIR]: Add new files.
* libc/reent/Makefile.in: Regenerated.
* libc/reent/fstat64r.c: New file.
* libc/reent/lseek64r.c: Ditto.
* libc/reent/open64r.c: Ditto.
* libc/reent/reent.tex: Optionally add stdio64 reentrant syscalls
based on whether STDIO64 flag is set.
* libc/stdio/stdio.tex: Add blank line.
* libc/stdio64/Makefile.am: New file.
* libc/stdio64/Makefile.in: Ditto.
* libc/stdio64/fgetpos64.c: Ditto.
* libc/stdio64/fopen64.: Ditto.
* libc/stdio64/freopen64.c: Ditto.
* libc/stdio64/fseeko64.c: Ditto.
* libc/stdio64/fsetpos64.c: Ditto.
* libc/stdio64/ftello64.c: Ditto.
* libc/stdio64/local64.h: Ditto.
* libc/stdio64/stdio64.c: Ditto.
* libc/stdio64/stdio64.tex: Ditto.
* libc/stdio64/tmpfile64.c: Ditto.
* libc/sys/linux/io64.c: Add weak aliases for lseek64, fstat64, and
open64.
2002-07-17 23:25:44 +00:00
Jeff Johnston
778876f6ce
2002-07-16 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/Makefile.am (stmp-extra): New target to set makeinfo flag
if LIBC_EXTRA_LIB is present.
* libc/Makefile.in: Regenerated.
* libc/libc.texinfo: Add blank line.
* libc/argz/Makefile.am: Add doc support.
* libc/search/Makefile.am: Ditto.
* libc/argz/Makefile.in: Regenerated.
* libc/search/Makefile.in: Ditto.
* libc/misc/misc.tex: Add ffs function.
* libc/stdio/ftell.c: Fix missing doc delimeter in description.
2002-07-16 15:30:32 +00:00
Jeff Johnston
30b2092fcb
2002-07-04 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/stdio.h: Add new prototypes.
* libc/stdio/Makefile.am: Add fseeko.c and ftello.c.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio/fseek.c: Add fseeko documentation.
* libc/stdio/ftell.c: Add ftello documentation.
* libc/stdio/fseeko.c: New file.
* libc/stdio/ftello.c: New file.
2002-07-04 19:33:54 +00:00
Jeff Johnston
7501704dc9
2002-07-04 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/Makefile.am: Add asprintf.c and vasprintf.c.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio/asprintf.c: New file.
* libc/stdio/vasprintf.c: Ditto.
* libc/stdio/fvwrite.c: Add code to dynamically reallocate
the buffer for asprintf support.
* libc/stdio/sprintf.c: Add asprintf documentation.
* libc/stdio/vfprintf.c: Add vasprintf documentation.
* libc/include/stdio.h: Add new prototypes.
2002-07-04 18:56:17 +00:00
Thomas Fitzsimmons
30a0616840
2002-06-24 WATANABE Hirofumi <eban@os.rim.or.jp>
...
* libc/stdio/fseek.c (fseek): Fix braces.
2002-06-24 15:59:38 +00:00
Jeff Johnston
d427d09204
2002-06-21 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/stdio.h (__getline, __getdelim): New prototypes.
* libc/include/time.h [HAVE_GETDATE](getdate, getdate_r): Ditto.
[HAVE_GETDATE](getdate_err): New error code.
* libc/stdio/Makefile.am: Add support for getline.c and getdelim.c.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio/getdelim.c: New file.
* libc/stdio/getline.c: Ditto.
* libc/sys/linux/Makefile.am: Add support for getdate.c, getdate_err.c
and ntp_gettime.c. Also add AM_CFLAGS to point to libc/stdio.
* libc/sys/linux/Makefile.in: Regenerated.
* libc/sys/linux/getdate.c: New file.
* libc/sys/linux/getdate_err.c: Ditto.
* libc/sys/linux/ntp_gettime.c: Ditto.
* libc/sys/linux/time.c (adjtimex, ntp_adjtime): New functions.
* libc/sys/linux/sys/stdio.h (getline, getdelim): New macros.
2002-06-21 18:29:23 +00:00
Thomas Fitzsimmons
0953fe640f
* libm/common/s_fdim.c: New file.
...
* libm/common/s_fma.c: Likewise.
* libm/common/s_fmax.c: Likewise.
* libm/common/s_fmin.c: Likewise.
* libm/common/s_fpclassify.c: Likewise.
* libm/common/s_lrint.c: Likewise.
* libm/common/s_lround.c: Likewise.
* libm/common/s_nearbyint.c: Likewise.
* libm/common/s_remquo.c: Likewise.
* libm/common/s_round.c: Likewise.
* libm/common/s_scalbln.c: Likewise.
* libm/common/s_signbit.c: Likewise.
* libm/common/s_trunc.c: Likewise.
* libm/common/sf_fdim.c: Likewise.
* libm/common/sf_fma.c: Likewise.
* libm/common/sf_fmax.c: Likewise.
* libm/common/sf_fmin.c: Likewise.
* libm/common/sf_lrint.c: Likewise.
* libm/common/sf_lround.c: Likewise.
* libm/common/sf_nearbyint.c: Likewise.
* libm/common/sf_remquo.c: Likewise.
* libm/common/sf_round.c: Likewise.
* libm/common/sf_scalbln.c: Likewise.
* libm/common/sf_trunc.c: Likewise.
* libm/math/w_exp2.c: Likewise.
* libm/math/w_tgamma.c: Likewise.
* libm/math/wf_exp2.c: Likewise.
* libm/math/wf_tgamma.c: Likewise.
* libm/mathfp/s_exp2.c: Likewise.
* libm/mathfp/s_tgamma.c: Likewise.
* libm/mathfp/sf_exp2.c: Likewise.
* libm/mathfp/sf_tgamma.c: Likewise.
* libm/math/er_gamma.c: Fix return value.
* libm/math/erf_gamma.c: Likewise.
* libm/mathfp/er_gamma.c: Likewise.
* libm/mathfp/erf_gamma.c: Likewise.
* libc/include/math.h (!__STRICT_ANSI__): Include ISOC99-specific
declarations and macros.
Regenerated all Makefile.in, aclocal.m4 and configure files to
use new libtool macros in top-level libtool.m4
2002-06-07 21:59:57 +00:00
Jeff Johnston
164ee5b054
2002-05-23 Gareth Pearce <tilps@hotmail.com>
...
* libc/stdio/Makefile.am: Modify to add setbuffer.c and setlinebuf.c.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio/setbuffer.c: New file.
* libc/stdio/setlinebuf.c: New file.
2002-05-23 22:05:54 +00:00
Thomas Fitzsimmons
7649080606
* libc/stdio/getc_u.c: New file.
...
* libc/stdio/getchar_u.c: New file.
* libc/stdio/putc_u.c: New file.
* libc/stdio/putchar_u.c: New file.
* libc/include/stdio.h: Add declarations for getc_unlocked,
getchar_unlocked, putc_unlocked and putchar_unlocked.
* libc/stdio/Makefile.am (LIB_SOURCES): Add new files.
(CHEWOUT_FILES): Add new files' .def's.
* libc/stdio/putchar.c (_putchar_r): Replace __sputc with putc.
2002-05-08 19:11:22 +00:00
Thomas Fitzsimmons
e71372faea
* libc/include/sys/stdio.h: New file.
...
* libc/sys/linux/sys/stdio.h: New file.
* libc/include/stdio.h: Add declarations for flockfile,
ftrylockfile, and funlockfile. Include <sys/stdio.h>.
* libc/stdio/clearerr.c: Add file locking.
* libc/stdio/fclose.c: Likewise.
* libc/stdio/feof.c: Likewise.
* libc/stdio/ferror.c: Likewise.
* libc/stdio/fflush.c: Likewise.
* libc/stdio/fgetc.c: Likewise.
* libc/stdio/fgetpos.c: Likewise.
* libc/stdio/fgets.c: Likewise.
* libc/stdio/fileno.c: Likewise.
* libc/stdio/fputc.c: Likewise.
* libc/stdio/fputs.c: Likewise.
* libc/stdio/fread.c: Likewise.
* libc/stdio/freopen.c: Likewise.
* libc/stdio/fseek.c: Likewise.
* libc/stdio/ftell.c: Likewise.
* libc/stdio/fwrite.c: Likewise.
* libc/stdio/getc.c: Likewise.
* libc/stdio/putc.c: Likewise.
* libc/stdio/setvbuf.c: Likewise.
* libc/stdio/ungetc.c: Likewise.
* libc/stdio/vfprintf.c: Likewise.
2002-05-08 00:12:49 +00:00
Thomas Fitzsimmons
098414456c
* libc/Makefile.am (SUBLIBS): Add LIBC_EXTRA_LIB.
...
(SUBDEFS): Add LIBC_EXTRA_DEF.
* libc/configure.in (LIBC_EXTRA_LIB): New variable.
(LIBC_EXTRA_DEF): Likewise.
(extra_dir): Likewise.
* libc/machine/xscale/machine: New directory.
* libc/machine/xscale/machine/profile.h: New file.
* Makefile.am (site.exp): Remove newlib_cflags. Add
multibuildtop.
* testsuite/newlib.locale/UTF-8.c: Change fprintf's to printf's.
* testsuite/lib/flags.exp: New file.
* testsuite/lib/newlib.exp: Load flags.exp.
(newlib_target_compile): Remove libgloss directory references.
(newlib_init): Remove newlib_cflags references.
2002-05-01 18:44:13 +00:00
Thomas Fitzsimmons
bfc27bae1a
* Various formatting and whitespace changes.
2002-04-30 18:23:40 +00:00
Thomas Fitzsimmons
eaa75b70e3
* Makefile.am (check-DEJAGNU): New target.
...
(site.exp): Likewise.
* acinclude.m4 (NEWLIB_CONFIGURE): Replace AC_CANONICAL_HOST
with AC_CANONICAL_SYSTEM. Remove AC_CANONICAL_BUILD.
* libc/locale/locale.c (_setlocale_r): Add UTF-8 support.
* libc/stdlib/mbtowc_r.c (_mbtowc_r): Likewise.
* libc/stdlib/wctomb_r.c (_wctomb_r): Likewise.
* testsuite: New directory.
* testsuite/config: Likewise.
* testsuite/lib: Likewise.
* testsuite/newlib.locale: Likewise.
* testsuite/newlib.string: Likewise.
* testsuite/config/default.exp: New file.
* testsuite/lib/checkoutput.exp: New file.
* testsuite/lib/newlib.exp: New file.
* testsuite/lib/passfail.exp: New file.
* testsuite/newlib.locale/UTF-8.c: New file.
* testsuite/newlib.locale/UTF-8.exp: New file.
* testsuite/newlib.locale/locale.exp: New file.
* testsuite/newlib.string/string.exp: New file.
* testsuite/newlib.string/tstring.c: New file.
2002-04-24 20:53:30 +00:00
Jeff Johnston
afecf2faee
2002-02-27 Jeff Johnston <jjohnstn@redhat.com>
...
* configure.host: Add check for --disable-newlib-io-float
configuration option and add -DNO_FLOATING_POINT to newlib cflags
if appropriate.
* acinclude.m4: Added --disable-newlib-io-float option.
* aclocal.m4: Regenerated.
* configure: Ditto.
* doc/aclocal.m4 doc/configure libc/aclocal.m4 libc/configure
* libc/*/aclocal.m4 libc/*/configure
* libm/*/aclocal.m4 libm/*/configure: Ditto.
* libc/stdio/vfprintf.c [!INTEGER_ONLY]: Only set FLOATING_POINT
if NO_FLOATING_POINT flag is not defined.
2002-02-27 23:56:24 +00:00
Matthew Green
8195aff714
* implement a new `struct _reent' that is significantly smaller. use this
...
if _REENT_SMALL is defined in config.h. define this for xstormy16.
2002-02-03 09:24:18 +00:00
Jeff Johnston
798c015d11
2002-01-11 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/vfscanf.c (__svfscanf_r): Change loop that
reads blanks from the input file to break if EOF reached
rather than end processing.
2002-01-11 22:06:09 +00:00
Thomas Fitzsimmons
fc50413595
* libc/stdlib/Makefile.am (LIB_COMPILE): Change to equal
...
$(COMPILE) rather than $(CC).
* libc/stdio/Makefile.am (LIB_COMPILE): Likewise.
(vfprintf.$(oext)): Remove $(INCLUDES), made redundant by
$(LIB_COMPILE) change.
(vfiprintf.$(oext)): Likewise.
2001-12-18 02:22:55 +00:00
Thomas Fitzsimmons
f85be99c51
(vfiprintf.$(oext)): Likewise.
2001-12-14 19:27:46 +00:00
Thomas Fitzsimmons
cdf7120d2d
* libc/stdio/Makefile.am (vfprintf.$(oext)): Add $(INCLUDES) to
...
compile line.
2001-12-14 19:14:27 +00:00
Thomas Fitzsimmons
2e1a71756e
* Makefile.shared: New file.
...
* libc/sys/linux/shared.ld: New file.
* libm/machine/*: New files.
* libm/machine/i386/*: New files.
* Makefile.am: Add libtool support. Change math and mathfp
references to variables.
* configure.host: Add variables for libtool support. Add
libm_machine_dir variable.
* configure.in: Add objectlist variables, for libtool
support. Add CC_FOR_BUILD tests.
* libc/Makefile.am: Add libtool support. Change crt0.o
reference to be a variable reference.
* libc/configure.in: Add libtool support. Change sublib
names to be lib${subdir}.la when using libtool.
* libc/ctype/Makefile.am: Add libtool support.
* libc/errno/Makefile.am: Likewise.
* libc/locale/Makefile.am: Likewise.
* libc/machine/Makefile.am: Likewise.
* libc/machine/configure.in: Likewise.
* libc/machine/i386/Makefile.am: Likewise.
* libc/machine/i386/configure.in: Likewise.
* libc/misc/Makefile.am: Likewise.
* libc/posix/Makefile.am: Likewise.
* libc/reent/Makefile.am: Likewise.
* libc/signal/Makefile.am: Likewise.
* libc/stdio/Makefile.am: Likewise.
* libc/stdlib/Makefile.am: Likewise.
* libc/string/Makefile.am: Likewise.
* libc/sys/Makefile.am: Likewise.
* libc/sys/configure.in: Likewise.
* libc/sys/linux/Makefile.am: Add libtool support. Change
awk reference to a variable reference. Change signal.h
reference to a variable reference.
* libc/sys/linux/configure.in: Add libtool support.
* libc/syscalls/Makefile.am: Likewise.
* libc/time/Makefile.am: Likewise.
* libc/unix/Makefile.am: Likewise.
* libm/Makefile.am: Add libtool support. Change math and
mathfp references to variables.
* libm/configure.in: Add libtool support. Add
LIBM_MACHINE_LIB variable.
* libm/common/Makefile.am: Add libtool support.
* libm/math/Makefile.am: Likewise.
* libm/mathfp/Makefile.am: Likewise.
Regenerate all Makefile.in, aclocal.m4, and configure.
2001-12-13 23:50:11 +00:00
Jeff Johnston
d0504c353f
2001-10-24 Christopher Faylor <cgf@redhat.com>
...
* libc/stdio/fseek.c: Reset pointer to buffer base
when forced to seek outside of current buffer contents.
This prevents the code from erroneously thinking there is
anything in the current buffer.
2001-10-24 18:10:30 +00:00
Jeff Johnston
5665b0e1d0
2001-10-01 Charles Wilson <cwilson@ece.gatech.edu>
...
* libc/include/stdlib.h: add declarations for
_strtoull_r, _strtoll_r, strtoull, and strtoll.
* libc/stdio/local.h: remove declarations of
__strtoull_r and __strtoll_r.
* libc/stdio/vfscanf.c(__svfscanf_r): call
_strtoull_r instead of __strtoull_r. Ditto
_strtoll_r vs. __strtoll_r.
* libc/stdlib/Makefile.am: add new files to
.c list and .def list
* libc/stdlib/Makefile.in: regenerate
* libc/stdlib/strtoll_r.c: rename __strtoll_r
as _strtoll_r
* libc/stdlib/strtoull_r.c: rename __strtoull_r
as _strtoull_r
* libc/stdlib/strtoull.c: new file
* libc/stdlib/strtoll.c: new file
2001-10-01 18:05:11 +00:00
Jeff Johnston
7a2afbbb85
2001-09-13 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdlib/Makefile.am: Add support to build strtoll_r.c
and strtoull_r.c.
* libc/stdlib/Makefile.in: Regenerated.
* libc/stdlib/strtoll_r.c: New file.
* libc/stdlib/strtoull_r.c: New file.
* libc/stdio/local.h: Add prototypes for long long string
conversion routines.
* libc/stdio/vfscanf.c (__svfscanf_r): Add optional long long support
tied to %L integer conversion specifier.
2001-09-13 21:12:33 +00:00
Nick Clifton
188bc140c0
Handle printf ("%#.0o",0);
2001-05-28 18:22:44 +00:00
Jeff Johnston
b09e3cf8fd
2001-05-01 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/findfp (__sinit)[HAVE_FCNTL]: For platforms that have
real file systems, let __smakebuf() determine if line buffering
should be used for stdout.
2001-05-01 18:18:25 +00:00
Jeff Johnston
0ca6697493
2001-04-27 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/vfscanf.c (__svfscanf_r): Initialize new_exp local var.
2001-04-27 21:59:44 +00:00
Jeff Johnston
a874cd21de
2001-04-24 Charles Wilson <cwilson@ece.gatech.edu
...
* libc/stdio/vprintf.c (vprintf): fix signature to use _DEFUN
* libc/stdio/vprintf.c (_vprintf_r): new function
* libc/stdio/vsnprintf.c (vsnprintf): fix signature to use _DEFUN
* libc/stdio/vsnprintf.c (_vsnprintf_r): fix signature to use
_DEFUN, and call _vfprintf_r, not vfprintf.
* libc/stdio/vsprintf.c (vsprintf.c): fix signature to use _DEFUN
* libc/stdio/vsprintf.c (_vsprintf_r): fix signature to use
_DEFUN, and call _vfprintf_r, not vfprintf.
2001-04-24 22:09:21 +00:00
Jeff Johnston
52cb9e6934
2001-04-20 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/stdio.h[!_REENT_ONLY]: Moved various functions together
into one list.
[!__STRICT_ANSI__]: Moved non-ANSI I/O functions in this list.
(vfscanf, vscanf, vsscanf, _vfscanf_r, _vscanf_r, _vsscanf_r): New
function prototypes.
(_fscanf_r, _sscanf_r): Ditto.
* libc/include/stdlib.h: Added _strtod_r prototype.
* libc/stdio/Makefile.am: Add new v*scanf functions.
* libc/stdio/Makefile.in: Regenerate.
* libc/stdio/fscanf.c: Reorganized so HAVE_STDC only affects prototype
and code is shared. Added reentrant _fscanf_r which calls __svfscanf_r. * libc/stdio/scanf.c: Changed to call __svfscanf_r.
* libc/stdio/sscanf.c: Changed documentation to add reentrant routines.
(sscanf): Changed to call __svfscanf_r with _REENT argument.
(_sscanf_r): New routine.
* libc/stdio/local.h: Removed __svfscanf prototype and replaced it
with __svfscanf_r prototype.
* libc/stdio/vfscanf.c (vfscanf, _vfscanf_r: New
routines.
(__svfscanf_r): Reentrant version of __svfscanf which takes reetrancy
structure as argument as calls reentrant versions of helper functions
(e.g. _strtol_r, _strtoul_r). Also replaced calls to atol and atof
to _strtol_r and _strtod_r respectively.
* libc/stdio/vfscanf.c: Also changed __svfscanf to call __svfscanf_r.
* libc/stdlib/strtod.c (strtod): Changed to call _strtod_r with
_REENT argument.
* libc/stdio/vscanf.c: New file.
* libc/stdio/vsscanf.c: Ditto.
2001-04-20 22:50:51 +00:00
Alexandre Oliva
6f637037e5
* libc/stdio/vfprintf.c (QUADINT) [_NO_LONGLONG]: Make it
...
equivalent to LONGINT.
2001-03-13 09:42:52 +00:00
Jeff Johnston
cfc05d9675
Mon Mar 5 21:48:54 2001 J"orn Rennecke <amylaar@redhat.com>
...
* libc/include/sys/config.h (_READ_WRITE_RETURN_TYPE): Define.
For RTEMS, define to be ssize_t. Default to int if not defined.
* libc/stdio/sscanf.c (eofread): Return _READ_WRITE_RETURN_TYPE.
* libc/stdio/stdio.c (__sread, __swrite): Likewise.
* libc/stdio/local.h (__sread, __swrite): Likewise.
* libc/include/sys/reent.h (_read, _write): Likewise.
* libc/include/sys/unistd.h (read, write, _read, _write): Likewise.
* libc/syscalls/sysread.c (read): Likewise.
* libc/syscalls/syswrite.c (write): Likewise.
2001-03-06 01:04:43 +00:00
Jeff Johnston
ee37ede1d3
2001-02-22 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/machine/setjmp-dj.h: With DJ Delorie's permission,
changed the copyright information to allow free modification of the
file with no reference to "copying.dj".
* libc/include/sys/stat-dj.h: Ditto.
* libc/machine/i386/setjmp.S: Ditto.
* libc/sys/h8300hms/sys/file.h: Ditto.
* libc/sys/sysmec/access.c: Ditto.
* libc/sys/sysnecv850/access.c: Ditto.
* libc/stdio/mktemp.c: Fixed typo for the word copyright.
* libc/stdlib/getenv_r.c: Ditto.
* libc/stdlib/putenv_r.c: Ditto.
* libc/stdlib/setenv_r.c: Ditto.
* libc/stdlib/getenv.c: Removed DJ reference since any possible
modifications will now be in the _r version of this file.
* libc/stdlib/putenv.c: Ditto.
* libc/stdlib/setenv.c: Ditto.
* libc/sys/go32/copying.dj: Removed DJ's address which is no longer
valid. Added a reference to DJ's web page that contains his address.
* libc/sys/go32/*.s: Removed references to DJ's old address.
* libc/sys/go32/*.c: Ditto.
* libc/sys/go32/*.h: Ditto.
* libc/sys/go32/*.S: Ditto.
* libc/sys/go32/sys/*.h: Ditto.
2001-02-22 22:12:43 +00:00
Jeff Johnston
3a8fc0e4f1
2001-02-21 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/fdopen.c (fdopen): Protect calls to _fcntl() with
HAVE_FCNTL flag check.
* configure.host: Define HAVE_FCNTL for Cygwin, go32, RTEMS, sparc64,
powerpcle, x86 netware, x86 sco, x86 Linux and Vxworks.
2001-02-21 23:11:06 +00:00
Jeff Johnston
e9cd87b82a
2001-01-23 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/vfprintf.c (_VFPRINTF_R): Modification to fix
that suppressed . for %.0f, 0.1. Check now looks if there
are padding zeroes (expt) in addition to any digits (ndig) to
print.
2001-01-23 19:49:09 +00:00
Jeff Johnston
b6182a09dd
2000-12-13 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdlib/ldtoa.c (_ldcheck): New routine
that categorizes a long double as NaN, Infinity, or other.
* libc/stdio/vfprintf.c [WANT_IO_LONG_DBL](_VFPRINTF_R): Removed
isinfl and isnanl static routines which were i386-specific. Changed
calls to the two removed routines to a single _ldcheck call.
* libc/stdio/vfieeefp.h (ldieee): Fixed missing semi-colons.
2000-12-14 00:25:06 +00:00
Jeff Johnston
b294082c46
2000-12-07 Jay Kulpinski <jskulpin@eng01.gdds.com>
...
* libc/stdio/vfprintf.c: Minor modification to avoid requiring
a floating point register unless really printing a floating
point number.
2000-12-08 00:27:39 +00:00
Jeff Johnston
9f6e8f1b7f
2000-12-06 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/vfscanf.c: Fix typo for _NO_LONGDBL macro.
2000-12-07 00:17:20 +00:00
Jeff Johnston
6bdac416e9
2000-12-06 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdlib/Makefile.am: Added ldtoa.c to list of sources.
* libc/stdlib/Makefile.in: Regenerated.
* libc/stdio/floatio.h: Added suitable MAXEXP for long double.
* libc/stdio/vfieeefp.h: Added long double bit structures.
* libc/stdio/vfprintf.c[WANT_IO_LONG_DBL]: Added long double support.
[WANT_IO_LONG_DBL](isinfl, isnanl): New static long double routines.
(exponent): Changed expbuf to reasonable maximum instead of MAXEXP.
* libc/stdio/vfscanf.c[WANT_IO_LONG_DBL]: Added long double support.
* libc/stdlib/ldtoa.c: New file containing _ldtoa_r and
_strtold routines used for conversions between character
and long double.
2000-12-06 23:50:11 +00:00
Jeff Johnston
199359f062
2000-08-23 Werner Almesberger <Werner.Almesberger@epfl.ch>
...
* libc/stdlib/abort.c: changed description: uses "raise" instead of
"getpid" and "kill"; added: uses "write" and "_exit".
Also included unistd.h for "_exit" prototype.
* libc/stdlib/system.c: included unistd.h for "execve" prototype,
reent.h for "_fork_r" and "_wait_r" prototypes.
(do_system): changed extern char *environ[] to POSIX-friendly
extern char **environ.
* libc/stdlib/wctomb_r.c: included string.h for "strlen" and "strcmp"
prototypes.
* libc/stdlib/remove.c: included reent.h for "_unlink_r" prototype.
* libc/reent/execr.c: included sys/wait.h for "wait" prototype.
* libc/reent/fstatr.c: included sys/stat.h for "fstat" prototype.
* libc/reent/openr.c: included fcntl.h for "open" prototype.
* libc/reent/signalr.c: included signal.h for "kill" prototype,
unistd.h for "getpid" prototype.
* libc/reent/statr.c: included sys/stat.h for "stat" prototype.
* libc/reent/timer.c: included sys/time.h for "gettimeofday" prototype.
* libc/unix/getut.c (utmpname): removed local, incorrect "strdup"
prototype. Also included stdlib.h for "abort", string.h for
"strdup" and "strncmp" prototypes.
* libc/unix/getlogin.c: included string.h for "strncmp", "memset", and
"strncpy", unistd.h for "read" and "close" prototypes.
* libc/posix/execvp.c: included string.h for "strchr", "strlen", and
"strcat" prototypes.
2000-08-24 18:51:09 +00:00
Jeff Johnston
0888fedd86
2000-08-23 Werner Almesberger <Werner.Almesberger@epfl.ch>
...
* libc/stdio/stdio.c (__swrite): declare "oldmode" only if it's
used later (ifdef __SCLE)
* libc/stdio/vfscanf.c (__svfscanf): declare "state" only if it's
used later (ifdef MB_CAPABLE)
* libc/string/memset.c (memset): removed unused variables "count"
and "unaligned_addr"
* libc/locale/locale.c (_setlocale_r): declare "lc_ctype" and
"last_lc_ctype" only of they're used later (ifdef MB_CAPABLE)
* libc/unix/getpwent.c (getpwnam): removed unused variables "uid"
and "gid"
2000-08-24 16:25:36 +00:00
Jeff Johnston
5bacbf109f
2000-08-16 Eric Fifer <efifer@sanwaint.com>
...
* libc/stdio/vfprintf.c (_vfprintf_r): suppress . with "%.0f", 0.1
2000-08-16 18:30:40 +00:00
Jeff Johnston
befe0fb3e1
2000-08-08 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/snprintf.c (snprintf, _snprintf_r): Fixed code
so size of 0 results in nothing being written to string.
Also fixed code so that when size is non-zero, there is only
a maximum of size - 1 characters written to the array and
a nul terminator is appended at the end.
* libc/stdio/vsnprintf.c (vsnprintf, _vsnprintf_r): Ditto.
2000-08-08 19:01:02 +00:00
DJ Delorie
91a8d90bab
* libc/stdio/vfprintf.c: pad 0.0 correctly with %e
2000-07-13 18:51:11 +00:00
Corinna Vinschen
01c327ba27
* libc/stdio/fdopen.c (_fdopen_r): Take explicit given
...
bin/textmode into account for Cygwin.
2000-06-14 22:25:46 +00:00
DJ Delorie
c4e1aa0115
* libc/stdio/stdio.c (__stextmode): new, see if file is text mode
...
(__sread): always read in binary mode
(__swrite): always write in binary mode
* libc/include/stdio.h: no getc/putc macros for cygwin; causes
compatibility issues with different dll versions
* libc/stdio/fopen.c: use __stextmode
* libc/stdio/fdopen.c: ditto
* libc/stdio/freopen.c: ditto
* libc/stdio/findfp.c: set up __SCLE for std{in,out,err}
* libc/stdio/local.h: declare __stextmode
2000-05-23 23:51:54 +00:00
DJ Delorie
f43932615d
* libc/stdio/fgets.c (fgets): perform CRLF conversions if __SCLE
2000-05-18 19:03:10 +00:00
Jeff Johnston
49d64538cd
Tue May 02 23:45:48 2000 DJ Delorie <dj@cygnus.com>
...
* libc/include/stdio.h (FILE): define __SCLE for "convert line
endings" for Cygwin.
(__sgetc): convert line endings if needed
(__sputc): ditto
* libc/stdio/fdopen.c (_fdopen_r): Remember if we opened in text mode
* libc/stdio/fopen.c (_fopen_r): ditto
* libc/stdio/freopen.c (freopen): ditto
* libc/stdio/fread.c (fread): perform CRLF conversions if __SCLE
* libc/stdio/fvwrite.c (__sfvwrite): ditto
2000-05-03 03:57:19 +00:00
Jeff Johnston
c87be3e4d6
Mon Apr 17 12:46:00 2000 Marek Michalkiewicz <marekm@linux.org.pl>
...
* libc/signal/signal.c (_signal_r) : Removed unused local variable temp. * libc/stdio/findfp.c (std): Added declaration of flags and file.
* libc/stdio/mktemp.c (_gettemp, _mkstemp_r, mkstemp): Added int
return type.
* libc/stdio/putchar.c (putchar): Added return statement.
* libc/stdio/refill.c (lflush): Added correct parentheses.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Ditto.
* libc/stdio/vfscanf.c (__svfscanf): Changed sprintf call which
prints long value to use l qualifier.
* libc/stdlib/dtoa.c (_dtoa_r): Added parentheses to remove warning
messages and initialized local values: ilim, ilim1, and spec_case.
* libc/stdlib/ecvtbuf.c (print_e): Removed unused variable dp.
* libc/stdlib/mbctype.h (_issjis1, _issjis2): Added parentheses.
* libc/stdlib/mprec.c: Ditto.
* libc/stdlib/setenv_r.c: Ditto.
* libc/stdlib/strtod.c: Ditto.
* libc/stdlib/strtol.c: Ditto.
* libc/stdlib/strtoul.c: Ditto.
* libm/common/sf_expm1.c: Added curly braces to if else clauses.
* libm/common/sf_log1p.c: Ditto.
* libm/common/sf_scalbn.c: Ditto.
* libm/math/ef_log.c: Ditto.
2000-04-17 17:10:18 +00:00
Jeff Johnston
fae4c299f1
Fri Mar 17 15:37:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
...
* libc/stdio/vfscanf.c (__svfscanf): Fixed floating point
code to update nread as each character is processed instead
of using buffer contents which throw away leading zeroes.
2000-03-17 20:40:20 +00:00
Alexandre Oliva
1cf0ee341f
* libc/stdio/putw.c (putw): Return 0 on success, to be compliant
...
with XSH5, not SVID.
2000-03-10 17:57:32 +00:00
Alexandre Oliva
c505305855
* libc/stdio/Makefile.am (lib_a_SOURCES): Added getw.c and putw.c.
...
(CHEWOUT_FILES): Added getw.def and putw.def.
* libc/stdio/Makefile.in: Rebuilt.
* libc/stdio/stdio.tex: Include getw.def and putw.def.
* libc/stdio/getw.c: New file.
* libc/stdio/putw.c: New file.
2000-03-08 03:42:25 +00:00
Jeff Johnston
dbaf37cf83
Fri Feb 25 14:50:50 2000 Jeff Johnston <jjohnstn@cygnus.com>
...
* libc/stdio/flags.c (__sflags): Added check that mode[1]
is non-null before looking at mode[2].
2000-02-25 19:52:27 +00:00
Jeff Johnston
b0ba0ac217
Mon Feb 21 11:43:50 2000 Jeff Johnston <jjohnstn@cygnus.com>
...
* libc/stdio/vfprintf.c (VFPRINTF): Added CHECK_INIT
call prior to calling _VFPRINTF_R so reentrant data area is set.
(_VFPRINTF_R): Removed now extraneous CHECK_INIT call.
2000-02-21 16:59:23 +00:00
Christopher Faylor
8a0efa53e4
import newlib-2000-02-17 snapshot
2000-02-17 19:39:52 +00:00