Commit Graph

1131 Commits

Author SHA1 Message Date
Jeff Johnston 364faf910a 2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/sys/uio.h: New file for readv and writev use.
2007-09-21 21:11:14 +00:00
Jeff Johnston 2f3d28fca2 2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/sched.h: New file, just include sys/sched.h.
        * libc/machine/spu/sys/sched.h: New file, has just sched_yield
        prototype.
        * libc/machine/spu/sys/utime.h: New file, has utime prototype and
        struct utimbuf definition.
2007-09-21 21:02:15 +00:00
Jeff Johnston 63fbe1fd64 2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/sys/dirent.h: New file, add prototypes and SPU
        specific struct and typedef.
2007-09-21 20:36:02 +00:00
Jeff Johnston cebf33e402 2007-09-18 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/sys/types.h: Use __dev_t, __uid_t, and __gid_t to
        typedef dev_t, gid_t, and uid_t.
        * libc/include/sys/_types.h: Move previous dev_t, uid_t and gid_t
        types.h code to here, but typedef __dev_t, __uid_t, and __gid_t instead.
        Change to lower case for all __foo_t_defined names.
        * libc/machine/spu/machine/_types.h: Add SPU specific __dev_t,
        __uid_t, and __gid_t making them all four bytes. Change to lower case
        for all __foo_t_defined names.
2007-09-18 20:05:17 +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 e5ae72300f 2007-09-07 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/_types.h: Protect all types with flag
        checks to allow definition in machine/_types.h.
2007-09-07 21:24:55 +00:00
Jeff Johnston 36fe6da675 2007-09-07 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/sys/_types.h: Add _fpos_t and _fpos64_t
        definitions in light of the previous change.
2007-09-07 21:18:03 +00:00
Jeff Johnston dde223343c 2007-09-07 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/machine/_default_types.h: New file, contains what
	was previously in libc/include/machine/_types.h.
	* libc/include/machine/_types.h: Now only includes
	machine/_default_types.h.
	* libc/include/sys/reent.h: Remove _fpos_t and _fpos64_t.
	* libc/include/sys/_types.h: Move _fpos_t and _fpos64_t to here,
	with conditional declarations.
	* libc/machine/spu/machine/_types.h: New file, add SPU specific
	typedefs for _fpos_t and _fpos64_t.
2007-09-07 21:16:25 +00:00
Jeff Johnston 78e66fb978 2007-09-07 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h (_M_LOG2E): Replace with..
        (_M_LOG2_E): New macro.
        (log2, log2f, M_LOG2_E): Use _M_LOG2_E.
2007-09-07 15:30:59 +00:00
Brian Dessent 345c159562 * libc/reent/getreent.c: Allow for case where __getreent is
defined as a macro.
2007-09-07 00:45:55 +00:00
Jeff Johnston e65aa07ac6 Fix typo in ChangeLog and math.h. 2007-09-06 19:55:34 +00:00
Jeff Johnston 6494ee837c 2007-09-06 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h (_M_LOG2E): New log2 of e macro.
        (log2): Use _M_LOG2E instead of M_LOG2E.
        (log2f): Ditto.
        (M_LOG2E): Define to be _M_LOG2E.
2007-09-06 19:51:46 +00:00
Jeff Johnston 86a934d225 2007-09-04 Kazunori Asayama <asayama@sm.sony.co.jp>
* libm/math/wf_tgamma.c: Add missing include.
2007-09-04 17:33:10 +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
Jeff Johnston d4a2788652 2007-08-28 Hans Kester <hans.kester@ellips.nl>
* configure.host: Added support for x86_64.
        * libc/include/machine/ieeefp.h: Define __IEEE_LITTLE_ENDIAN for x86_64.
        * libc/include/machine/setjmp.h: Define _JBTYPE and _JBLEN for x86_64.
        * libc/machine/x86_64/aclocal.m4: Generated.
        * libc/machine/x86_64/configure.in: New.
        * libc/machine/x86_64/configure: Generated.
        * libc/machine/x86_64/Makefile.am: New.
        * libc/machine/x86_64/Makefile.in: Generated.
        * libc/machine/x86_64/setjmp.S: New.
        * libc/machine/x86_64/memcpy.S: New.
        * libc/machine/x86_64/memset.S: New.
        * libc/machine/configure.in: Added support for x86_64.
        * libc/machine/configure: Regenerated.
2007-08-28 21:56:50 +00:00
Jeff Johnston 309faeb5ca 2007-08-24 Jeff Johnston <jjohnstn@redhat.com>
* libm/common/sf_lround.c (lroundf): Cast sizeof calculation
        to int before comparing it to a signed int value.
2007-08-24 20:49:59 +00:00
Hans-Peter Nilsson 8d44415e4f * libc/machine/cris/sys/errno.h (ECANCELED, ENOKEY, EKEYEXPIRED)
(EKEYREVOKED, EKEYREJECTED, EOWNERDEAD, ENOTRECOVERABLE, ENOTSUP):
	Define.
2007-08-23 23:40:28 +00:00
Jeff Johnston e6e56f7c72 2007-08-23 Hidetaka Takano <hidetaka.takano@glb.toshiba.co.jp>
Reduce the memory consumption of variable argument functions
        for SPU (cell):
        * libc/machine/spu/Makefile.am: Replace printf/scanf family C sources
          to assembler sources.
        * libc/machine/spu/Makefile.in: Regenerated.
        * libc/machine/spu/stdio.c: Add __check_init function wrapping
          CHECK_INIT macro to use from assembler routines.
        * libc/machine/spu/c99ppe.h: Add definitions for assembler code.
        * libc/machine/spu/fiprintf.S: New file.
        * libc/machine/spu/fiscanf.S: Ditto.
        * libc/machine/spu/fprintf.S: Ditto.
        * libc/machine/spu/fscanf.S: Ditto.
        * libc/machine/spu/iprintf.S: Ditto.
        * libc/machine/spu/iscanf.S: Ditto.
        * libc/machine/spu/printf.S: Ditto.
        * libc/machine/spu/scanf.S: Ditto.
        * libc/machine/spu/siprintf.S: Ditto.
        * libc/machine/spu/siscanf.S: Ditto.
        * libc/machine/spu/sniprintf.S: Ditto.
        * libc/machine/spu/snprintf.S: Ditto.
        * libc/machine/spu/sprintf.S: Ditto.
        * libc/machine/spu/sscanf.S: Ditto.
        * libc/machine/spu/stack_reg_va.S: Ditto.
        * libc/machine/spu/syscall.def: Ditto. (for maintenance)
        * libc/machine/spu/mk_syscalls: Ditto. (for maintenance)
        * libc/machine/spu/fiprintf.c: Removed. (Replaced by .S)
        * libc/machine/spu/fiscanf.c: Ditto.
        * libc/machine/spu/fprintf.c: Ditto.
        * libc/machine/spu/fscanf.c: Ditto.
        * libc/machine/spu/iprintf.c: Ditto.
        * libc/machine/spu/iscanf.c: Ditto.
        * libc/machine/spu/printf.c: Ditto.
        * libc/machine/spu/scanf.c: Ditto.
        * libc/machine/spu/siprintf.c: Ditto.
        * libc/machine/spu/siscanf.c: Ditto.
        * libc/machine/spu/sniprintf.c: Ditto.
        * libc/machine/spu/snprintf.c: Ditto.
        * libc/machine/spu/sprintf.c: Ditto.
        * libc/machine/spu/sscanf.c: Ditto.
2007-08-23 18:45:22 +00:00
Jeff Johnston 90c6084b56 2007-08-03 Ralf Corsepius <ralf.corsepius@rtems.org>
* libc/include/tar.h: New.
2007-08-03 21:03:40 +00:00
Jeff Johnston 8fb8816259 2007-08-03 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/intl/Makefile.am: Change stpcpy reference to
        lcl_stpcpy to avoid conflict with new stpcpy.c in libc/string.
        * libc/sys/linux/intl/Makefile.in: Regenerated.
        * libc/sys/linux/intl/stpcpy.c: Renamed to...
        * libc/sys/linux/intl/lcl_stpcpy.c: ..this.
2007-08-03 21:01:11 +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
Jeff Johnston 5fdec53f8c Fix date type for 1.15 release. 2007-07-18 18:27:04 +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
Jeff Johnston c4ccbcce6c 2007-07-11 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h: Fix so C99 functions/macros are accessible
        when -std=c99 is used when compiling and not when using C89.
2007-07-11 18:09:08 +00:00
Corinna Vinschen dec27025b2 * libc/include/wchar.h: Declare wcstol, wcstoll, wcstoul,
wcstoull, _wcstol_r, _wcstoll_r, _wcstoul_r and _wcstoull_r.
	* libc/stdlib/Makefile.am (GENERAL_SOURCES): Add wcstol.c and wcstoul.c.
	(EXTENDED_SOURCES): Add wcstoll.c, wcstoll_r.c, wcstoull.c and
	wcstoull_r.c.
	(CHEWOUT_FILES): Add .def files accordingly.
	* libc/stdlib/Makefile.in: Regenerate.
	* libc/stdlib/stdlib.tex: Add documentation links for above functions.
	* libc/stdlib/strtoll.c: Fix portability note.
	* libc/stdlib/strtoull.c: Ditto.
	* libc/stdlib/wcstol.c: New file.
	* libc/stdlib/wcstoll.c: New file.
	* libc/stdlib/wcstoll_r.c: New file.
	* libc/stdlib/wcstoul.c: New file.
	* libc/stdlib/wcstoull.c: New file.
	* libc/stdlib/wcstoull_r.c: New file.
2007-07-06 20:03:28 +00:00
Jeff Johnston 0be2bc94e7 2007-07-06 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/time.h (gettimeofday): Change to proper
        prototype where second parameter is void *.
        * libc/reent/gettimeofdayr.c (_gettimeofday_r): Change prototype
        accordingly.
        * libc/include/reent.h: Fix prototype for _gettimeofday_r.
        * libc/sys/arm/syscalls.c: Fix gettimeofday function signature.
        * libc/sys/rdos/gettod.c: Ditto.
        * libc/sys/sh/syscalls.c: Ditto.
        * libc/time/time.c (time): Change call to _gettimeofday_r
        to pass NULL as 2nd argument.
2007-07-06 16:56:30 +00:00
Jeff Johnston ba9af2d7ec 2007-07-06 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/intl/dcigettext.c: Define HAVE_STPCPY.
        * libc/sys/linux/intl/l10nflist.c: Ditto.
2007-07-06 16:42:48 +00:00
Corinna Vinschen a37215120b * libc/include/wchar.h: Add prototype for wcsxfrm.
* libc/string/Makefile.am (GENERAL_SOURCES): Add wcsxfrm.c.
	(CHEWOUT_FILES): Add wcsxfrm.def.
	* libc/string/Makefile.in: Regenerate.
	* libc/string/wcsxfrm.c: New file.
	* libc/string/wcstrings.tex: Add wcsxfrm.
2007-07-04 16:18:34 +00:00
Corinna Vinschen 5d8b97a694 * libc/include/string.h: Add prototypes for stpcpy and stpncpy.
* libc/string/Makefile.am (ELIX_SOURCES): Add stpcpy.c and
	stpncpy.c.
	(CHEWOUT_FILES): Add stpcpy.def and stpncpy.def.
	* libc/string/Makefile.in: Regenerate.
	* libc/string/stpcpy.c: New file.
	* libc/string/stpncpy.c: New file.
	* libc/string/strings.tex: Add stpcpy and stpncpy.
2007-06-28 17:07:23 +00:00
Eric Blake 3473e6bd7b Support __func__ in assert, as required by C99.
* 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-27 12:44:41 +00:00
Jeff Johnston be97722968 2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/perror.c: Pass errno as the second argument to
        the assist call.
2007-06-20 21:54:47 +00:00
Jeff Johnston d360ef1865 2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/sys/unistd.h[__SPU__]: Add lockf prototype and related
        defines; expose ftruncate, truncate and sync prototypes.
2007-06-20 21:49:06 +00:00
Jeff Johnston f75c75183f 2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/sys/unistd.h[__SPU__]: Make fchdir prototype visible.
        * libc/include/sys/stat.h[__SPU__]: Make mknod and lstat prototypes
        visible.
2007-06-20 17:30:58 +00:00
Jeff Johnston 438b07b09f 2007-06-15 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/Makefile.am: Remove mktemp.c, it was left in
        from a dropped patch.
        * libc/machine/spu/Makefile.in: Regenerate.
2007-06-15 16:00:46 +00:00
Jeff Johnston c33ff7855e 2007-06-13 Patrick Mansfield <patmans@us.ibm.com>
* 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 17:55:28 +00:00
Jeff Johnston ae473bdc48 2007-06-13 Jeff Johnston <jjohnstn@redhat.com>
* libc/machine/spu/Makefile.am: Re-add back setjmp.S which
        I accidentally dropped.
        * libc/machine/spu/Makefile.in: Regenerated.
2007-06-13 17:50:13 +00:00
Jeff Johnston a8b08518c1 2007-06-13 Patrick Mansfield <patmans@us.ibm.com>
* 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.
2007-06-13 17:44:24 +00:00
Corinna Vinschen f4cd2a1d71 * libc/include/sys/unistd.h: Declare confstr for Cygwin.
Define confstr constants for Cygwin.  Add comment.
2007-06-11 17:33:43 +00:00
Hans-Peter Nilsson 32f67ec6ff * libc/sys/mmixware/access.c (access): Do not try to use a magic
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-10 12:54:35 +00:00
Jeff Johnston 6fb374754d 2007-06-08 Jeff Johnston <jjohnstn@redhat.com>
* 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-08 18:38:51 +00:00
Jeff Johnston 1eeaeab855 2007-06-06 Christian Groessler <chris@groessler.org>
* 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-06 19:24:28 +00:00
Jeff Johnston a874abaf37 Fix entry to refer to function instead of variable. 2007-06-05 21:42:17 +00:00
Jeff Johnston a5da131d8d 2007-06-05 Christian Groessler <chris@groessler.org>
* libc/argz/argz_insert.c (delta): Move variable declaration
        to top of function in keeping with C89 standard.
2007-06-05 21:40:48 +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 b206478328 Avoid more compiler warnings.
* 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.
2007-05-29 21:26:59 +00:00
Corinna Vinschen 76a2ee78b6 * libc/argz/argz_add_sep.c (argz_add_sep): Handle empty string
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.
2007-05-29 07:49:14 +00:00