summaryrefslogtreecommitdiffstats
path: root/newlib/libc
Commit message (Collapse)AuthorAgeFilesLines
* 2007-06-20 Patrick Mansfield <patmans@us.ibm.com>Jeff Johnston2007-06-201-1/+14
| | | | | * libc/machine/spu/perror.c: Pass errno as the second argument to the assist call.
* 2007-06-20 Patrick Mansfield <patmans@us.ibm.com>Jeff Johnston2007-06-201-4/+13
| | | | | * libc/include/sys/unistd.h[__SPU__]: Add lockf prototype and related defines; expose ftruncate, truncate and sync prototypes.
* 2007-06-20 Patrick Mansfield <patmans@us.ibm.com>Jeff Johnston2007-06-202-2/+2
| | | | | | * libc/include/sys/unistd.h[__SPU__]: Make fchdir prototype visible. * libc/include/sys/stat.h[__SPU__]: Make mknod and lstat prototypes visible.
* 2007-06-15 Patrick Mansfield <patmans@us.ibm.com>Jeff Johnston2007-06-152-35/+28
| | | | | | * libc/machine/spu/Makefile.am: Remove mktemp.c, it was left in from a dropped patch. * libc/machine/spu/Makefile.in: Regenerate.
* 2007-06-13 Patrick Mansfield <patmans@us.ibm.com>Jeff Johnston2007-06-133-43/+65
| | | | | | | * libc/machine/spu/creat.c: New file copied from libc/posix/creat.c, it just calls open with appropriate arguments. * libc/machine/spu/Makefile.am: Add creat.c. * libc/machine/spu/Makefile.in: Regenerate.
* 2007-06-13 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2007-06-132-44/+57
| | | | | | * libc/machine/spu/Makefile.am: Re-add back setjmp.S which I accidentally dropped. * libc/machine/spu/Makefile.in: Regenerated.
* 2007-06-13 Patrick Mansfield <patmans@us.ibm.com>Jeff Johnston2007-06-136-350/+402
| | | | | | | | | | * libc/include/sys/features.h: Define _POSIX_TIMERS for spu. * libc/include/sys/unistd.h: Change usleep prototype to Posix form and move outside of OS flag checks. * libc/machine/spu/Makefile.am: Add sleep and usleep. * libc/machine/spu/Makefile.in: Regenerate. * libc/machine/spu/sleep.c: Copy libc/posix/sleep.c. * libc/machine/spu/usleep.c: Copy libc/posix/usleep.c.
* * libc/include/sys/unistd.h: Declare confstr for Cygwin.Corinna Vinschen2007-06-111-0/+44
| | | | Define confstr constants for Cygwin. Add comment.
* * libc/sys/mmixware/access.c (access): Do not try to use a magicHans-Peter Nilsson2007-06-103-14/+11
| | | | | | | | | file-handle and a direct syscall, just use _open. * libc/sys/mmixware/sys/syscall.h (TMPFNO): Remove this magic file-handle. * libc/sys/mmixware/_exit.c (_exit): Update comment about passing on the exit value.
* 2007-06-08 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2007-06-085-5/+118
| | | | | | | | * libc/string/strcasestr.c: New file. * libc/include/string.h: Add strcasestr. * libc/string/strings.tex: Add strcasestr. * libc/string/Makefile.am: Ditto. * libc/string/Makefile.in: Regenerated.
* 2007-06-06 Christian Groessler <chris@groessler.org>Jeff Johnston2007-06-062-6/+10
| | | | | | | | | * libc/stdlib/ldtoa (_ldcheck): Make sure the setting of rnd is done after the last local variable declaration. 2007-06-06 Jeff Johnston <jjohnstn@redhat.com> * libc/stdlib/mprec.h[Just_16]: Make sure that Pack_16 is defined.
* 2007-06-05 Christian Groessler <chris@groessler.org>Jeff Johnston2007-06-051-1/+2
| | | | | * libc/argz/argz_insert.c (delta): Move variable declaration to top of function in keeping with C89 standard.
* Implement funopen, fopencookie.Eric Blake2007-06-0424-143/+744
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Avoid more compiler warnings.Eric Blake2007-05-296-3/+6
| | | | | | | | | * libc/stdlib/btowc.c: Add missing header. * libc/stdlib/getopt.c (getopt_internal): Initialize variable. * libc/stdlib/system.c (do_system) [__CYGWIN__]: Add declaration. * libc/stdlib/wctob.c: Add missing header. * libc/string/strcpy.c (strcpy): Avoid warnings. * libc/string/strrchr.c (strrchr): Likewise.
* * libc/argz/argz_add_sep.c (argz_add_sep): Handle empty stringCorinna Vinschen2007-05-295-23/+38
| | | | | | | | | | argument. * libc/argz/argz_append.c (argz_append): Handle empty buf argument. * libc/argz/argz_create_sep.c (argz_create_sep): Return (NULL, 0) on empty input strings. * libc/argz/argz_extract.c (argz_extract): Check argz_len before looping through argz. * libc/argz/argz_stringify.c (argz_stringify): Ditto.
* * libc/stdio/vfprintf.c (_VFPRINTF_R): Populate 'ox' whenEric Blake2007-05-271-1/+2
| | | | handling %p.
* * libc/stdio/rewind.c (rewind): Fix regression of 2003-08-22.Eric Blake2007-05-251-1/+1
|
* * ltmain.sh: Update from GCC.Steve Ellcey2007-05-24194-5014/+71762
| | | | | | | | | | | | | | | * 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
* * libc/stdio/vfprintf.c (_VFPRINTF_R): Don't truncate %p whenEric Blake2007-05-242-50/+135
| | | | | | | | 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-23 Patrick Mansfield <patmans@us.ibm.com>Jeff Johnston2007-05-2344-195/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libc/machine/spu/sys/syscall.h: Update the __send_to_ppe prototype. * libc/machine/spu/fclose.c: Use the __send_to_ppe return value instead of the slot 0 value, remove any now unused variables, and for some cases, now store the result in an int vs int*. * libc/machine/spu/feof.c: Ditto. * libc/machine/spu/ferror.c: Ditto. * libc/machine/spu/fflush.c: Ditto. * libc/machine/spu/fgetc.c: Ditto. * libc/machine/spu/fgetpos.c: Ditto. * libc/machine/spu/fgets.c: Ditto. * libc/machine/spu/fileno.c: Ditto. * libc/machine/spu/fopen.c: Ditto. * libc/machine/spu/fprintf.c: Ditto. * libc/machine/spu/fputc.c: Ditto. * libc/machine/spu/fputs.c: Ditto. * libc/machine/spu/fread.c: Ditto. * libc/machine/spu/freopen.c: Ditto. * libc/machine/spu/fscanf.c: Ditto. * libc/machine/spu/fseek.c: Ditto. * libc/machine/spu/fsetpos.c: Ditto. * libc/machine/spu/ftell.c: Ditto. * libc/machine/spu/fwrite.c: Ditto. * libc/machine/spu/getc.c: Ditto. * libc/machine/spu/getchar.c: Ditto. * libc/machine/spu/gets.c: Ditto. * libc/machine/spu/printf.c: Ditto. * libc/machine/spu/putc.c: Ditto. * libc/machine/spu/putchar.c: Ditto. * libc/machine/spu/puts.c: Ditto. * libc/machine/spu/remove.c: Ditto. * libc/machine/spu/rename.c: Ditto. * libc/machine/spu/scanf.c: Ditto. * libc/machine/spu/setvbuf.c: Ditto. * libc/machine/spu/snprintf.c: Ditto. * libc/machine/spu/sprintf.c: Ditto. * libc/machine/spu/sscanf.c: Ditto. * libc/machine/spu/tmpfile.c: Ditto. * libc/machine/spu/tmpnam.c: Ditto. * libc/machine/spu/ungetc.c: Ditto. * libc/machine/spu/vfprintf.c: Ditto. * libc/machine/spu/vfscanf.c: Ditto. * libc/machine/spu/vprintf.c: Ditto. * libc/machine/spu/vscanf.c: Ditto. * libc/machine/spu/vsnprintf.c: Ditto. * libc/machine/spu/vsprintf.c: Ditto. * libc/machine/spu/vsscanf.c: Ditto.
* * libc/stdio/vfscanf.c (__SVFSCANF_R): Support scanf(%1$s).Eric Blake2007-05-232-43/+109
| | | | | | Avoid warning when !FLOATING_POINT. * libc/stdio/vfprintf.c (_VFPRINTF_R): Simplify _NO_POS_ARGS slightly.
* * libc/argz/argz_create_sep.c (argz_create_sep): Initialize *argz_lenCorinna Vinschen2007-05-232-0/+12
| | | | | | to zero. * libc/include/argz.h: Guard against multiple inclusion. Guard for use with C++.
* * libc/stdio/vfprintf.c [_WANT_IO_LONG_LONG]: Allow non-gccEric Blake2007-05-182-2/+4
| | | | | compilers. * libc/stdio/vfscanf.c: Likewise.
* 2007-05-17 Yaakov Selkowitz <yselkowitz <at> users.sourceforge.net>Jeff Johnston2007-05-171-0/+16
| | | | | | | | | | | | | | * libm/common/Makefile.am: Add support for exp10, exp10f, pow10, and pow10f functions. * libm/common/Makefile.in: Regenerated. * libm/common/s_pow10.c: New file. * libm/common/sf_pow10.c: Ditto. * libm/common/s_exp10.c: Ditto. * libm/common/sf_exp10.c: Ditto. * libc/include/math.h [!pow10]: New pow10 prototype. [!pow10f]: New pow10f prototype. [!exp10]: New exp10 prototype. [!exp10f]: New exp10f prototype.
* * stdio/tmpfile.c: Include <sys/stat.h>.Eric Blake2007-05-172-0/+2
| | | | * stdio64/tmpfile64.c: Ditto.
* Close security hole in tmpfile.Eric Blake2007-05-162-7/+38
| | | | | | * libc/stdio/tmpfile.c (_tmpfile_r): Avoid window between filename generation and opening the fd. * libc/stdio64/tmpfile64.c (_tmpfile64_r): Likewise.
* * libc/include/math.h (INFINITY, NAN, FP_ILOGB0, FP_ILOGBNAN)Eric Blake2007-05-162-49/+68
| | | | | | | (MATH_ERRNO, MATH_ERREXCEPT, math_errhandling): Add macros required by POSIX. * libc/stdlib/ldtoa.c (USE_INFINITY): Rename from INFINITY, to avoid clash with <math.h>.
* * libc/stdlib/wctomb_r.c (_wctomb_r): Avoid gcc warnings on cygwin.Eric Blake2007-05-162-2/+10
| | | | * libc/search/hash.c (__hash_open): Likewise.
* Reduce stack size of *printf.Eric Blake2007-05-141-103/+84
| | | | | | | | * 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.
* Minimize printf/scanf size on platforms that don't need C99.Eric Blake2007-05-112-55/+115
| | | | | | | | | | | | | * 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.
* * libc/stdio/vfprintf.c (_VFPRINTF_R, cvt, exponent, chclass)Eric Blake2007-05-111-84/+143
| | | | (get_arg): Support '%a' and '%A'.
* Allow zero size with non-null buf in *asnprintf.Eric Blake2007-05-094-0/+6
| | | | | | | | * 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.
* * libc/stdio/vfprintf.c: Fix typo in comments that breaks docs.Eric Blake2007-05-081-1/+1
|
* Add support for asnprintf, and improve *printf documentation.Eric Blake2007-05-0425-690/+1230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * libc/machine/m68k/Makefile.am (lib_a_SOURCES): Add memcpy.SKazu Hirata2007-05-034-5/+20
| | | | | | | and memset.S. * libc/machine/m68k/Makefile.in: Regenerate. * libc/machine/m68k/memcpy.S: Use sub.l followed by dbra. * libc/machine/m68k/memset.S: Likewise.
* * libc/stdio64/local64.h: Delete, move contents to...Eric Blake2007-05-0111-44/+54
| | | | | | | | | | | | | | * 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-04-27 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2007-04-272-16/+3
| | | | | | | * libc/machine/m68k/Makefile.am: Temporarily remove memcpy.S and memset.S until logic can be confirmed for !(__mcoldfile__) case. * libc/machine/m68k/Makefile.in: Regenerated.
* 2007-04-27 Kazu Hirata <kazu@codesourcery.com>Jeff Johnston2007-04-274-3/+206
| | | | | | | * libc/machine/m68k/Makefile.am (lib_a_SOURCES): Add memcpy.S and memset.S. * libc/machine/m68k/Makefile.in: Regenerate. * libc/machine/m68k/memcpy.S, libc/machine/m68k/memset.S: New.
* 2007-04-26 Patrick Mansfield <patmans@us.ibm.com>Jeff Johnston2007-04-263-7/+42
| | | | | | | | | | | | | | | | | | * libc/include/ieeefp.h: use prefixed __ieeefp_ macros that can be overridden via machine/ieeefp.h. * libc/include/machine/ieeefp.h: Add SPU specific C99 and ieeefp macros for isnan and related macros. * libc/include/math.h: Allow C99 isfinite, isinf, and isnan to be overridden via machine/ieeefp.h. * libm/machine/spu/Makefile.am: Add new files. * libm/machine/spu/Makefile.in: Autogenerate with new files. * libm/machine/spu/sf_fpclassify.c: Add SPU specific __fpclassifyf. * libm/machine/spu/sf_finite.c: Add SPU specific finitef. * libm/machine/spu/sf_isinf.c: Add SPU specific isinff. * libm/machine/spu/sf_isinff.c: Add SPU specific __isinff. * libm/machine/spu/sf_isnan.c: Add SPU specific isnanf. * libm/machine/spu/sf_isnanf.c: Add SPU specific __isnanf. * libm/machine/spu/sf_nan.c: Add SPU specific nanf.
* 2007-04-25 Patrick Mansfield <patmans@us.ibm.com>Jeff Johnston2007-04-251-0/+185
| | | | | | * libc/machine/spu/sys/errno.h: New file, so spu errno values match ppu linux values. This file is a copy of the cris/sys/errno.h plus a few changes (see spu errno.h comments).
* 2007-04-25 Eric Blake <ebb9@byu.net>Jeff Johnston2007-04-251-28/+9
| | | | | * libc/stdio/vfprintf.c (get_arg): Support %1$lc. Simplify types that promote to int.
* * libc/stdio/vfprintf.c (_VFPRINTF_R): Don't zero pad on infinityEric Blake2007-04-241-2/+11
| | | | or NaN with %05f.
* * libc/stdio/vfprintf.c (_VFPRINTF_R): Avoid multibyte when notEric Blake2007-04-241-14/+19
| | | | _MB_CAPABLE.
* * libc/include/limits.h (NL_ARGMAX): Define a default value.Eric Blake2007-04-242-2/+10
| | | | | * libc/stdio/vfprintf.c (MAX_POS_ARGS): Define in terms of NL_ARGMAX, if present.
* 2007-04-23 Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de>Jeff Johnston2007-04-2349-141/+267
| | | | | | | | | | | | | | | * 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 Brian Dessent <brian@dessent.net>Jeff Johnston2007-04-231-1/+1
| | | | | | * 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 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2007-04-233-5/+51
| | | | | | | * libc/sys/arc/dummy.S: Dummy file to force .S.o suffix rule. * libc/sys/arc/Makefile.am: Add dummy.S to EXTRA_lib_a_SOURCES and set lib_a_CCASFLAGS so crto.o will use .S.o default suffix rule. * libc/sys/arc/Makefile.in: Regenerated.
* 2007-04-17 Brian Dessent <brian@dessent.net>Jeff Johnston2007-04-172-4/+58
| | | | | * libc/stdio/sscanf.c: Update documentation comments. * libc/stdio/vfscanf.c (__SVFSCANF_R): Handle j, t, and z modifiers.
* * libc/stdio/vfprintf.c (_VFPRINTF_F, cvt): Don't confuse %F with %e.Eric Blake2007-04-131-12/+17
| | | | | (chclass): Recognize 'F', 'X', 'n', and not 'W'. (get_arg): Handle %1$F, %1$n.
* * libc/include/stdio.h (_ELIDABLE_INLINE): Work even when usingEric Blake2007-04-101-1/+1
| | | | CFLAGS=-O0.