summaryrefslogtreecommitdiffstats
path: root/newlib
Commit message (Collapse)AuthorAgeFilesLines
* Support __func__ in assert, as required by C99.Eric Blake2007-06-273-24/+57
| | | | | | | * libc/stdlib/assert.c (__assert_func): New function. (__assert): Use __assert_func. * libc/include/assert.h (assert) [!NDEBUG]: Use __assert_func when possible.
* 2007-06-20 Patrick Mansfield <patmans@us.ibm.com>Jeff Johnston2007-06-202-1/+19
| | | | | * 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-202-4/+18
| | | | | * 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-203-2/+8
| | | | | | * 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-153-35/+34
| | | | | | * 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-134-43/+72
| | | | | | | * 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-133-44/+63
| | | | | | * 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-137-350/+412
| | | | | | | | | | * 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-112-0/+49
| | | | Define confstr constants for Cygwin. Add comment.
* * libc/sys/mmixware/access.c (access): Do not try to use a magicHans-Peter Nilsson2007-06-104-14/+21
| | | | | | | | | 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-086-5/+126
| | | | | | | | * 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-063-6/+19
| | | | | | | | | * 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.
* Fix entry to refer to function instead of variable.Jeff Johnston2007-06-051-2/+2
|
* 2007-06-05 Christian Groessler <chris@groessler.org>Jeff Johnston2007-06-052-1/+7
| | | | | * libc/argz/argz_insert.c (delta): Move variable declaration to top of function in keeping with C89 standard.
* Implement funopen, fopencookie.Eric Blake2007-06-0425-143/+781
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-297-3/+16
| | | | | | | | | * 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-296-23/+49
| | | | | | | | | | 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-272-1/+7
| | | | handling %p.
* * libc/stdio/rewind.c (rewind): Fix regression of 2003-08-22.Eric Blake2007-05-252-2/+6
|
* * ltmain.sh: Update from GCC.Steve Ellcey2007-05-24228-8233/+107526
| | | | | | | | | | | | | | | * 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-243-50/+144
| | | | | | | | 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-2345-195/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-233-43/+116
| | | | | | 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-233-0/+19
| | | | | | 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-183-3/+11
| | | | | compilers. * libc/stdio/vfscanf.c: Likewise.
* 2007-05-17 Cary R. <cygcary <at> yahoo.com>Jeff Johnston2007-05-173-52/+6
| | | | | | * libm/math/w_atan2.c: Fix atan2 to be consistent with glibc (atan2(+0,-0), atan2(-0,-0) and atan(-0,+0)) * libm/math/wf_atan2.c: Ditto.
* 2007-05-17 Yaakov Selkowitz <yselkowitz <at> users.sourceforge.net>Jeff Johnston2007-05-178-56/+374
| | | | | | | | | | | | | | * 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-173-0/+7
| | | | * stdio64/tmpfile64.c: Ditto.
* Close security hole in tmpfile.Eric Blake2007-05-163-7/+43
| | | | | | * 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-163-49/+74
| | | | | | | (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-163-2/+15
| | | | * libc/search/hash.c (__hash_open): Likewise.
* Reduce stack size of *printf.Eric Blake2007-05-142-103/+93
| | | | | | | | * 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-118-63/+187
| | | | | | | | | | | | | * 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-112-84/+148
| | | | (get_arg): Support '%a' and '%A'.
* Allow zero size with non-null buf in *asnprintf.Eric Blake2007-05-095-0/+15
| | | | | | | | * 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-082-1/+5
|
* Add support for asnprintf, and improve *printf documentation.Eric Blake2007-05-0426-690/+1268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-035-5/+28
| | | | | | | 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-0112-45/+70
| | | | | | | | | | | | | | * 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 Cary R. <cygcary <at> yahoo.com>Jeff Johnston2007-05-0113-15/+38
| | | | | | | | | | | | | | | | * libm/math/e_pow.c: Fix to be consistent with glibc with regards to treatment of NaN and +-inf arguments. * libm/math/ef_pow.c: Ditto. * libm/math/w_pow.c: Ditto. * libm/math/wf_pow.c: Ditto. * libm/math/w_acos.c: Fix domain errors to return NaN. * libm/math/w_asin.c: Ditto. * libm/math/wf_acos.c: Ditto. * libm/math/wf_asin.c: Ditto. * libm/math/w_log.c: Fix to return NaN for negative number inputs. * libm/math/wf_log.c: Ditto. * libm/math/wf_log10.c: Ditto. * libm/math/w_log10.c: Ditto.
* 2007-04-27 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2007-04-273-16/+10
| | | | | | | * 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-275-3/+213
| | | | | | | * 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-2613-11/+390
| | | | | | | | | | | | | | | | | | * 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 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2007-04-255-30/+53
| | | | | | | * libm/common/s_fpclassify.c (__fpclassifyf): Move this to... * libm/common/sf_fpclassify.c: ...here. New file. * libm/common/Makefile.am: Add sf_fpclassify.c. * libm/common/Makefile.in: Regenerated.
* 2007-04-25 Patrick Mansfield <patmans@us.ibm.com>Jeff Johnston2007-04-252-0/+191
| | | | | | * 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-252-28/+14
| | | | | * libc/stdio/vfprintf.c (get_arg): Support %1$lc. Simplify types that promote to int.
* 2007-04-25 Patrick Mansfield <patmans@us.ibm.com>Jeff Johnston2007-04-252-1/+6
| | | | | * feholdexcept.h: Use *envp not env so we clear the proper bits in the fpscr, and don't set some random ones.
* * libc/stdio/vfprintf.c (_VFPRINTF_R): Don't zero pad on infinityEric Blake2007-04-242-2/+14
| | | | or NaN with %05f.
* * libc/stdio/vfprintf.c (_VFPRINTF_R): Avoid multibyte when notEric Blake2007-04-242-14/+22
| | | | _MB_CAPABLE.
* * libc/include/limits.h (NL_ARGMAX): Define a default value.Eric Blake2007-04-243-2/+22
| | | | | * libc/stdio/vfprintf.c (MAX_POS_ARGS): Define in terms of NL_ARGMAX, if present.