Commit Graph

2069 Commits

Author SHA1 Message Date
Corinna Vinschen 723bf6ef39 * libc/include/signal.h (sighandler_t): Add typedef. 2010-07-01 08:50:17 +00:00
Corinna Vinschen ca56076ae2 2010-06-29 Antony King <antony.king@sr.com>
* libc/ctype/ctype_.c (__ctype_ptr): Reinstate definition (guarded by
	_NEED_OLD_CTYPE_PTR_DEFINITION) for backwards compatibility with newlib
	1.16.0 and earlier.

2010-06-28  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>

	* libc/include/sys/stat.h: Add ACCESSPERMS, ALLPERMS, and DEFFILEMODE.
2010-07-01 08:45:52 +00:00
Jeff Johnston ce3b386964 2010-06-18 Pavel Pisa <ppisa4lists@pikron.com>
* libc/include/machine/ieeefp.h[__arm__][!__VFP_FP__]: Set to
        __IEEE_BIG_ENDIAN and set __IEEE_BYTES_LITTLE_ENDIAN appropriately
        based on __ARMEL flag.
        * libc/include/machine/endian.h: To set byte order to LITTLE_ENDIAN,
        check for __IEEE_LITTLE_ENDIAN or __IEEE_BYTES_LITTLE_ENDIAN.
2010-06-18 16:26:25 +00:00
Kazu Hirata 492efa069b * libc/include/sys/reent.h (_reent): Adjust _REENT_SMALL to be
binary compatible with normal layout.
	(_REENT_INIT): Adjust to match struct layout.
2010-06-09 15:15:35 +00:00
Jeff Johnston b5efabb284 2010-06-08 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/wordexp.h: Add __cplusplus wrapper.
2010-06-08 21:47:57 +00:00
Jeff Johnston 58d6976a6e 2010-06-08 Jeff Johnston <jjohnstn@redhat.com>
* configure.in: Add test for enable-newlib-register-fini
        to set the _WANT_REGISTER_FINI flag.
        * configure: Regenerated.
        * Makefile.in: Ditto.
        * newlib.hin: Add _WANT_REGISTER_FINI flag.
        * libc/stdlib/__call_atexit.c: Add test for
        _WANT_REGISTER_FINI to enable the register_fini function.
2010-06-08 18:44:14 +00:00
Jeff Johnston ced5f59df9 2010-06-04 Mark Mitchell <mark@codesourcery.com>
* libc/stdlib/__call_atexit.c (__libc_fini): Declare.
        (register_fini): New function.
        * libc/misc/init.c (_fini): Remove.
        (__libc_fini_array): Likewise.
        * libc/misc/fini.c: New file.
        * libc/misc/Makefile.am (LIB_SOURCES): Add fini.c.
        * libc/misc/Makefile.in: Regenerate.
2010-06-04 15:30:40 +00:00
Jeff Johnston 4f5feab5ea 2010-05-31 Kazu Hirata <kazu@codesourcery.com>
* libc/stdlib/mallocr.c (malloc_extend_top): Backport the
        difference between versions 2.6.4 and 2.6.5.
2010-05-31 19:15:41 +00:00
Christopher Faylor 8f01c77516 * libc/string/strsignal.c (strsignal): Avoid duplicate case statement where
SIGPWR == SIGLOST.
2010-05-18 14:52:38 +00:00
Jeff Johnston ca52bf1705 2010-05-11 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/__call_atexit.c: Fix lock to be of type
        _LOCK_RECURSIVE_T as recursive usage is needed.
2010-05-11 20:41:37 +00:00
Jeff Johnston 60bdafbbda 2010-05-11 Jeff Johnston <jjohnstn@redhat.com>
* libc/locale/locale.c (loadlocale): Fix dangling
        switch statement caused by __HAVE_LOCALE_INFO__ not being
        defined.
2010-05-11 20:40:14 +00:00
Jeff Johnston eb2c2b6e6e 2010-05-11 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/string/strsignal.c: New file.
        * libc/string/Makefile.am: Add support for strsignal.
        * libc/string/strings.tex: Ditto.
        * libc/string/Makefile.in: Regenerated.
2010-05-11 20:27:20 +00:00
DJ Delorie 93b103586f * libc/Makefile.am (stmp-sigset, stmp-iconvset, stmp-extra,
stmp-stdio64, stmp-posix,stmp-targetdep): Use unique temporary
file names to allow for parallel installs.
(CLEANFILES): Add new temporary file names.
* libc/Makefile.in: Regenerate.
2010-05-06 23:25:16 +00:00
Corinna Vinschen 7edacc4997 * libc/locale/lctype.c: Include <string.h> and "setlocale.h".
(_C_ctype_locale): Add braces to initializer.
	(__ctype_load_locale): Fix compiler warnings in non-Cygwin case.
	* libc/locale/nl_langinfo.c (nl_langinfo): Expose _NL_CTYPE_MB_CUR_MAX
	case only if __HAVE_LOCALE_INFO__ is defined.
2010-05-03 09:25:32 +00:00
Corinna Vinschen ffa42cf6a0 * libc/stdlib/wctob.c (wctob): Reorganize and fix WEOF check. Rename
pwc to pmb and convert to array to avoid buffer overflow.  Rename c to
	wc.  Check wc for WEOF instead of for EOF.  Return first byte of pmb if
	__wctomb conversion returned exactly one byte, EOF otherwise.
2010-05-02 11:55:01 +00:00
Corinna Vinschen be129c26e2 * libc/include/langinfo.h: Fix #endif positioning. 2010-04-30 14:58:28 +00:00
Corinna Vinschen d47d5b850b Extend locale support to maintain wide char values of native strings
if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
	* libc/include/langinfo.h (enum __nl_item): New type.  Define all
	native values accessible through nl_langinfo.  Define previously
	existing POSIX-compatible values as macros as well.
	* libc/include/stdlib.h (__mb_cur_max): Drop declaration.
	(__locale_mb_cur_max): Declare.
	(MB_CUR_MAX): Re-define calling __locale_mb_cur_max.
	* libc/locale/Makefile.am (ELIX_SOURCES): Add lctype.c.
	* libc/locale/Makefile.in: Regenerate.
	* libc/locale/lctype.c: New file to define and load LC_CTYPE category.
	* libc/locale/lctype.h: New file, matching header.
	* libc/locale/lmessages.c (_C_messages_locale): Add default values for
	wide char members.
	(__messages_load_locale): Add _C_messages_locale in call to
	__set_lc_messages_from_win.
	* libc/locale/lmessages.h (struct lc_messages_T): Add wide char members.
	* libc/locale/lmonetary.c (_C_monetary_locale):  Add default values for
	wide char members.
	(__monetary_load_locale): Add _C_monetary_locale in call to
	__set_lc_monetary_from_win.
	* libc/locale/lmonetary.h (struct lc_monetary_T): Add wide char members.
	Add numerical values for international currency formatting per
	POSIX-1.2008, if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
	* libc/locale/lnumeric.c (_C_numeric_locale): Add default values for
	wide char members.
	(__numeric_load_locale): Add _C_numeric_locale in call to
	__set_lc_numeric_from_win.
	* libc/locale/lnumeric.h (struct lc_numeric_T): Add wide char members.
	* libc/locale/locale.c (loadlocale): Return doing nothing if category
	locale didn't change.  Convert category if chain to switch statement.
	Call __ctype_load_locale in LC_CTYPE case.
	(__locale_charset): Add (but disable for now) returning codeset from
	__get_current_ctype_locale.
	(__locale_mb_cur_max): Add (but disable for now) returning mb_cur_max
	from __get_current_ctype_locale.
	(__locale_msgcharset): Add returning codeset from
	__get_current_messages_locale.
	(_localeconv_r): Accommodate int_XXX values.
	* libc/locale/nl_langinfo.c (nl_ext): New array to define what is to
	be returned for non-POSIX values.
	(nl_Langinfo): Return correct codeset for each locale category.  Return
	extended values if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
	* libc/locale/timelocal.c (_C_time_locale): Add default values for
	wide char members.
	(__time_load_locale): Add _C_time_locale in call to
	__set_lc_time_from_win.
	* libc/locale/timelocal.h (struct lc_time_T): Add wide char members.
	* libc/stdio/vfwprintf.c (_VFWPRINTF_R): Use wide char decimal point
	and thousands_sep if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
	* libc/time/strftime.c: Rework to accommodate availability of wide char
	strings in LC_TIME category if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
2010-04-28 09:59:37 +00:00
DJ Delorie 948214b000 * libc/Makefile.am (SUBDEFS): Add LIBC_POSIX_DEF.
(libc.info): Add posix.texi.
(libc.dvi): Likewise.
(stmp-posix): New.
(posix.texi): New.
(libc_TEXINFOS): Add posix.texi.
* libc/configure.in (LIBC_POSIX_LIB, LIBC_POSIX_DEF): Add
tests.
* libc/libc.texinfo: Include posix.texi
* libc/locale/locale.c: Fix texinfo typo.
* libc/time/strftime.c: Fix texinfo typo.

* libc/configure: Regenerate.
* libc/Makefile.in: Regenerate.
* libc/argz/Makefile.in: Regenerate.
* libc/ctype/Makefile.in: Regenerate.
* libc/errno/Makefile.in: Regenerate.
* libc/iconv/Makefile.in: Regenerate.
* libc/iconv/ccs/Makefile.in: Regenerate.
* libc/iconv/ccs/binary/Makefile.in: Regenerate.
* libc/iconv/ces/Makefile.in: Regenerate.
* libc/iconv/lib/Makefile.in: Regenerate.
* libc/locale/Makefile.in: Regenerate.
* libc/misc/Makefile.in: Regenerate.
* libc/posix/Makefile.in: Regenerate.
* libc/reent/Makefile.in: Regenerate.
* libc/search/Makefile.in: Regenerate.
* libc/signal/Makefile.in: Regenerate.
* libc/stdio/Makefile.in: Regenerate.
* libc/stdio64/Makefile.in: Regenerate.
* libc/stdlib/Makefile.in: Regenerate.
* libc/string/Makefile.in: Regenerate.
* libc/syscalls/Makefile.in: Regenerate.
* libc/time/Makefile.in: Regenerate.
* libc/unix/Makefile.in: Regenerate.
* libc/xdr/Makefile.in: Regenerate.
2010-04-22 23:32:42 +00:00
Jeff Johnston 5f46e4094f 2010-04-06 Dave Korn <dave.korn.cygwin@googlemail.com>
* libc/stdlib/__atexit.c (__atexit_lock): Initialise as recursive
        rather than non-recursive lock type.
        (__register_exitproc): Use recursive locking APIs on it.
        * libc/stdlib/__call_atexit.c (__call_exitprocs): Likewise.
2010-04-06 20:20:36 +00:00
Corinna Vinschen 65ee447a02 * libc/stdlib/btowc.c (btowc): Reorganize EOF check. Fix incorrect
return value if input byte is ASCII NUL.
2010-04-06 14:46:31 +00:00
Jeff Johnston c1bfa897da 2010-04-01 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/sched.h: Include prototypes for
        sched_* methods.
        * libc/include/sys/sched.h: Update to POSIX
        1003.1b-2008.  Rework constants to allow sharing
        between RTEMS and Cygwin.
2010-04-01 18:33:37 +00:00
Corinna Vinschen eca2df4f01 * libc/locale/locale.c (loadlocale): Optimize "EUC" charset check.
Cygwin only: Allow GB2312 and EUC-CN as alternative codeset names
	for GBK.  Add to documentation.
	* libc/locale/nl_langinfo.c (nl_langinfo): On Cygwin, translate EUCCN
	to GB2312.
2010-03-27 21:04:49 +00:00
Corinna Vinschen 5e74a46f2f * libc/include/sys/features.h: Allow for _XOPEN_SOURCE to have an
empty definition.  Also add support for values of 500 or less.
2010-03-17 17:13:00 +00:00
Jeff Johnston fab7d5988a 2010-03-09 Jeff Johnston <jjohnstn@redhat.com>
* libc/posix/telldir.c (dd_loccnt): Change start index to be 1
        instead of 0.
        (_seekdir): A loc of 0 now means rewind dir.
2010-03-09 20:38:18 +00:00
Jeff Johnston 23a6adc2c3 2010-03-08 Craig Howland <howland@LGSInnovations.com>
* libm/common/s_rint.c:  Fix error when integral part had 18 bits and
        fraction had bits set beyond first radix bit.  Also, make 2-part
        adjustment consistent with 1-part adjustment when adjusting fractional
        bits.
        * libm/common/sf_rint.c:  Make fractional-bit adjustment consistent
        with s_rint.c by setting 0b.01 instead of 0b.001.
2010-03-08 17:16:37 +00:00
Corinna Vinschen b73e65bb44 * libm/math/ef_sqrt.c: Delete unused variable sign.
* libc/stdlib/getenv.c: Delete "char *_findenv_r ();", as is not a
	proper prototype, and is properly prototyped in stdlib.h, anyway.
	* libc/stdlib/getenv_r.c: Ditto.
	* libc/search/hash.c: Add _DEFUN to __hash_open() declaration; add
	#define __DBINTERFACE_PRIVATE to activate prototypes from db_local.h.
	* libc/search/db_local.h: Correct __hash_open() prototype.
	* libc/sys/linux/cmath/math_private.h:  Eliminate compiler warnings:
	Remove #define INFINITY (redefines from math.h); remove #define __isnanf
	and #define __isinff isinff.
2010-03-05 08:55:16 +00:00
Jeff Johnston 6fc25b2d1e 2010-03-02 Craig Howland <howland@LGSInnovations.com>
* libc/include/sys/features.h:  Add POSIX.1-permitted definition of
        _POSIX_C_SOURCE if not already defined and _XOPEN_SOURCE has an
        appropriate value.  Specifically, check for POSIX.1-2008 & 2001 values.
        * libc/include/sys/config.h:  Add #include <sys/features.h> so that all
        includes get the new check added to it.
2010-03-02 19:28:39 +00:00
Corinna Vinschen 180044b386 * libc/xdr/README: Correct grammatical errors.
* libc/include/rpc/types.h: Add public types used
	by RPC implementations.
	* libc/include/rpc/xdr.h: Add defines used by RPC
	implementations.
	* libc/xdr/Makefile.am: Eliminate automake warning.
	* libc/xdr/Makefile.in: Regenerate.
2010-03-02 14:29:36 +00:00
Corinna Vinschen 8acb1969b5 * libc/xdr/Makefile.in: Regenerate. 2010-03-02 12:21:52 +00:00
Corinna Vinschen 3d7c4998ac Add eXtensible Data Record (XDR) support
* configure.host: Build libc/xdr only on cygwin.
	* Makefile.am: Install xdr headers.
	* libc/configure.in: Support new libc/xdr subdirectory.
	* libc/Makefile.am: Support new libc/xdr subdirectory.
	* libc/include/rpc/types.h: New.
	* libc/include/rpc/xdr.h: New.
	* libc/xdr/README: New.
	* libc/xdr/Makefile.am: New.
	* libc/xdr/dummy.c: New.
	* libc/xdr/xdr.c: New.
	* libc/xdr/xdr_array.c: New.
	* libc/xdr/xdr_float.c: New.
	* libc/xdr/xdr_float_vax.c: New.
	* libc/xdr/xdr_mem.c: New.
	* libc/xdr/xdr_private.c: New.
	* libc/xdr/xdr_private.h: New.
	* libc/xdr/xdr_rec.c: New.
	* libc/xdr/xdr_reference.c: New.
	* libc/xdr/xdr_sizeof.c: New.
	* libc/xdr/xdr_stdio.c: New.

	Regenerate using ac-2.63 and am-1.11.1
	* libc/xdr/Makefile.in: New.
	* Makefile.in: Regenerate.
	* libc/configure: Regenerate.
	* libc/Makefile.in: Regenerate.
	* libc/argz/Makefile.in: Regenerate.
	* libc/ctype/Makefile.in: Regenerate.
	* libc/errno/Makefile.in: Regenerate.
	* libc/iconv/ccs/binary/Makefile.in: Regenerate.
	* libc/iconv/ccs/Makefile.in: Regenerate.
	* libc/iconv/ces/Makefile.in: Regenerate.
	* libc/iconv/lib/Makefile.in: Regenerate.
	* libc/iconv/Makefile.in: Regenerate.
	* libc/locale/Makefile.in: Regenerate.
	* libc/misc/Makefile.in: Regenerate.
	* libc/posix/Makefile.in: Regenerate.
	* libc/reent/Makefile.in: Regenerate.
	* libc/search/Makefile.in: Regenerate.
	* libc/signal/Makefile.in: Regenerate.
	* libc/stdio/Makefile.in: Regenerate.
	* libc/stdio64/Makefile.in: Regenerate.
	* libc/stdlib/Makefile.in: Regenerate.
	* libc/string/Makefile.in: Regenerate.
	* libc/syscalls/Makefile.in: Regenerate.
	* libc/time/Makefile.in: Regenerate.
	* libc/unix/Makefile.in: Regenerate.
2010-03-02 12:05:18 +00:00
Corinna Vinschen 79ca6b6fd2 * libm/common/s_ilogb.c: Fix typo in comments that causes doc
generation to fail.
2010-02-26 09:44:25 +00:00
Corinna Vinschen be7f7a7503 * libc/time/strftime.c: Add support for era and alt_digits data from
LC_TIME locale category.  Conditionalize using _WANT_C99_TIME_FORMATS
	flag.
	(STRTOUL): Define differently for building strftime or wcsftime.
	(STRCPY): Ditto.
	(STRCHR): Ditto.
	(STRLEN): Ditto.
	(CHECK_LENGTH): Define to simplify code.
	(era_info_t): New type to store era info.
	(get_era_info): New function to fetch era info matching incoming
	struct tm.
	(free_era_info): New function to free era info.
	(alt_digits_t): New type to store alternative digits.
	(get_alt_digits): New function to convert alt_digits string into
	alt_digits_t structure.
	(free_alt_digits): New function to free alt_digits info.
	(conv_to_alt_digits): New function to convert unsigned value into
	alternative digits.
	(strftime): Conditionalize on _WANT_C99_TIME_FORMATS.  If
	_WANT_C99_TIME_FORMATS is defined, define as just a wrapper function
	providing era_info and alt_digits pointers and call ...
	(__strftime): Rename from strftime and make static if
	_WANT_C99_TIME_FORMATS is defined.  Add parameters for era_info and
	alt_digits pointers.  Handle conversion modifiers according to
	POSIX-1.2008.  Redefine %F and %Y according to POSIX.  Add default case
	to allow to bail out on invalid conversion specifiers.
	* libc/include/sys/config.h: Move Cygwin build flags to Cygwin's
	config.h.

	* libc/include/stdio.h: Remove __CYGWIN_USE_BIG_TYPES__ condition.
2010-02-26 09:41:44 +00:00
Corinna Vinschen 7c3c3fea6d * libc/locale/locale.c (loadlocale): Fix typo in comment. 2010-02-25 16:16:16 +00:00
Corinna Vinschen 830686ec0b * libc/locale/locale.c: Throughout, extensively comment on the
reason for using __CYGWIN__.
	(lconv): Remove _CONST entirely.
	(loadlocale): Guard calls to function loading locale-specific
	category data with __HAVE_LOCALE_INFO__ rather than __CYGWIN__.
	* libc/sys/config.h (__HAVE_LOCALE_INFO__): Define for Cygwin.
2010-02-25 16:10:42 +00:00
Jeff Johnston 9035cfbd12 2010-02-24 Charles Wilson <...>
Work around issues with new libtool files in ..
        * configure.in: Unconditionally call _LT_PROG_ECHO_BACKSLASH.
        * iconvdata/configure.in: Ditto.
        * libc/configure.in: Ditto.
        * libc/machine/configure.in: Ditto.
        * libc/machine/i386/configure.in: Ditto.
        * libc/sys/configure.in: Ditto.
        * libc/sys/linux/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/linux/machine/configure.in: Ditto.
        * libc/sys/linux/machine/i386/configure.in: Ditto.
        * libm/configure.in: Ditto.
        * libm/machine/configure.in: Ditto.
        * libm/machine/i386/configure.in: Ditto.
        * libc/machine/sh/configure.in: Ditto.  Also, call
        AC_NO_EXECUTABLES before NEWLIB_CONFIGURE.
        * aclocal.m4: Regenerated.
        * configure: Ditto.
        * Makefile.in: Ditto.
        * doc/aclocal.m4: Ditto.
        * doc/Makefile.in: Ditto.
        * libc/*/aclocal.m4: Ditto.
        * libc/*/Makefile.in: Ditto.
        * libc/*/configure: Ditto.
        * libm/*/aclocal.m4: Ditto.
        * libm/*/Makefile.in: Ditto.
        * libm/*/configure: Ditto.
2010-02-24 21:00:08 +00:00
Jeff Johnston ba7b214766 2010-02-24 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/__call_exit.c: Add include of sys/lock.h.
2010-02-24 19:58:17 +00:00
Jeff Johnston 84f66e46b9 2010-02-23 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/types.h: Fix __XMK__ sectioning and remove
        redundant code section for __XMK__.
2010-02-23 23:13:20 +00:00
Corinna Vinschen 6eaf061dc4 * libc/include/langinfo.h (_NL_TIME_DATE_FMT): Define new nl_item
value for LC_TIME entry date_fmt.
	(_DATE_FMT): Define "official" GNU name same as _NL_TIME_DATE_FMT.
	* libc/locale/nl_langinfo.c (nl_langinfo): Add case for _DATE_FMT.
2010-02-22 10:53:04 +00:00
Corinna Vinschen 7ab414f5a0 * libc/ctype/iswalpha.c (iswalpha): Update to Unicode 5.2.
* libc/ctype/iswprint.c (iswprint): Ditto.
	* libc/ctype/iswpunct.c (iswpunct): Drop standalone implementation.
	Define in terms of other wctype functions instead.
	* libc/ctype/towlower.c (towlower): Update to Unicode 5.2.  Add comment
	to explain how to fetch the data from the Unicode database.
	* libc/ctype/towupper.c (towupper): Ditto.
	* libc/ctype/utf8alpha.h: Ditto.
	* libc/ctype/utf8print.h: Ditto.
	* libc/ctype/utf8punct.h: Remove.
	* libc/ctype/iswcntrl.c (iswcntrl): Add comment to explain how to
	fetch the data from the Unicode database.
2010-02-18 20:37:19 +00:00
Corinna Vinschen f723b60cf2 * libc/locale/timelocal.h (struct lc_time_T): Add missing ERA-related
members.
	* libc/locale/timelocal.c (_C_time_local): Set new members to empty
	strings.
	* libc/locale/nl_langinfo.c (nl_langinfo): Return values from
	__get_current_time_locale() for ERA related requests.
2010-02-18 17:35:15 +00:00
Corinna Vinschen dc7992f47e * libc/ctype/iswblank.c (iswblank): Remove Unicode characters
U+00A0 and U+200B.  Add Unicode character U+180E.  Add comment
	to explain how to generate from Unicode data file.
	* libc/ctype/iswspace.c (iswspace): Ditto.
2010-02-17 09:14:35 +00:00
Corinna Vinschen 38d09c90de * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Apply previous patch here
as well.
2010-02-15 16:29:15 +00:00
Corinna Vinschen b85c06ba36 * libc/stdio/vfprintf.c (_VFPRINTF_R): Drop printing a redundant
decimal point in case the float argument is an integral value.
2010-02-15 16:10:28 +00:00
Jeff Johnston 45c8c6469a 2010-02-11 Craig Howland <howland@LGSInnovations.com>
* libc/include/machine/ieeefp.h:  isfinite macro modified to run faster
        by only calling fpclassify once instead of possibly twice.
2010-02-11 21:03:51 +00:00
Jeff Johnston 451a8eb09a 2010-02-11 Craig Howland <howland@LGSInnovations.com>
* libm/common/s_ilogb.c:  Adjust documentation to reflect new returns
        (see next items) and that ilogb() and ilogbf() are C99/POSIX.
        * libm/common/s_ilogb.c (ilogb):  Use C99/POSIX FP_ILOGB0 and
        FP_ILOGBNAN returns for 0 and NAN arguments, respectively, instead of
        the prior -INT_MAX and INT_MAX.  The FP_ILOGBx defines in math.h
        presently match the prior hard-codes, so no functional change is
        actually introduced.  (Not at this time, nor planned, but the values
        are permitted to be different, so subsequent edits of math.h could
        possibly cause a functional change.)
        * libm/common/sf_ilogb.c (ilogbf):  Ditto.
2010-02-11 21:00:33 +00:00
Jeff Johnston 5880fbf783 2010-02-09 Daniel Gutson <dgutson@codesourcery.com>
* libc/machine/arm/arm_asm.h (_ISA_THUMB_2): __ARM_ARCH_7EM__
        added to the preprocessor condition.
2010-02-09 22:52:21 +00:00
Corinna Vinschen 1cea6189a3 * libc/locale/lmessages.c (__messages_load_locale): Take additional
parameters for wide char to multibyte conversion.  Call
	__set_lc_messages_from_win on Cygwin.
	* libc/locale/lmessages.h: Make C++-safe.
	(__messages_load_locale): Change declaration.
	* libc/locale/lmonetary.c (__monetary_load_locale): Use
	_monetary_locale_buf as buffer pointer.
	* libc/locale/lnumeric.c (__numeric_load_locale): Use
	_numeric_locale_buf as buffer pointer.
	* libc/locale/timelocal.c (__time_load_locale): Use time_locale_buf
	as buffer pointer.
	* libc/locale/locale.c (loadlocale): Enable loading LC_MESSAGES data
	on Cygwin.
2010-02-09 08:58:38 +00:00
Jeff Johnston cf9d06b149 2010-02-08 Josef Wolf <jw@raven.inka.de>
* libc/machine/m68k/memcpy.S: MISALIGEND_OK should not be set for
        __mcpu32__.
2010-02-08 17:24:22 +00:00
Corinna Vinschen 9ac5e663e8 * libc/locale/locale.c: Add Cygwin's /usr/share/locale/locale.alias
support to documentation.
	(__set_locale_from_locale_alias): Declare when build for Cygwin.
	(loadlocale): On Cygwin, if locale can't be recognized, call
	__set_locale_from_locale_alias to check for locale alias.
	Define FAIL macro to replace `return NULL' statements.  Replace
	throughout.
2010-02-07 13:52:34 +00:00
Corinna Vinschen bc3677c557 * libc/locale/locale.c: Fix typo in documentation. Remove useless
_MB_CAPABLE guards within other _MB_CAPABLE guards.  Add comment
	to remaining #endif's.
2010-02-07 12:57:48 +00:00
Corinna Vinschen 5eb556c849 * libc/ctype/ctype_cp.h (_CTYPE_GEORGIAN_PS_128_254): Define.
(_CTYPE_GEORGIAN_PS_255): Define.
	(_CTYPE_PT154_128_254): Define.
	(_CTYPE_PT154_255): Define.
	(__ctype_cp): Add array members for above ctype definitions.
	* libc/locale/locale.c (loadlocale): Make TIS-620 charset name
	available for all targets.  Add guards for setting the conversion
	function pointers.  Add support for GEORGIAN-PS and PT154 charsets.
	Change documentation to reflect current behaviour more closely.
	* libc/locale/nl_langinfo.c (nl_langinfo): On Cygwin, translate
	"CP101" to "GEORGIAN-PS" and "CP102" to "PT154".
	* libc/stdlib/sb_charsets.c (__cp_conv): Add conversion arrays
	for GEORGIAN-PS and PT154.
	(__cp_index): Map invalid Windows codepage number 101 to
	GEORGIAN-PS conversion array, 102 to PT154 conversion array.
2010-02-06 18:28:33 +00:00
Corinna Vinschen ff348d86cc * libc/posix/telldir.c: Remove bogus nested prototype of lseek(). 2010-02-06 10:32:20 +00:00
Corinna Vinschen 837dda8652 * libc/locale/locale.c (loadlocale): Handle ISO-8859 and KOI8 charsets
so that the dashes are optional.  Align documentation.
2010-02-05 21:24:42 +00:00
Corinna Vinschen b0776ebd41 * libc/stdio/vfprintf.c: Include locale.h also if _WANT_IO_C99_FORMATS
is defined.  Raise conversion buffer size to make sure it has enough
	room for numbers plus grouping character.  Define GROUPING flag.
	(_VFPRINTF_R): Add PRINTANDPAD macro.  Handle grouping flag character.
	Handle grouping for decimal integer and float values.
	* libc/stdio/vfwprintf.c: Ditto.
2010-02-05 08:35:35 +00:00
Christopher Faylor fa40bd922e * libc/stdlib/__atexit.c (__atexit_lock): Define a global lock for atexit
functions.
(__register_exitproc): Use __atexit_lock rather than a local static lock.
* libc/stdlib/__call_atexit.c: Ditto.
2010-02-04 17:57:30 +00:00
Jeff Johnston 2d69f00e6e 2010-01-29 Jeff Johnston <jjohnstn@redhat.com>
* libc/search/Makefile.am: Create .def files for bsearch and qsort.
        * libc/search/Makefile.in: Regenerated.
        * libc/stdlib/stdlib.tex: Add bsearch and qsort.
2010-01-29 23:04:21 +00:00
Corinna Vinschen 88116ad22e * libc/locale/nl_langinfo.c (nl_langinfo): Return "CP932" when using
SJIS on Cygwin.  Explain why.
2010-01-24 12:18:20 +00:00
Corinna Vinschen b0466b3702 * libc/locale/locale.c (loadlocale): Allow CP932 as alias for SJIS.
Add to documentation.  Add a few comments to #endif's for Cygwin.
2010-01-23 16:41:08 +00:00
Corinna Vinschen c631824a8e * libc/locale/locale.c (loadlocale): Disable JIS entirely on Cygwin.
Allow TIS620 and TIS-620 as aliases for CP874 on Cygwin.
2010-01-23 14:32:25 +00:00
Corinna Vinschen fe57329f99 * libc/locale/lmonetary.c (__monetary_load_locale): Take additional
parameters for wide char to multibyte conversion.  Call
	__set_lc_monetary_from_win on Cygwin.
	* libc/locale/lmonetary.h: Make C++-safe.
	(__monetary_load_locale): Change declaration.
	* libc/locale/lnumeric.c (__numeric_load_locale): Take additional
	parameters for wide char to multibyte conversion.  Call
	__set_lc_numeric_from_win on Cygwin.
	* libc/locale/lnumeric.h: Make C++-safe.
	(__numeric_load_locale): Change declaration.
	* libc/locale/locale.c (lconv): De-constify for Cygwin.
	(__set_charset_from_locale): Rename from
	__set_charset_from_codepage.  Take locale as parameter instead of
	a codepage.
	(loadlocale): Allow "EUC-JP" for "EUCJP" and "EUC-KR" for "EUCKR".
	Change documnetation accordingly.  Enable LC_COLLATE, LC_MONETARY,
	LC_NUMERIC, and LC_TIME handling on Cygwin.
	(_localeconv_r): On Cygwin, copy values from monetary and numeric
	domain if change has been noted.
	* libc/locale/nl_langinfo.c (nl_langinfo): Accommodate change of
	am/pm layout in struct lc_time_T.
	* libc/locale/timelocal.c (_C_time_locale): Accommodate
	redefinition of am/pm members.
	(__time_load_locale): Take additional parameters for wide char
	to multibyte conversion.  Call __set_lc_time_from_win on Cygwin.
	* libc/locale/timelocal.h: Make C++-safe.
	(struct lc_time_T): Convert am and pm to a am_pm array for easier
	consumption by strftime and strptime.
	(__time_load_locale): Change declaration.
	* libc/time/strftime.c: Change documentation to reflect changes to
	strftime.  Remove locale constant strings in favor of access to
	locale-specifc data.
	(_ctloc): Define access method for locale-specifc data.
	(TOLOWER): Define for tolower conversion.
	(strftime): Throughout, convert locale-specific formats to use
	locale-specific data.  Add GNU-specific "%P" format.
	* libc/time/strptime.c: Remove locale constant strings in favor of
	access to locale-specifc data.
	(_ctloc): Define access method for locale-specifc data.
	(strptime): Throughout, convert locale-specific formats to use
	locale-specific data.
2010-01-22 13:03:42 +00:00
Corinna Vinschen 514329a7ec * libc/locale/nl_langinfo.c (nl_langinfo): On Cygwin, translate
often-used charsets into Linux compatible codesets.
2010-01-20 13:18:24 +00:00
Jeff Johnston 044cd63533 2010-01-19 Andy Koppe <andy.koppe@gmail.com>
* libc/stdio/vfscanf.c (__SVFSCANF_R): Fix handling of non-ASCII
        characters and allow invalid bytes in format string.
2010-01-19 23:16:45 +00:00
Corinna Vinschen 8c72ebb7e0 * libc/stdlib/wcstombs_r.c (_wcstombs_r): Handle invalid characters
correctly also in the s==NULL case.
2010-01-19 21:14:53 +00:00
Corinna Vinschen da5f018bef * libc/locale/locale.c (loadlocale): Change comments to refer to
ISO 639-3 rather than 639-2.
2010-01-17 14:57:32 +00:00
Corinna Vinschen d24015235c * libc/locale/locale.c (loadlocale): Allow three character
language codes to accommodate ISO 639-2 codes.
2010-01-17 14:41:58 +00:00
Corinna Vinschen 32cb8c8cfe * libc/locale/locale.c (lc_ctype_charset): Disable defaulting to
"UTF-8" on Cygwin.
	(lc_message_charset): Ditto.
	(loadlocale): Disable setting charset of the "C" locale to "UTF-8" on
	Cygwin.
	* libc/stdlib/mbtowc_r.c (__mbtowc): Add Cygwin-specific comment.
	* libc/stdlib/wctomb_r.c (__wctomb): Ditto.
2010-01-17 09:39:06 +00:00
Corinna Vinschen 37671b5114 * libc/include/sys/_default_fcntl.h (O_CLOEXEC): Define as _FNOINHERIT.
(F_DUPFD_CLOEXEC): Define for Cygwin.
	* libc/include/sys/unistd.h (dup3): Define for Cygwin.
	(pipe2): Ditto.
2010-01-14 18:49:13 +00:00
Corinna Vinschen 131dbdfccb Drop accidentally applied ChangeLog entry. 2010-01-14 12:49:43 +00:00
Corinna Vinschen 0b82c17d57 * libc/stdio/vfprintf.c (_VFPRINTF_R): Just wave bytes invalid in
the current charset through.
2010-01-14 12:48:58 +00:00
Jeff Johnston eeda30d7d5 2010-01-11 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/posix/telldir.c (_cleanupdir): Fixed usage of freed memory.
2010-01-11 23:24:47 +00:00
Jeff Johnston d8a439359a 2010-01-11 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* libc/include/math.h (log2, log2f): Disable macro versions for C++,
        as they are incompatible with OpenMP/C++ headers.

2
2010-01-11 22:55:47 +00:00
Corinna Vinschen 2b77087a48 * libc/stdlib/mbtowc_r.c (__ascii_mbtowc): Disallow conversion of
non-ASCII chars on Cygwin.
	* libc/stdlib/wctomb_r.c (__ascii_wctomb): Ditto.
2010-01-10 13:54:34 +00:00
Eric Blake b2e79f9800 Fix getsubopt declaration.
* libc/include/sys/unistd.h (suboptarg, getsubopt): Move...
* libc/include/stdlib.h: ...here, to match POSIX for getsubopt.
2009-12-22 13:07:24 +00:00
Jeff Johnston a97a996ff7 2009-12-17 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/_syslist.h: Add _mkdir transform.
2009-12-17 21:08:04 +00:00
Jeff Johnston a390368122 2009-12-17 Jeff Johnston <jjohnstn@redhat.com>
* NEWS: Update with 1.18.0 info.
        * README: Ditto.
        * acinclude.m4: Change version number to 1.18.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.18
2009-12-17 20:41:44 +00:00
Jeff Johnston 296df5189a 2008-12-17 Jeff Johnston <jjohnstn@redhat.com>
* NEWS: Update with 1.18.0 info.
        * README: Ditto.
        * acinclude.m4: Change version number to 1.18.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.18
2009-12-17 20:40:06 +00:00
Jeff Johnston bbe9636fd8 2009-12-17 Jerker Back <jerker.back@gmail.com>
* libc/iconv/lib/local.h[!__GNUC__]: Add alternative version of
        ICONV_ZERO_MB_STATE_T macro.
        * libc/iconv/lib/ucsconv.c (ucs_based_conversion_get_state): Use
        temporary local variable nullstate to hold empty mbstate_t.
2009-12-17 20:04:43 +00:00
Jeff Johnston 8b917fbcdd 2009-12-17 Jerker Back <jerker.back@gmail.com>
* libc/include/_ansi.h: Add new _EXFNPTR macro for using with
        function pointer arguments.
        * libc/iconv/lib/conv.h: Use _EXFNPTR rather than _EXPARM macro.
        * libc/iconv/lib/ucsconv.h: Ditto.
        * libc/include/stdlib.h: Use new _EXFNPTR macro for function pointers.
        * libc/include/sys/reent.h: Ditto.
        * libc/include/sys/unistd.h: Ditto.
        * libc/search/bsearch.c: Ditto.
        * libc/stdio/fseek.c: Ditto.
        * libc/stdio64/fseeko64.c: Ditto.
        * libc/stdlib/atexit.c: Ditto.
        * libc/stdlib/on_exit.c: Ditto.
2009-12-17 19:43:43 +00:00
Jeff Johnston 6fe2eb4c80 2009-12-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/include/machine/ieeefp.h: Rework __IEEE_*_ENDIAN handling.
        * libc/machine/arm/machine/endian.h: Remove (Conflicts with
        libc/include/machine/endian.h)
2009-12-17 19:26:38 +00:00
Jeff Johnston 9ad56b2726 2009-12-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/include/machine/setjmp.h: Set up _JBLEN #ifdef __m68k__.
2009-12-17 19:24:22 +00:00
Jeff Johnston f10d348770 2009-12-17 Ralf Corsepius <ralf.corsepius@rtems.org>
* libc/include/pthread.h: Add pthread_atfork, pthread_rwlock_unlock
        * libc/include/sys/stat.h: Use struct timespec st_*tim,
        blksize_t st_blksize, blkcnt_t st_blocks.
        Add st_*time compatibility macros.
2009-12-17 19:22:23 +00:00
Jeff Johnston 377b190270 2009-12-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/sys/rtems/machine/param.h: Only use sizeof(double) -1
        for ALIGNBYTES on SPARC.
2009-12-16 21:35:51 +00:00
Jeff Johnston a13e3a7bf2 2009-12-16 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/errno.h: Move EHOSTDOWN, EPFNOSUPPORT,
        and ETOOMANYREFS into general list as they are referenced
        by OpenGroup and needed by RTEMS.
2009-12-16 19:33:10 +00:00
Jeff Johnston 39e5af4aed 2009-12-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/search/hcreate.c: Don't include <sys/queue.h> (Unused).
2009-12-16 18:30:20 +00:00
Jeff Johnston 32a08d0e75 2009-12-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/sys/rtems/machine/_types.h: New (Derived from
        machine/_default_types.h).
        * libc/sys/rtems/crt0.c: Rework. Introduce macro RTEMS_STUB.
        * libc/sys/rtems/sys/param.h:
        Update copyright notice from FreeBSD.
        Remove HZ.
        Add #include <sys/priority.h>
        Remove priority handling (moved to sys/priority.h).
        Remove CLBYTES (Unused, abandoned in BSD).
        * libc/sys/rtems/sys/queue.h: Update copyright (from FreeBSD).
        Remove CIRCLEQ_*.
2009-12-16 18:28:15 +00:00
Jeff Johnston 47c756dd7a 2009-12-15 Conny Marco Menebrocker <c-m-m@gmx.de>
* libc/machine/xc16x/Makefile.am: Fix typo and refer
        to puts.c instead of putc.c.
        * libc/machine/xc16x/Makefile.in: Regenerated.
2009-12-15 19:34:08 +00:00
Jeff Johnston 531e23564b 2009-12-14 Maxim Kuvyrkov <maxim@codesourcery.com>
* libc/machine/m68k/memcpy.S: Patch to support
        boards which do not support unaligned read/write.
2009-12-14 20:50:53 +00:00
Jeff Johnston 655e435357 2009-12-10 Conny Marco Menebrocker <c-m-m@gmx.de>
* configure.host: Add xc16x support.
        * libc/include/machine/ieeefp.h: Ditto.
        * libc/include/sys/config.h: Ditto.
        * libc/machine/configure.in: Ditto.
        * libc/machine/Makefile.in: Regenerated.
        * libc/machine/aclocal.m4: Ditto.
        * libc/machine/configure: Ditto.
        * libc/machine/xc16x/Makefile.am: New file.
        * libc/machine/xc16x/Makefile.in: Ditto.
        * libc/machine/xc16x/aclocal.m4: Ditto.
        * libc/machine/xc16x/configure: Ditto.
        * libc/machine/xc16x/configure.in: Ditto.
        * libc/machine/xc16x/putchar.c: Ditto.
        * libc/machine/xc16x/puts.c: Ditto.
        * libc/machine/xc16x/setjmp.S: Ditto.
2009-12-10 17:12:11 +00:00
Eric Blake ad0ae5d83a Fix some *at declarations.
* libc/include/stdio.h (symlinkat): Move this...
* libc/include/sys/_default_fcntl.h (unlinkat): ...and this...
* libc/include/sys/unistd.h (symlinkat, unlinkat): ...here, to
match POSIX.
2009-12-08 13:50:41 +00:00
Jeff Johnston df8d921e12 2009-12-03 Craig Howland <howland@LGSInnovations.com>
* libc/stdlib/strtod.c:  Correct "NO_REENT" to "_REENT_ONLY".
        * libc/stdlib/wcstod.c:  Ditto.
        * libc/stdlib/dtoastub.c:  Ditto.
2009-12-03 16:11:27 +00:00
Corinna Vinschen e92d0abecf Use NetBSD fix for CVE-2009-0689 security vulnerability.
* libc/include/sys/reent.h (_Kmax): Define here based on the sizeof
	size_t, as in latest NetBSD.
	* libc/reent/reent.c (_reclaim_reent): Use _Kmax rather than constant
	value 15.
	* libc/stdlib/mprec.c (_Kmax): Don't define here.  Explain why.
2009-11-23 17:02:20 +00:00
Nick Clifton 0680fe0a6e * libc/machine/rx/strncat.S (_strncat): Replace use of r6
(call-saved) with r14 (call-used).
2009-11-20 12:54:29 +00:00
Jeff Johnston b425cbf482 2009-11-18 Dave Korn <dave.korn.cygwin@googlemail.com>
* libm/machine/i386/f_tan.S (_f_tan): Free fp stack register
        containing useless constant before advancing fp sp over it.
        (_f_tanf): Likewise.
2009-11-18 17:50:20 +00:00
Corinna Vinschen b4fee5273e * libc/stdio/vfprintf.c: Include ../stdlib/local.h. Replace call to
_mbtowc_r with direct call to __mbtowc.
	* libc/stdio/vfscanf.c: Ditto.
	* libc/stdlib/btowc.c: Include local.h.  Replace call to _mbtowc_r
	with direct call to __mbtowc.
	* libc/stdlib/mblen.c: Ditto.
	* libc/stdlib/mblen_r.c: Ditto.
	* libc/stdlib/mbrtowc.c: Ditto.
	* libc/stdlib/mbstowcs_r.c: Ditto.
	* libc/stdlib/mbtowc.c: Ditto.
	* libc/stdlib/wcrtomb.c: Include local.h.  Replace call to _wctomb_r
	with direct call to __wctomb.
	* libc/stdlib/wcsnrtombs.c: Ditto.
	(_wcsnrtombs_r): Ditto.
	* libc/stdlib/wcstombs_r.c: Ditto.
	* libc/stdlib/wctob.c: Ditto.
	* libc/stdlib/wctomb.c: Ditto.

	* libc/stdlib/mbrtowc.c (mbrtowc): Implement independently from
	_mbrtowc_r, unless PREFER_SIZE_OVER_SPEED or __OPTIMIZE_SIZE__ are
	defined.
	* libc/stdlib/wcrtomb.c (wcrtomb): Implement independently from
	_wcrtomb_r, unless PREFER_SIZE_OVER_SPEED or __OPTIMIZE_SIZE__ are
	defined.

	* libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Drop unnecessary test for
	ch >= 0.
2009-11-18 09:49:57 +00:00
Jeff Johnston 46471257e9 2009-11-17 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* libm/common/fdlibm.h (logb, logbf): Move decls from here...
        * libc/include/math.h (logb, logbf): ...to here.
2009-11-17 22:35:46 +00:00
Eric Blake 73db6db783 * libc/include/ctype.h (__ctype_lookup): Fix precedence. 2009-11-06 03:27:19 +00:00
Corinna Vinschen dc3d6d9093 * libc/stdio/fflush.c (_fflush_r): Store old errno to check for
low-level seek error condition.  Restore old errno in case of
	success.  Don't use new position after seek as error condition,
	rather check for return value of -1 and errno.  Handle EINVAL
	just like ESPIPE.  Only set fp->_offset if errno is 0.
2009-10-30 08:26:41 +00:00
Nick Clifton a861373585 * MAINTAINERS (ARM): Add myself as an ARM maintainer. 2009-10-27 10:31:06 +00:00
Nick Clifton fd6942ab42 newlib:
* configure.host: Add support for RX architecture.
        * libc/include/machine/ieeefp.h: Likewise.
        * libc/include/machine/setjmp.h: Likewise.
        * libc/include/machine/configure.in: Likewise.
        * libc/include/machine/configure: Regenerate.
        * libc/machine/rx: New directory.
        * libc/machine/rx/*: New files to support RX architecture.

libgloss:
        * configure.in: Add support for RX sub-directory.
        * configure: Regenerate.
        * rx: New directory.
        * rx/*: New files to support RX architecture.
2009-10-26 10:05:23 +00:00
Eric Blake 9b2b7c4a6b Fix isalpha(0x100000001LL) and friends on 64-bit machines.
* libc/include/ctype.h (__ctype_lookup): New macro.
(isalpha, isupper, islower, isdigit, isxdigit, isspace, ispunct)
(isalnum, isprint, isgraph, iscntrl, isblank): Use it to fix bug
on 64-bit machines.
2009-10-24 13:24:29 +00:00
Jeff Johnston 3a2f070f31 2009-10-20 Jeff Johnston <jjohnstn@redhat.com>
* configure.host: Don't set -O2 flag in newlib_cflags.  Leave
        that to CFLAGS.
        * acinclude.m4: Don't reset CFLAGS before calling _AC_PROG_CC_G
        as it sets the same flags as we are using.
        * aclocal.m4: Regenerated.
        * configure: Ditto.
        * Makefile.in: Ditto.
        * iconvdata/aclocal.m4: Ditto.
        * iconvdata/configure: Ditto.
        * iconvdata/Makefile.in: Ditto.
        * doc/aclocal.m4: Ditto.
        * doc/configure: Ditto.
        * doc/Makefile.in: Ditto.
        * libc/aclocal.m4: Ditto.
        * libc/configure: Ditto.
        * libc/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.
2009-10-20 22:44:28 +00:00
Jeff Johnston 1e1b6f8003 2009-10-16 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/config.h[__CYGWIN__]: Set __USE_XOPEN2K flag
        if not __STRICT_ANSI__ or stdc version C99 or greater.
        * libc/include/stdio.h[__STRICT_ANSI__]: Add __USE_XOPEN2K check
        for fseeko and ftello prototypes.
2009-10-20 16:44:11 +00:00
Corinna Vinschen 1b13009b2a * libc/include/wchar.h (struct tm0: Declare as incomplete type. 2009-10-15 08:23:27 +00:00
Corinna Vinschen 597441d79b * libc/locale/nl_langinfo.c (nl_langinfo): Add Cygwin-specific temporary
exception for KOI8 charsets.
2009-10-15 08:08:50 +00:00
Eric Blake e4ba1cf29e * libc/include/sys/unistd.h: Add _PC*, _CS*, and _SC* constants
new to POSIX 2008.
2009-10-14 04:15:25 +00:00
Jeff Johnston 81c59927a9 2009-10-13 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* libc/include/sys/signal.h: Include <sys/types.h> always.
        [__CYGWIN__, __rtems__]: Define kill first argument as pid_t per
        standards.
2009-10-13 17:31:49 +00:00
Jeff Johnston 2072888e66 2009-10-09 Dave Korn <dave.korn@artimi.com>
* libc/include/sys/time.h (_TIMEVAL_DEFINED): Define when
        defining struct timeval.
2009-10-09 18:43:12 +00:00
Corinna Vinschen ec4e5025e9 * libc/locale/locale.c (DEFAULT_LOCALE): New define.
(__default_locale): New global variable set to the default locale.
	(__get_locale_env): Return __default_locale rather than fixed "C".
2009-10-09 08:25:28 +00:00
Jeff Johnston a3a62ae7a5 2009-10-08 Jeff Johnston <jjohnstn@redhat.com>
* configure.host: For RTEMS, define HAVE_ASSERT_FUNC.
        * libc/stdlib/assert.c (_assert_func): Do not specify
        __assert_func if HAVE_ASSERT_FUNC flag is set.
2009-10-08 16:44:10 +00:00
Jeff Johnston 85191fc5aa 2009-10-08 Eric Blake <ebb9@byu.net>
* libc/include/getopt.h (__getopt_r, __getopt_long_r)
        (__getopt_long_only_r): Protect declarations, to avoid compiler
        warning.
2009-10-08 16:26:28 +00:00
Corinna Vinschen 8bd7bd3bc0 * libc/locale/nl_langinfo.c (nl_langinfo): Just return current locale
charset on Cygwin.
2009-10-07 16:45:23 +00:00
Corinna Vinschen 6ff28fc3b1 * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Allow CESU-8 surrogate
value encoding.
	* libc/stdlib/wctomb_r.c (__utf8_mbtowc): Allow CESU-8 surrogate
	value decoding.
2009-10-03 08:51:07 +00:00
Corinna Vinschen 50e4e69c42 * libc/locale/locale.c (loadlocale): Allow "C." same as "C-" as locale
prefix.  Add some words to documentation.
2009-09-29 19:12:28 +00:00
Corinna Vinschen 99dbad651c * libc/stdlib/sb_charsets.c: Throughout, translate undefined
characters to their corresponding Windows Unicode value.
2009-09-29 19:11:01 +00:00
Jeff Johnston 6c249577fb 2009-09-28 Michael Eager <eager@eagercon.com>
* configure.host: Add microblaze.
        * libc/include/machine/ieeefp.h [MICROBLAZE]: Define __IEEE_BIG_ENDIAN.
        * libc/include/machine/setjmp.h [MICROBLAZE]: Define _JBLEN, _JBTYPE.
        * libc/include/sys/config.h [MICROBLAZE]: Define _REENT_SMALL,
        _UNIX98_THREAD_MUTEX_ATTRIBUTES.
        * libc/include/sys/types.h: Treat XMK like rtems, define
        PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_RECURSIVE,
        PTHREAD_MUTEX_DEFAULT, PTHREAD_STACK_MIN, define stuct pthread_attr_s.
        * libc/machine/configure.in: Add microblaze.
        * libc/machine/configure: Add microblaze (not regenerated).
        * libc/machine/microblaze/configure.in: NEW.
        * libc/machine/microblaze/configure: Generate.
        * libc/machine/microblaze/Makefile.am: NEW.
        * libc/machine/microblaze/Makefile.in: Generate.
        * libc/machine/microblaze/{abort.c, strcmp.c, strcpy.c, strlen.c,
        mallocr.c, longjmp.S, setjmp.S}: NEW.
        * libc/stdlib/mallocr.c [MICROBLAZE]: Don't declare sbrk prototype,
        mALLOc(): return malloc value.
2009-09-28 16:42:21 +00:00
Corinna Vinschen a58d484bcf * libc/locale/locale.c (lc_ctype_charset): Set to "UTF-8" on Cygwin.
(lc_message_charset): Ditto.
	(loadlocale): Set charset of the "C" locale to "UTF-8" on Cygwin.
	* libc/stdlib/mbtowc_r.c (__mbtowc): Default to __utf8_mbtowc on
	Cygwin.
	* libc/stdlib/wctomb_r.c (__wctomb): Default to __utf8_wctomb on
	Cygwin.
2009-09-27 12:21:16 +00:00
Eric Blake b14f894fd1 * libc/include/sys/unistd.h (execvpe, fexecve) [__CYGWIN__]:
Add declarations.
2009-09-26 20:59:54 +00:00
Eric Blake 65d436509b * libc/include/sys/unistd.h (eaccess, euidaccess) [__CYGWIN__]:
Add declarations.
2009-09-25 23:57:09 +00:00
Corinna Vinschen c1754722ee * libc/locale/locale.c: Drop Cygwin-specific windows.h include.
(loadlocale): Call __set_charset_from_codepage with 0 codepage.
2009-09-23 17:19:00 +00:00
Jeff Johnston 2ad8d17a16 2009-09-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/include/stdlib.h: Add posix_memalign.
2009-09-22 21:49:20 +00:00
Jeff Johnston bdb08ed44f 2009-09-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.host (*-rtems*): Remove -DMISSING_SYSCALL_NAMES.
        Add -DHAVE_BLKSIZE, -D_NO_WORDEXP -D_NO_POPEN.
2009-09-22 21:24:55 +00:00
Jeff Johnston c3f3d59e43 2009-09-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.host (m32c): Move setting -DABORT_PROVIDED to second
        "case $host".
2009-09-22 21:23:13 +00:00
Christopher Faylor 4945cb2af0 * libc/include/sys/unistd.h: Declare getpagesize as returning POSIX-mandated
int.
* libc/sys/linux/sys/unistd.h: Ditto.
2009-09-19 02:30:51 +00:00
Jeff Johnston a9dd632461 2009-08-31 Takaki Makino <t@snowelm.com>
* libm/machine/i386/f_pow.c(_f_pow): Alter ASM so it works with
        newer gcc versions.
        * libm/maachine/i386/f_powf.c(_f_powf): Ditto.
2009-08-31 22:12:41 +00:00
Jeff Johnston eb9194f52c 2009-08-25 Andy Koppe <andy.koppe@gmail.com>
* libc/stdlib/sb_charsets.c (__micro_atoi): Allow five-digit codepage
        numbers.
        * libc/locale/locale.c (loadlocale): Set MB_CUR_MAX to 1 for KOI8
        charsets.
        * libc/stdlib/local.h (__cp_conv): Remove incorrect number of codepages.
2009-08-25 18:47:24 +00:00
Jeff Johnston 162a23c504 2009-08-24 Corinna Vinschen <corinna@vinschen.de>
* libc/locale/locale.c: Update documentation.
        (loadlocale): Map "KOI8-R" and "KOI8-U" to CP20866 and CP21866.

2009-08-24  Andy Koppe  <andy.koppe@gmail.com>

        * libc/stdlib/sb_charsets.c (__cp_conv): Add KOI8-R (Russian, CP20866)
        and KOI8-U (Ukrainian, CP21866) to Windows codepage conversion tables.
        * libc/ctype/ctype_cp.h (__ctype_cp): Likewise for ctype tables.
2009-08-24 22:11:11 +00:00
Jeff Johnston 4b4a1363aa 2009-08-24 Andy Koppe <andy.koppe@gmail.com>
* libc/ctype/iswspace.c (iswspace): Include "non-breaking
        space" (U+00A0).
        * libc/ctype/iswblank.c (iswblank): Likewise.
2009-08-24 16:59:35 +00:00
Corinna Vinschen 24149e4aa9 * libc/locale/locale.c (loadlocale): Throughout check charset string
case insensitive and store internal charset string uppercased.  Allow
	"UTF8" additionally to "UTF-8".  Add this change to documentation.
2009-08-21 20:56:13 +00:00
Eric Blake 3584ff9cb2 iconv: match SUSv3 prototype
* libc/include/iconv.h (iconv): Match POSIX prototype.
* libc/iconv/lib/iconv.c (iconv): Likewise.
2009-08-21 20:27:10 +00:00
Jeff Johnston c11ba63d52 2009-08-21 Craig Howland <howland@LGSInnovations.com>
* libm/common/s_remquo.c (remquo):  Fix sign of quotient when |x|==|y|.
        * libc/stdio/mktemp.c:  Add #include <stdlib.h> for function prototypes.
2009-08-21 20:25:28 +00:00
Ralf Wildenhues 04189ff92e all-local should depend upon crt0, not all.
* iconvdata/Makefile.am (all): Remove.
	* libc/sys/a29khif/Makefile.am (all-am): Rename from ...
	(all): ... this.
	* libc/sys/arc/Makefile.am: Likewise.
	* libc/sys/arm/Makefile.am: Likewise.
	* libc/sys/d10v/Makefile.am: Likewise.
	* libc/sys/decstation/Makefile.am: Likewise.
	* libc/sys/h8300hms/Makefile.am: Likewise.
	* libc/sys/h8500hms/Makefile.am: Likewise.
	* libc/sys/linux/Makefile.am: Likewise.
	* libc/sys/linux/machine/i386/Makefile.am: Likewise.
	* libc/sys/m88kbug/Makefile.am: Likewise.
	* libc/sys/mmixware/Makefile.am: Likewise.
	* libc/sys/netware/Makefile.am: Likewise.
	* libc/sys/rdos/Makefile.am: Likewise.
	* libc/sys/rtems/Makefile.am: Likewise.
	* libc/sys/sh/Makefile.am: Likewise.
	* libc/sys/sparc64/Makefile.am: Likewise.
	* libc/sys/sun4/Makefile.am: Likewise.
	* libc/sys/sysmec/Makefile.am: Likewise.
	* libc/sys/sysnec810/Makefile.am: Likewise.
	* libc/sys/sysnecv850/Makefile.am: Likewise.
	* libc/sys/sysvi386/Makefile.am: Likewise.
	* libc/sys/sysvnecv70/Makefile.am: Likewise.
	* libc/sys/tic80/Makefile.am: Likewise.
	* libc/sys/w65/Makefile.am: Likewise.
	* libc/sys/z8ksim/Makefile.am: Likewise.
	* iconvdata/Makefile.in: Regenerate.
	* libc/sys/a29khif/Makefile.in: Likewise.
	* libc/sys/arc/Makefile.in: Likewise.
	* libc/sys/arm/Makefile.in: Likewise.
	* libc/sys/d10v/Makefile.in: Likewise.
	* libc/sys/decstation/Makefile.in: Likewise.
	* libc/sys/h8300hms/Makefile.in: Likewise.
	* libc/sys/h8500hms/Makefile.in: Likewise.
	* libc/sys/linux/Makefile.in: Likewise.
	* libc/sys/linux/machine/i386/Makefile.in: Likewise.
	* libc/sys/m88kbug/Makefile.in: Likewise.
	* libc/sys/mmixware/Makefile.in: Likewise.
	* libc/sys/netware/Makefile.in: Likewise.
	* libc/sys/rdos/Makefile.in: Likewise.
	* libc/sys/rtems/Makefile.in: Likewise.
	* libc/sys/sh/Makefile.in: Likewise.
	* libc/sys/sparc64/Makefile.in: Likewise.
	* libc/sys/sun4/Makefile.in: Likewise.
	* libc/sys/sysmec/Makefile.in: Likewise.
	* libc/sys/sysnec810/Makefile.in: Likewise.
	* libc/sys/sysnecv850/Makefile.in: Likewise.
	* libc/sys/sysvi386/Makefile.in: Likewise.
	* libc/sys/sysvnecv70/Makefile.in: Likewise.
	* libc/sys/tic80/Makefile.in: Likewise.
	* libc/sys/w65/Makefile.in: Likewise.
	* libc/sys/z8ksim/Makefile.in: Likewise.
2009-08-19 20:04:45 +00:00
Ralf Wildenhues 2f0e5052d3 * configure.in (newlib_cv_ldbl_eq_dbl): Rename cache variable
from newlib_ldbl_eq_dbl.
	* configure: Regenerate.
2009-08-19 19:56:05 +00:00
Eric Blake 84d6be5fa3 Fix 'make info' to work again.
* libc/Makefile.am (SUBDEFS): Correctly build popen docs.
* libc/libc.texinfo (Top): Add posix node to menu.
2009-08-19 12:38:09 +00:00
Jeff Johnston 7dc54c36da 2009-08-18 Jeff Johnston <jjohnstn@redhat.com>
* newlib.hin: Add comment regarding file being manually edited.
        * Makefile.am: Add no-op rule for newlib.hin.
        * Makefile.in: Regenerated.
2009-08-18 21:48:05 +00:00
Jeff Johnston 66b452d6f0 2009-08-18 Jeff Johnston <jjohnstn@redhat.com>
* acconfig.h: Add templates for _HAVE_LONG_DOUBLE and _LDBL_EQ_DBL.
2009-08-18 19:57:59 +00:00
Eric Blake e9708d920c * libc/posix/popen.c (popen): Fix documented prototype. 2009-08-18 17:07:55 +00:00
Eric Blake a051160962 Improve popen compatibility with glibc.
* libc/posix/popen.c (popen): The 2006-08-22 change to use
FD_CLOEXEC disagrees with other implementations; instead, use
pidlist to work even when fcntl is not available.  Meanwhile,
support the 'e' modifier to set CLOEXEC, as in glibc.  Drop
cygwin-specific code, now that cygwin has its own version.
* libc/posix/Makefile.am (CHEWOUT_FILES): Document popen.
* libc/posix/posix.tex: New file.
2009-08-18 16:43:21 +00:00
Jeff Johnston 56dbf99329 2009-08-17 Craig Howland <howland@LGSInnovations.com>
* libc/string/wcsncpy.c (wcsncpy):  Re-write function based on small
        version of strncpy() (fixing two bugs).
2009-08-18 16:03:06 +00:00
Corinna Vinschen af0a038ecb ChangeLog: Fix typo in "typo". 2009-08-13 07:41:35 +00:00
Corinna Vinschen 61189f19de * libc/stdio/mktemp.c (mkdtemp): Fix type in function name. 2009-08-13 07:19:33 +00:00
Jeff Johnston 12387ab6f7 2009=08-12 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/mktemp.c (_gettemp): Do not call _mkdir_r unless
        HAVE_MKDIR is defined.

2009-08-12  Hans-Peter Nilsson  <hp@axis.com>

        * libc/include/reent.h: Add prototype and definition of _mkdir_r.
        * libc/reent/Makefile.am (GENERAL_SOURCES): Add mkdirr.c.
        (CHEWOUT_FILES): Add mkdirr.def.
        * libc/reent/Makefile.in: Regenerate.
        * libc/reent/mkdirr.c: New file.
2009-08-12 18:22:38 +00:00
Jeff Johnston 5f8c90bbc0 2009-08-10 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/wcstombs.c: Change documentation to specify size_t
        return type instead of int.
2009-08-10 16:23:20 +00:00
Jeff Johnston 1cc1af42c1 2009-07-29 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/a64l.c: Fix to use 'a' instead of 'A' in calculation
        when a lower-case character is detected.
2009-07-29 22:33:40 +00:00
Corinna Vinschen a67f77af1a * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Rework UTF-16 surrogate
pair handling to be more bullet-proof even with incomplete UTF-8
	sequences.  Add check for 4 byte sequences resulting in values
	outside the valid Unicode range.  Add a comment to clarify checking
	for invalid CESU-8 sequences.
2009-07-29 08:31:30 +00:00
Corinna Vinschen ecf5c883df * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Fix incrementing n in case
of handling incomplete sequences.
2009-07-28 16:49:19 +00:00
Eric Blake d6438f13d1 Avoid a fault from locking a closed standard file.
* libc/stdio/fflush.c (_fflush_r): Give up early if stream has
been previously closed.
2009-07-22 02:17:12 +00:00
Jeff Johnston 664f00763b 2009-07-09 Craig Howland <howland@LGSInnovations.com>
* libm/math/ef_scalb.c:  Replace isnanf() (pre-C99 function call) with
        isnan() (C99 macro).
        * libm/math/wf_log.c:  Ditto.
        * libm/math/wf_j0.c:  Ditto.
        * libm/math/wf_sqrt.c:  Ditto.
        * libm/math/wf_pow.c:  Ditto.
        * libm/math/wf_fmod.c:  Ditto.
        * libm/math/wf_remainder.c:  Ditto.
        * libm/math/wf_scalb.c:  Ditto.
        * libm/math/wf_atanh.c:  Ditto.
        * libm/math/wf_cosh.c:  Ditto.
        * libm/math/wf_acos.c:  Ditto.
        * libm/math/wf_acosh.c:  Ditto.
        * libm/math/wf_jn.c:  Ditto.
        * libm/math/wf_log10.c:  Ditto.
        * libm/math/wf_asin.c:  Ditto.
        * libm/math/wf_j1.c:  Ditto.
        * libm/common/sf_isnan.c:  Add #include <ieeefp.h>, fix comment.
        * libm/common/sf_isinf.c:  Add #include <ieeefp.h>, adjust comment to
        match that from s_isinf.c.
        * libc/include/machine/ieeefp.h:  Simplify isinf and isnan macros to
        remove un-necessary extension use (in a similar manner to as was
        recently done in math.h).
        * libc/include/math.h:  Remove isnanf and isinff prototypes (are in
        ieeefp.h).
        * libm/machine/spu/sf_isinf.c:  Fix comment (remove <math.h>).
2009-07-09 17:04:56 +00:00
Jeff Johnston 394660ec2f 2009-07-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/sys/features.h: Enable UNIX98 mutex attributes
        for RTEMS.
2009-07-06 18:59:04 +00:00
Eric Blake c52ac05c3a Add mkdtemp, mkstemps.
* libc/stdio/mktemp.c: Fix documentation.
(_gettemp): Add domkdir and length parameters.  Check for
insufficient 'X' suffix.  Drop cygwin-specific code.
(_mkstemp_r, _mktemp_r, mkstemp, mktemp): Adjust clients.
(_mkdtemp_r, _mkstemps_r, mkdtemp, mkstemps): New functions.
* libc/include/stdlib.h (_mkdtemp_r, _mkstemps_r, mkdtemp)
(mkstemps): Declare them.
2009-07-03 12:03:25 +00:00
Eric Blake ce1eb6bba0 Add fpurge.
* libc/stdio/fpurge.c (fpurge, _fpurge_r): New file.
* libc/stdio/Makefile.am (ELIX_4_SOURCES, CHEWOUT_FILES, fpurge):
Build it.
* libc/stdio/Makefile.in: Regenerated.
* libc/include/stdio.h (fpurge, _fpurge_r): New declarations.
* libc/stdio/stdio.tex: Build documentation.
2009-07-03 11:58:04 +00:00
Jeff Johnston 4f4622807f 2009-06-23 Jeff Johnston <jjohnstn@redhat.com>
* Makefile.am (MATHOBJS_IN_LIBC): Add s_fpclassify and
        sf_fpclassify as these are now used for infinity testing.
        * Makefile.in: Regenerated.
2009-06-23 16:04:33 +00:00
Jeff Johnston ab9ef0fa5f 2009-06-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/sys/rtems/machine/param.h: Change ALIGNBYTES
        so it can point to an aligned structure or double.
2009-06-19 18:15:35 +00:00
Corinna Vinschen e53c92a80e * libc/locale/locale.c (loadlocale): Add handling of "@cjknarrow"
modifier on _MB_CAPABLE targets.  Add comment to explain.  Improve
	documentation.
2009-06-18 09:13:39 +00:00
Jeff Johnston a2c3c5dab4 2009-06-17 Michael Eager <eager@eagercon.com>
* libc/include/pthread.h: Support XMK (Xilinx) BSP, add RTEMS to
        PTHREAD_MUTEX_NORMAL.
        * libc/include/sys/features.h: Same.
        * libc/include/sys/types.h: Same.
2009-06-17 16:47:02 +00:00
Corinna Vinschen 999820f6ab * libc/include/locale.h (struct lconv): Add missing members required
by POSIX.1-2008.
	* libc/locale/locale.c (lconv): Initialize new members to default
	values in "C" locale.
2009-06-16 19:45:17 +00:00
Corinna Vinschen 1c5e84dd08 * libc/stdio/vfprintf.c (_VFPRINTF_R): Use actual length of
radix char instead of assuming length 1.
	* libc/stdlib/gdtoa-gethex.c: Remove use of USE_LOCALE.
	(gethex): Allow multibyte decimal point.
	Fix compiler warnings due to different signedness of pointer types.
	* libc/stdlib/strtod.c: Remove use of USE_LOCALE.
	(_strtod_r): Allow multibyte decimal point.
	* libc/stdlib/wcstod.c (_wcstod_r): Evaluate correct wide char
	endptr position if the decimal point is a multibyte char.
2009-06-16 17:44:20 +00:00
Jeff Johnston 1a99b6f85a 2009-06-16 Craig Howland <howland@LGSInnovations.com>
* libc/ctype/local.h (__locale_charset): Add arguments to
        prototype
        * libc/stdlib/local.h (__locale_charset): Ditto.
2009-06-16 16:02:07 +00:00
Jeff Johnston aa201fc9df 2009-06-16 Craig Howland <howland@LGSInnovations.com>
* libc/include/math.h:  Simplify fpclassify, isinf, isnan, and signbit
        macros to remove un-necessary extension use.  isinf and isnan also
        changed to use fpclassify.  isfinite macro modified to run faster by
        only calling fpclassify once instead of possibly twice.
2009-06-16 15:55:06 +00:00
Corinna Vinschen 5c1939c8c4 * libc/ctype/tolower.c (tolower): Cast conversion result from
mbtowc/wctomb to unsigned char to avoid negative return values.
	* libc/ctype/toupper.c (toupper): Ditto.
2009-06-09 11:33:57 +00:00
Corinna Vinschen c801709ed5 * libc/string/wcwidth.c: Optimize for speed.
* libc/locale/locale.c (lc_ctype_cjk_lang): New static int.
	(loadlocale): In case of setting LC_CTYPE, set lc_ctype_cjk_lang
	to 1 if the language is "jp", "ko", or "zh", to 0 otherwise.
	(__locale_cjk_lang): New function.
	* libc/string/local.h (__locale_cjk_lang): Declare.
	* libc/string/wcwidth.c: Fix comments.
	(__wcwidth): Handle CJK Ambiguous Width characters according
	to setting returned by __locale_cjk_lang.
2009-06-03 19:28:22 +00:00
Jeff Johnston 9b09fb22e2 2009-06-02 Richard Earnshaw <rearnsha@arm.com>
* libc/include/sys/config.h: Remove specification of _REENT_SMALL for
        thumb2.
2009-06-02 20:39:17 +00:00
Corinna Vinschen e17c0a23e3 * libc/ctype/jp2uc.c: Skip all definition if defined __CYGWIN__.
(__jp2uc): Change the scope to static function.
	* libc/ctype/local.h (_jp2uc): Define as macro if defined __CYGWIN__.
	* libc/string/local.h (_jp2uc): Include ../ctype/local.h.
2009-06-02 09:41:06 +00:00
Jeff Johnston 0072a41129 2009-05-27 Neal H. Walfield <neal@gnu.org>
* libc/include/machine/setjmp.h (sigjmp_buf): Size according to
        _JBTYPE and the size of sigset_t.
2009-05-27 18:54:58 +00:00
Jeff Johnston de8a5b7810 2009-05-15 Craig Howland <howland@LGSInnovations.com>
* configure.in:  Add configuration test for long double type existing
        and set flag _HAVE_LONG_DOUBLE if true.  Fix INIT_ARRAY (.init_array)
        and _LDBL_EQ_DBL tests to not link so that will work with
        cross-compilers.
        * configure: Regenerated.
        * Makefile.in: Ditto.
        * newlib.hin: Add _HAVE_LONG_DOUBLE flag.
        * libc/include/math.h:  Change non-builtin defines for HUGE_VAL,
        HUGE_VALF, and HUGE_VALL to be constant expressions.  Add definitions
        for the non-builtin case for INFINITY and NAN.  Gate HUGE_VALL and
        union __ldmath definitions with (new) _HAVE_LONG_DOUBLE.
        *libm/common/s_infconst.c:  Change definitions to use values from
        float.h instead of non-so-portable integer forms.  Mark as being
        deprecated (because now removed from math.h, are not used anywhere
        in Newlib, itself).
2009-05-15 16:15:57 +00:00
Corinna Vinschen 098a75dc51 * libc/string/local.h: New file.
* libc/string/wcswidth.c (wcswidth):  Convert japanese wide
	characters to Unicode here.  Handle surrogate pairs for UTF-16
	systems.  Call __wcwidth rather than wcwidth.
	* libc/string/wcwidth.c: New implementation using Markus Kuhn's
	wcwidth implementation for Unicode.
	(bisearch): New static function.
	(__wcwidth): New function.  Take wint_t rather than wchar_t as
	parameter to allow full Unicode handling on UTF-16 systems.
	Move old wcwidth implementation here for non-multibyte aware
	systems.
	(wcwidth): Convert japanese wide characters to Unicode here.
	Call __wcwidth rather than using iswprint/iswcntrl.
2009-05-15 11:40:28 +00:00
Corinna Vinschen 1cf38d075c * libc/ctype/local.h (JP_JIS, JP_SJIS, JP_EUCJP): Move definition
to jp2uc.c.
	(__jp2uc): Remove declaration.
	(_jp2uc): Declare.
	* libc/ctype/jp2uc.c (JP_JIS, JP_SJIS, JP_EUCJP): Define.
	(__jp2uc): Remove Cygwin special case.
	(_jp2uc): New function.  On Cygwin, just return c.
	* libc/ctype/iswalpha.c (iswalpha): Just call _jp2uc.
	* libc/ctype/iswblank.c (iswblank): Ditto.
	* libc/ctype/iswcntrl.c (iswcntrl): Ditto.
	* libc/ctype/iswprint.c (iswprint): Ditto.
	* libc/ctype/iswpunct.c (iswpunt): Ditto.
	* libc/ctype/iswspace.c (iswspace): Ditto.
	* libc/ctype/towlower.c (towlower): Ditto.
	* libc/ctype/towupper.c (towupper): Ditto.
2009-05-14 20:16:21 +00:00
Jeff Johnston 5900080d7d 2009-05-13 Paul Brook <paul@codesourcery.com>
* libc/machine/arm/setjmp.S: Don't bother saving IP.  Copy SP to
        IP before saving.  Likewise when restoring.
2009-05-13 18:31:55 +00:00
Jeff Johnston eba36c51fa 2009-05-13 Paul Brook <paul@codesourcery.com>
* libc/machine/arm/setjmp.S: Add ARMv6-M implementation.
2009-05-13 18:28:49 +00:00
Corinna Vinschen 136033a852 * libc/locale/locale.c (setlocale): Don't build on Cygwin. 2009-05-13 14:54:11 +00:00
Jeff Johnston ca3a040abf 2009-05-11 Craig Howland <howland@LGSInnovations.com>
* libm/machine/i386/f_llrint.c: Remove llrint() definition.
        * libm/machine/i386/f_llrintf.c: Remove llrintf() definition.
2009-05-11 21:58:05 +00:00
Nick Clifton 5796080933 * MAINTAINERS: Add myself as a maintainer for the MN10300 and to
the write-after-approval list.
2009-05-08 10:00:25 +00:00
Anthony Green 2585eb1832 Add self to MAINTAINERS file. Tweak moxie stack position. 2009-05-01 02:53:25 +00:00
Eric Blake 82b77480f7 Allow gcc warning for toupper even with extended charsets.
* libc/include/ctype.h (toupper, tolower)
[_MB_EXTENDED_CHARSETS_ISO]: Allow gcc warning when called with
'char' even when we must call the function for correct behavior.
[!_MB_EXTENDED_CHARSETS_ISO]: Fix regression in result type.
2009-04-30 22:53:00 +00:00
Jeff Johnston bcde129400 2009-04-24 Jeff johnston <jjohnstn@redhat.com>
* libc/stdio/fgetc.c: Make sure sfp lock is acquired before the
        file lock and released before the file lock to avoid a deadlock
        scenario.
        * libc/stdio/fgets.c: Ditto.
        * libc/stdio/fgetwc.c: Ditto.
        * libc/stdio/fgetws.c: Ditto.
        * libc/stdio/fread.c: Ditto.
        * libc/stdio/fseek.c: Ditto.
        * libc/stdio/getc.c: Ditto.
        * libc/stdio/getdelim.c: Ditto.
        * libc/stdio/gets.c: Ditto.
2009-04-24 22:52:52 +00:00
Jeff Johnston 35f31b6a98 2009-04-24 Jeff johnston <jjohnstn@redhat.com>
* configure.in: Add configuration test for long double equals dbl
        and set flag _LDBL_EQ_DBL if true.
        * configure: Regenerated.
        * newlib.hin: Add _LDBL_EQ_DBL flag.
        * libc/include/math.h: Use _LDBL_EQ_DBL flag instead of
        _HAVE_LDBL_MATH.
        * libc/include/stdlib.h: Use _LDBL_EQ_DBL flag instead of
        _HAVE_LDBL_STDLIB.
        * libc/common/local.h: Remove _LDBL_EQ_DBL flag setting.
        * libc/stdlib/local.h: Ditto.
2009-04-24 22:49:55 +00:00
Jeff Johnston de19487224 2009-04-24 Joseph Myers <joseph@codesourcery.com>
* libc/include/stdint.h (UINTPTR_MAX): Define to __UINTPTR_MAX__
	if __UINTPTR_MAX__ defined.
2009-04-24 21:55:07 +00:00
Eric Blake 190ccfc18c Be namespace clean in ctype.h.
* libc/include/ctype.h (_tolower, _toupper, isalpha, isupper)
(islower, isdigit, isxdigit, isspace, ispunct, isalnum)
(isprint, isgraph, iscntrl, isblank, toupper, tolower)
(isascii, toascii): Don't use 'c' as macro parameter name.
2009-04-24 12:27:36 +00:00
Eric Blake 1335bf3c5d Trigger gcc warning if isFoo macros are called with plain char.
* libc/include/ctype.h (isalpha, isupper, islower, isdigit)
(isxdigit, isspace, ispunct, isalnum, isprint, isgraph)
(iscntrl, isblank, toupper, tolower): Rewrite to let 'gcc -Wall'
warn when user calls macro with a char argument.
2009-04-24 12:20:07 +00:00
Jeff Johnston 5921804481 2009-04-23 Mike Burgess <wizardsguild@earthlink.net>
* libc/string/strcasecmp.c: Optimized rewrite.
        * libc/string/strncasecmp.c: Fix description.
        * libc/string/strlwr.c: Avoid passing signed char to tolower.
        * libc/string/strupr.c: Avoid passing signed char to tolower.
2009-04-23 18:11:22 +00:00
Jeff Johnston bbb9d4fde3 2009-04-23 Paul Brook <paul@codesourcery.com>
Kazu Hirata  <kazu@codesourcery.com>

        * libc/stdlib/__atexit.c (__register_exitproc): Use weak reference
        to malloc.  Allocate dynamically only if it is present.
        * libc/stdlib/__call_atexit.c (__call_exitprocs): Use weak
        reference to free.  Call free only if it is present.
2009-04-23 17:54:22 +00:00
Jeff Johnston 2beb9fbb02 2009-04-22 Anthony Green <green@moxielogic.com>
* configure.host: Add moxie support.
        * libc/machine/configure.in: Add moxie support.
        * libc/machine/configure: Rebuilt.
        * libc/machine/moxie/aclocal.m4: New file.
        * libc/machine/moxie/configure: New file.
        * libc/machine/moxie/configure.in: New file.
        * libc/machine/moxie/Makefile.am: New file.
        * libc/machine/moxie/Makefile.in: New file.
        * libc/machine/moxie/setjmp.S: New file.
        * libc/include/machine/setjmp.h (_JBLEN): Define for moxie.
        * libc/include/machine/ieeefp.h: Add moxie support.
2009-04-22 19:52:49 +00:00
Corinna Vinschen 755b125b77 * libc/stdio/local.h (__chclass, __state_table, __action_table):
Add extern to the declarations.
	* libc/stdlib/local.h (__iso_8859_conv, __cp_conv): Likewise.
2009-04-22 08:30:03 +00:00
Corinna Vinschen c28545227a * libc/ctype/ctype_.c (_CTYPE_DATA_128_255): Rename from
_CTYPE_DATA_128_256.
	* libc/ctype/ctype_cp.h: Split off all character class values for
	character 255 from the rest of the definitions.
	(__ctype_cp): Use the new definitions.  Make sure that the table
	always contains 0 for EOF (-1).
	* libc/ctype/ctype_iso.h: Ditto.
2009-04-21 20:09:01 +00:00
Jeff Johnston 161e368ac4 2009-04-21 Sandra Loosemore <sandra@codesourcery.com>
* libc/reent/impure.c (__sf_fake_stdin, __sf_fake_stdout)
        (__sf_fake_stderr): Declare locally with weak attribute.
2009-04-21 18:38:53 +00:00
Jeff Johnston 15b71e6679 2009-04-21 Mark Mitchell <mark@codesourcery.com>
* libc/include/_ansi.h: Move C++ defines to top of file.
        (_NOTHROW): New macro.
        (_EXFUN_NOTHROW): Likewise.
        * libc/include/stdlib.h (calloc): Declare with _EXFUN_NOTHROW.
        (free): Likewise.
        (malloc): Likewise.
        (realloc): Likewise.
        (_malloc_r): Likewise.
        (_callor_r): Likewise.
        (_free_r): Likewise.
        (_realloc_r): Likewise.
2009-04-21 18:24:59 +00:00
Jeff Johnston bd5f034706 2009-04-20 Jeff johnston <jjohnstn@redhat.com>
* libc/include/math.h: Change _LDBL_EQ_DBL flag usage to
        be _HAVE_LDBL_MATH.
        * libc/include/stdlib.h: Change _LDBL_EQ_DBL flag usage to
        be _HAVE_LDBL_STDLIB.
2009-04-20 18:06:14 +00:00
Jeff Johnston 1b8e360e06 2009-04-17 Jeff johnston <jjohnstn@redhat.com>
* libc/include/machine/ieeefp.h (_LDBL_EQ_DBL): Remove.
        * libc/stdlib/local.h (_LDBL_EQ_DBL): Add.
        * libc/stdlib/strtold.c: Include local.h.
        * libc/stdlib/wcstold.c: Likewise.
        * libm/common/atanl.c: Likewise.
        * libm/common/cosl.c: Likewise.
        * libm/common/sinl.c: Likewise.
        * libm/common/modfl.c: Likewise.
        * libm/common/frexpl.c: Likewise.
        * libm/common/tanhl.c: Likewise.
        * libm/common/tanl.c: Likewise.
        * libm/common/expm1l.c: Likewise.
        * libm/common/log1pl.c: Likewise.
        * libm/common/ceill.c: Likewise.
        * libm/common/fabsl.c: Likewise.
        * libm/common/floorl.c: Likewise.
        * libm/common/acosl.c: Likewise.
        * libm/common/asinl.c: Likewise.
        * libm/common/atan2l.c: Likewise.
        * libm/common/coshl.c: Likewise.
        * libm/common/expl.c: Likewise.
        * libm/common/fmodl.c: Likewise.
        * libm/common/hypotl.c: Likewise.
        * libm/common/ldexpl.c: Likewise.
        * libm/common/log10l.c: Likewise.
        * libm/common/logl.c: Likewise.
        * libm/common/powl.c: Likewise.
        * libm/common/sqrtl.c: Likewise.
        * libm/common/copysignl.c: Likewise.
        * libm/common/ilogbl.c: Likewise.
        * libm/common/nanl.c: Likewise.
        * libm/common/cbrtl.c: Likewise.
        * libm/common/asinhl.c: Likewise.
        * libm/common/nextafterl.c: Likewise.
        * libm/common/rintl.c: Likewise.
        * libm/common/scalbnl.c: Likewise.
        * libm/common/exp2l.c: Likewise.
        * libm/common/fdiml.c: Likewise.
        * libm/common/fmal.c: Likewise.
        * libm/common/fmaxl.c: Likewise.
        * libm/common/fminl.c: Likewise.
        * libm/common/lrintl.c: Likewise.
        * libm/common/lroundl.c: Likewise.
        * libm/common/nearbyintl.c: Likewise.
        * libm/common/remquol.c: Likewise.
        * libm/common/roundl.c: Likewise.
        * libm/common/scalblnl.c: Likewise.
        * libm/common/truncl.c: Likewise.
        * libm/common/acoshl.c: Likewise.
        * libm/common/atanhl.c: Likewise.
        * libm/common/erfcl.c: Likewise.
        * libm/common/erfl.c: Likewise.
        * libm/common/lgammal.c: Likewise.
        * libm/common/remainderl.c: Likewise.
        * libm/common/tgammal.c: Likewise.
        * libm/common/sinhl.c: Likewise.
        * libm/common/llroundl.c: Likewise.
        * libm/common/llrintl.c: Likewise.
        * libm/common/local.h: New file with _LDBL_EQ_DBL macro.
2009-04-17 22:15:43 +00:00
Jeff Johnston ad9bb48fbe 2009-04-17 Ken Werner <ken.werner@de.ibm.com>
* libc/include/machine/ieeefp.h: _LDBL_EQ_DBL check fixed.
        * libc/include/math.h (llrintl): Declare.
        * libm/common/llrintl.c: New File.
        * libm/common/Makefile.am: New File added.
        * libm/common/Makefile.in: Regenerate.
2009-04-17 20:54:19 +00:00
Jeff Johnston 34d6b436e2 2009-04-17 Ken Werner <ken.werner@de.ibm.com>
* libc/configure.in: Change AC_TRY_COMPILE to AC_TRY_COMMAND to
        avoid executable test.
        * libc/configure: Regenerate.
2009-04-17 20:50:44 +00:00
Jeff Johnston e3228f89a4 2009-04-17 Jeff johnston <jjohnstn@redhat.com>
* configure.in: Remove _HAVE_ARRAY_ALIASING check.
        * configure: Regenerated.
        * Makefile.in: Regenerated.
        * newlib.hin: Remove _HAVE_ARRAY_ALIASING flag.
        * libc/ctype/ctype_.c: Do not check for _HAVE_ARRAY_ALIASING.
        * libm/configure.in: Change AC_TRY_COMPILE to AC_TRY_COMMAND to
        avoid executable test.
        * libm/configure: Regenerated.
2009-04-17 20:48:34 +00:00
Jeff Johnston 9c4032e768 2009-04-17 Jeff johnston <jjohnstn@redhat.com>
* configure.in: Remove _HAVE_ARRAY_ALIASING check.
        * configure: Regenerated.
        * newlib.hin: Remove _HAVE_ARRAY_ALIASING flag.
        * libc/ctype/ctype_.c: Do not check for _HAVE_ARRAY_ALIASING.
        * libm/configure.in: Change AC_TRY_COMPILE to AC_TRY_COMMAND to
        avoid executable test.
        * libm/configure: Regenerated.
2009-04-17 16:18:17 +00:00
Jeff Johnston c4c8a3fd46 2009-04-16 Jeff johnston <jjohnstn@redhat.com>
* libc/misc/init.c (__libc_fini_array): Process fini_array in
        reverse order as compliant with the ELF specification.
2009-04-16 19:16:41 +00:00
Jeff Johnston f22a7456a1 2009-04-16 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/Makefile.am: Add new File.
        * libc/machine/spu/Makefile.in: Regenerate.
        * libc/machine/spu/fdopen.c: New file.
2009-04-16 18:38:23 +00:00
Jeff Johnston 34c5e58ebb 2009-04-16 Hans-Peter Nilsson <hp@axis.com>
* libc/include/stdint.h (INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX): Define.
2009-04-16 18:29:51 +00:00
Jeff Johnston 65f414dc16 2009-04-16 Ken Werner <ken.werner@de.ibm.com>
* libm/libm.texinfo: Add long double function support chapter.
        * libc/include/machine/ieeefp.h: Add _LDBL_EQ_DBL define.
        * libc/include/stdlib.h: Include <machine/ieeefp.h>.
        (strtold, wcstold): Declare.
        * libc/stdlib/strtold.c: New File.
        * libc/stdlib/wcstold.c: Likewise.
        * libc/configure.in: Add long double check.
        * libc/configure: Regenerate.
        * libc/stdlib/Makefile.am: Add strtold.c and wcstold.c.
        * libc/stdlib/Makefile.in: Regenerate.
        * libc/include/math.h (atanl, cosl, sinl, tanl, tanhl): Declare.
        (frexpl, modfl, ceill, fabsl, floorl, log1pl, expm1l, acosl): Ditto.
        (asinl, atan2l, coshl, sinhl, expl, ldexpl, logl, log10l, powl): Ditto.
        (sqrtl, fmodl, hypotl, copysignl, nanl, ilogbl, asinhl, cbrt): Ditto.
        (nextafterl, rintl, scalbnl, exp2l, scalblnl, tgammal): Ditto.
        (nearbyintl, lrintl, llrintl, roundl, lroundl, llround): Ditto.
        (llroundl, truncl, remquol, fdiml, fmaxl, fminl, fmal, acoshl): Ditto.
        (atanhl, remainderl, lgammal, erfl, erfcl): Ditto.
        * libm/common/atanl.c: New File.
        * libm/common/cosl.c: Likewise.
        * libm/common/sinl.c: Likewise.
        * libm/common/modfl.c: Likewise.
        * libm/common/frexpl.c: Likewise.
        * libm/common/tanhl.c: Likewise.
        * libm/common/tanl.c: Likewise.
        * libm/common/expm1l.c: Likewise.
        * libm/common/log1pl.c: Likewise.
        * libm/common/ceill.c: Likewise.
        * libm/common/fabsl.c: Likewise.
        * libm/common/floorl.c: Likewise.
        * libm/common/acosl.c: Likewise.
        * libm/common/asinl.c: Likewise.
        * libm/common/atan2l.c: Likewise.
        * libm/common/coshl.c: Likewise.
        * libm/common/expl.c: Likewise.
        * libm/common/fmodl.c: Likewise.
        * libm/common/hypotl.c: Likewise.
        * libm/common/ldexpl.c: Likewise.
        * libm/common/log10l.c: Likewise.
        * libm/common/logl.c: Likewise.
        * libm/common/powl.c: Likewise.
        * libm/common/sqrtl.c: Likewise.
        * libm/common/copysignl.c: Likewise.
        * libm/common/ilogbl.c: Likewise.
        * libm/common/nanl.c: Likewise.
        * libm/common/cbrtl.c: Likewise.
        * libm/common/asinhl.c: Likewise.
        * libm/common/nextafterl.c: Likewise.
        * libm/common/rintl.c: Likewise.
        * libm/common/scalbnl.c: Likewise.
        * libm/common/exp2l.c: Likewise.
        * libm/common/fdiml.c: Likewise.
        * libm/common/fmal.c: Likewise.
        * libm/common/fmaxl.c: Likewise.
        * libm/common/fminl.c: Likewise.
        * libm/common/lrintl.c: Likewise.
        * libm/common/lroundl.c: Likewise.
        * libm/common/nearbyintl.c: Likewise.
        * libm/common/remquol.c: Likewise.
        * libm/common/roundl.c: Likewise.
        * libm/common/scalblnl.c: Likewise.
        * libm/common/truncl.c: Likewise.
        * libm/common/acoshl.c: Likewise.
        * libm/common/atanhl.c: Likewise.
        * libm/common/erfcl.c: Likewise.
        * libm/common/erfl.c: Likewise.
        * libm/common/lgammal.c: Likewise.
        * libm/common/remainderl.c: Likewise.
        * libm/common/tgammal.c: Likewise.
        * libm/common/sinhl.c: Likewise.
        * libm/common/llroundl.c: Likewise.
        * libm/configure.in: Add long double check.
        * libm/configure: Regenerate.
        * libm/common/Makefile.am: Add new files.
        * libm/common/Makefile.in: Regenerate.
2009-04-16 18:24:35 +00:00
Corinna Vinschen a29a769342 * libc/ctype/ctype_.c (_CTYPE_DATA_0_127): Remove _B flag from TAB.
* libc/ctype/ctype_cp.h: Mark non-cased letters in tables for codepages
	720, 862, 874, 1255, and 1256 to _U|_L.  Fix a couple of incorrect
	class mappings.
	* libc/ctype/ctype_iso.h: Mark non-cased letters in ISO-8859 tables
	6, 8, and 11 to _U|_L.  Fix a couple of incorrect class mappings.
	* libc/ctype/isblank.c (isblank): Special case TAB.
	* libc/ctype/islower.c (islower): Check explicitely for _L flag only
	in (_U|_L).
	* libc/ctype/isupper.c (isupper): Ditto, but check for _U flag.
	* libc/include/ctype.h (islower): Same in macro.
	(isupper): Ditto.
	(isblank): Special case TAB.  Redefine macro for GCC only.
2009-04-09 10:37:58 +00:00
Corinna Vinschen 9b26525ec3 * libc/stdlib/local.h (__mbtowc): Declare extern.
(__wctomb): Ditto.
2009-04-09 08:24:37 +00:00
Jeff Johnston 712789c794 2009-04-08 Ken Werner <ken.werner@de.ibm.com>
* configure.in: Add square brackets for the array aliasing conftest.
        * configure: Regenerate.
2009-04-08 20:00:01 +00:00
Jeff Johnston 3d66f2c9ae 2009-04-06 Mike Burgess <wizardsguild@earthlink.net>
* libc/string/strncasecmp.c: Optimized rewrite.
2009-04-06 22:42:08 +00:00
Jeff Johnston 43b1cfeca5 2009-04-06 Ken Werner <ken.werner@de.ibm.com>
* libc/include/sys/features.h: Undefine _POSIX_TIMERS for spu.
        * libc/include/machine/time.h (nanosleep): Declare.
2009-04-06 22:04:33 +00:00
Corinna Vinschen 2f1769f431 * libc/locale/locale.c (loadlocale): Set mbc_max to 3 for EUCJP. 2009-04-06 10:36:49 +00:00
Corinna Vinschen 80317fe50f * libc/stdlib/wcstombs.c: Fix datatypes in documentation. 2009-04-04 16:00:31 +00:00
Corinna Vinschen 56c5c08a5d * libc/include/stdio.h (_ELIDABLE_INLINE): Move definition from here...
* libc/include/_ansi.h (_ELIDABLE_INLINE): ..to here.
2009-04-04 15:44:19 +00:00
Jeff Johnston d74c61c2be 2009-04-03 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* libc/include/stdio.h [__SCLE] (__sgetc_r): Prototype before define
        to avoid a warning with -Wmissing-prototypes.
2009-04-03 22:46:15 +00:00
Jeff Johnston 0463fc624c 2009-04-03 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/mmap_ea.c (mmap_ea): Check length argument.
2009-04-03 22:42:31 +00:00
Jeff Johnston 816c3d2968 2009-04-03 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/sys/linux_syscalls.h: include <sys/types.h>
        (linux_getpid, linux_gettid): Declare.
2009-04-03 22:34:17 +00:00
Jeff Johnston f42552e9e1 2009-04-03 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/spu-gmon.c: Tweaks to support simultaneous SPU
        profiling.
2009-04-03 22:29:24 +00:00
Jeff Johnston 823f6f6655 2009-04-03 Ken Werner <ken.werner@de.ibm.com>
* libc/include/math.h: Remove duplicate copysign prototype.
        Fix __math_68881 define typo.  Guard functions of the rint family.
2009-04-03 17:42:27 +00:00
Jeff Johnston 8ca79ad630 2009-04-03 Craig Howland <howland@LGSInnovations.com>
* libm/common/s_llrint.c: New file, implementing llrint().
        * libm/common/sf_llrint.c: New file, implementing llrintf().
        * libm/common/Makefile.am:  Add s_llrint.c (src); sf_llrint.c (fsrc).
        * libm/common/Makefile.in:  Regenerate.
2009-04-03 17:39:24 +00:00
Corinna Vinschen 72c79be10e * libc/ctype/ctype_c.c: Move inclusion of ctype_iso.h and
ctype_cp.h out of ALLOW_NEGATIVE_CTYPE_INDEX case.
	(__ctype_ptr__): Constify in !_MB_CAPABLE case.  Otherwise,
	de-constify in !ALLOW_NEGATIVE_CTYPE_INDEX case, too.  Add comment.
	(__set_ctype): Set __ctype_ptr__ pointer according to definition
	of ALLOW_NEGATIVE_CTYPE_INDEX.
	* libc/include/ctype.h (__ctype_ptr__): Constify in !_MB_CAPABLE case.
2009-04-02 07:53:12 +00:00
Corinna Vinschen 4bc42c05aa * libc/ctype/Makefile.am: Remove _tolower.c and _toupper.c
source files.  Add a dependency rule for ctype_o to note
	changes in ctype_iso.h and ctype_cp.h.
	* libc/ctype/Makefile.in: Regenerate.
	* libc/ctype/_tolower.c: Remove file.
	* libc/ctype/_toupper.c: Remove file.
	* libc/ctype/ctype_.c: Make sure ALLOW_NEGATIVE_CTYPE_INDEX
	is always defined on Cygwin.
	(_ctype_b): Don't make `static const' on Cygwin.
	(ctype_iso.h): Include if _MB_EXTENDED_CHARSETS_ISO is set.
	(ctype_cp.h): Include if _MB_EXTENDED_CHARSETS_WINDOWS is set.
	(__ctype_ptr): Drop definition.
	(__ctype_ptr__): De-constify.  Mark as __EXPORT symbol.
	(_ctype_): Add Cygwin-specifc asm define.
	(__set_ctype): New function to set __ctype_ptr__ according to
	current charset.
	* libc/ctype/ctype_cp.h: New file containing Windows codepage
	specific character class tables.
	* libc/ctype/ctype_iso.h: New file containing ISO-8859-x
	specific character class tables.
	* libc/ctype/tolower.c (tolower): Reimplement to support any singlebyte
	charset if one of the extended charsets is enabled.
	* libc/ctype/toupper.c (toupper): Ditto.
	* libc/include/ctype.h (_tolower): Define as macro per POSIX.
	(_toupper): Ditto.
	(__ctype_ptr__): De-constify.
	(toupper): Disable macro on systems supporting extended charsets.
	(tolower): Ditto.
	* libc/include/sys/config.h (__EXPORT): Define empty if not defined.
	* libc/locale/locale.c (__mb_cur_max): Mark as __EXPORT symbol.
	(__set_ctype): Declare unconditionally.
	(loadlocale): Remove __CYGWIN__ guard around __set_ctype call.
2009-03-31 09:31:38 +00:00
Corinna Vinschen e916d8ec86 * libc/locale/locale.c (loadlocale): Revert to charset "GBK" instead
of "GB2312".  Fix documentation accordingly.
2009-03-26 10:24:38 +00:00
Corinna Vinschen 7ca98b4901 * libc/ctype/ctype_.c (_CTYPE_DATA_0_127): Mark TAB as blank character.
* libc/ctype/isblank.c: Replace hardcoded test with test for having _B
	marker in ctype array.
	* libc/include/ctype.h (isblank): Add macro.
2009-03-26 09:45:11 +00:00
Jeff Johnston 139f923bb4 2009-03-25 Craig Howland <howland@LGSInnovations.com>
* libc/include/math.h:  (llround, llroundf): Declare.
	* libm/common/s_llround.c: New file, implementing llround().
	* libm/common/sf_llround.c: New file, implementing llroundf().
	* libm/common/sf_lround.c: Remove spurious cast in _DOUBLE_IS_32BITS
	version of function.
	* libm/common/sf_lrint.c: Ditto.
	* libm/common/sf_logb.c:  Corrected return for subnormal argument
	by replacing existing function with a version created from sf_ilogb.c.
	* libm/common/s_logb.c: Ditto, except starting point s_ilogb.c.  Also
	added documentation for logb() and logbf().
	* libm/common/s_signbit.c:  Add signbit() documentation.
	* libm/common/s_log2.c: Update return values to match what w_log2.c has,
	since log2 uses log(); add note about being derived instead of direct.
	* libm/common/sf_fma.c: Add casts to attempt to get correct results,
	as well as comments pointing out problems with the implementation.
	* libm/common/s_fma.c: Add fma() and fmaf() documentation.
	* libm/common/sf_remquo.c: Incorrect quotient returns for large values
	corrected by discarding existing function and replacing with Sun
	verion, with some enhancements.
	* libm/common/s_remquo.c: Ditto.  Add remquo() and remquof()
	documentation.
	* libm/common/s_fmax.c: Add fmax() and fmaxf() documentation.
	* libm/common/s_fmin.c: Add fmin() and fminf() documentation.
	* libm/common/s_fdim.c: Return NAN for NAN arg, add fdim() and fdimf()
	documentation.
	* libm/common/sf_fdim.c: Return NAN for NAN arg, HUGE_VALF for inf arg.
	* libm/common/s_trunc.c: Add trunc() and truncf() documentation.
	* libm/common/s_rint.c: Add rint() and rintf() documentation.
	* libm/common/s_round.c: Add round() and roundf() documentation.
	* libm/common/s_scalbn.c: Add scalbln() and scalblnf() documentation.
	* libm/common/s_infinity.c: Add infinity() and infinityf()
	documentation.
	* libm/common/s_lround.c: Add lround(), lroundf(), llround(), and
	llroundf() documentation.
	* libm/common/s_lrint.c: Add lrint(), lrintf(), llrint(), and llrintf()
	documentation.
	* libm/common/isgreater.c: New file for documenting math.h function-like
	macros isgreater(), isgreaterequal(), isless(), islessequal(),
	islessgreater(), and isunordered().
	* libm/common/s_isnan.c: Add documentation for function-like macros
	fpclassify(), isfinite(), isinf(), isnan(), and isnormal().
	* libm/common/s_nearbyint.c: Add nearbyint() and nearbyintf()
	documentation.
	* libm/common/Makefile.am: Add s_llround.c (src); sf_llround.c (fsrc);
	s_fdim.def, s_fma.def, s_fmax.def, s_fmin.def,
	s_logb.def, s_lrint.def, s_lround.def, s_nearbyint.def, s_remquo.def,
        s_rint.def, s_round.def, s_signbit.def, s_trunc.def, and
        isgreater.def (chobj);
	re-name all existing chew files (chobj) to match source file base
	names (put in underscores), delete all special targets for chew files
	(leaving all to be generated by rule).
	* libm/common/Makefile.in: regenerate.
	* libm/math/w_exp2.c: Add "base 2" to documentation description (and
	delete TRAD_SYNOPSIS).
	* libm/math/w_gamma.c: Add tgamma() and tgammaf() documentation, along
	with some history behind the function names.
	* libm/math/math.tex: Add includes for newly-added documentation (see
	.def additions to common/Makefile.am and math/Makefile.am in this
	ChangeLog list), adjusted existing .def file names to match source file
	base names (added underscores); add mention of HUGE_VALF; rename
	"Version of library" section to "Error Handling" and add some text
	about floating-point exception; added section "Standards Compliance And
	Portability".
	* libm/math/Makefile.am: Add w_exp2.def (chobj);
	re-name all existing chew files (chobj) to match source file base
	names, delete all special targets for chew files (leaving all to be
	generated by rule).
	* libm/math/Makefile.in: regenerated
	* doc/makedoc.c: Change silent ignoring of commands < 5 characters
	to a failure when reading macro file for commands < 4 characters;
	add -v (verbose) option for printing some debugging information;
	get rid of spurious translation of "@*" to "*" (no source files used @*,
	so no existing doc pages were affected); clean up some compiler
	warnings.
	* doc/doc.str: add BUGS and SEEALSO sections (to match texi2pod.pl
	which has them); Remove ITEM command (redundant with makedoc built-in
	"o", not used in any present source file so nothing is lost, anyway).
	* HOWTO: New file to hold information for maintainers regarding how
	to do things.  Initial sections on documentation and ELIX levels.
2009-03-25 19:13:24 +00:00
Jeff Johnston baea11cd6a 2009-03-25 Richard Earnshaw <rearnsha@arm.com>
* libc/machine/arm/strcmp.c (strcmp_unaligned): Correctly
        detect the nul-byte in a big-endian string.
2009-03-25 18:56:15 +00:00
Jeff Johnston 0b211e340f 2009-03-25 Jeff Johnston <jjohnstn@redhat.com>
* libc/string/wcsdup.c: Fix documentation error.
        * libc/string/Makefile.am: Fix CHEWOUT files to contain
        wcsdup.def rather than wcsdup.
        * libc/string/Makefile.in: Regenerated.
2009-03-25 17:57:11 +00:00
Corinna Vinschen 6396c8889f * libc/locale/locale.c (loadlocale): Only change __wctomb and __mbtowc
pointers if category is LC_CTYPE.
2009-03-25 13:52:08 +00:00
Corinna Vinschen 790d0a4c64 * libc/locale/locale.c (loadlocale): Rename charset "GBK" to
"GB2312".  Fix documentation accordingly.
2009-03-25 09:00:03 +00:00
Corinna Vinschen 4e4ff45c0b * libc/locale/locale.c (loadlocale): Rename charset "CP949" to
"eucKR".  Fix documentation accordingly.
2009-03-24 18:18:14 +00:00
Corinna Vinschen 62e51f09f9 * libc/locale/locale.c (loadlocale): Allow charset starting with 'e'
for "eucJP" charset support.
2009-03-24 16:56:33 +00:00
Jeff Johnston dd15241df7 2009-03-24 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/errno.h: Move EFTYPE to general usage because
        it is used in libc/search.
2009-03-24 16:05:07 +00:00
Corinna Vinschen 28186e81d9 * libc/ctype/iswalpha.c: Handle all wchar_t as unicode on
_MB_CAPABLE systems.
	* libc/ctype/iswblank.c: Ditto.
	* libc/ctype/iswcntrl.c: Ditto.
	* libc/ctype/iswprint.c: Ditto.
	* libc/ctype/iswpunct.c: Ditto.
	* libc/ctype/iswspace.c: Ditto.
	* libc/ctype/jp2uc.c (__jp2uc): On Cygwin, just return c.
	Explain why.
	* libc/ctype/towlower.c: Ditto.
	* libc/ctype/towupper.c: Ditto.
	* libc/include/sys/config.h: Define _MB_EXTENDED_CHARSETS_ISO
	and _MB_EXTENDED_CHARSETS_WINDOWS if _MB_EXTENDED_CHARSETS_ALL is
	defined.  Define _MB_EXTENDED_CHARSETS_ALL on Cygwin only for now.
	* libc/include/sys/reent.h (struct _reent): Mark _current_category
	and _current_locale as unused.
	* libc/locale/locale.c: Add new charset support to documentation.
	Include ../stdio/local.h from here.
	(lc_ctype_charset): Set to "ASCII" by default.
	(lc_message_charset): Ditto.
	(_setlocale_r): Don't set _current_category and _current_locale.
	(loadlocale): Add Cygwin codepage support.  On _MB_CAPABLE
	systems, set __mbtowc and __wctomb function pointers to function
	corresponding with current charset.  Don't allow non-existant
	ISO-8859-12 charset.  Add support for Windows singlebyte codepages.
	On Cygwin, add support for GBK, CP949, and BIG5.  On Cygwin,
	call __set_ctype() in case the catorgy is LC_CTYPE.  Don't set
	_current_category and _current_locale.
	* libc/stdlib/Makefile.am (GENERAL_SOURCES): Add sb_charsets.c.
	* libc/stdlib/Makefile.in: Regenerate.
	* libc/stdlib/local.h: Add prototype for __locale_charset.
	Add prototypes for __mbtowc and __wctomb pointers.
	Add prototypes for charset-specific _wctomb_r and _mbtowc_r
	functions.
	Declare tables and functions from sb_charsets.c.
	* libc/stdlib/mbtowc_r.c (__mbtowc): Define.  Set to __ascii_mbtowc
	by default.
	(_mbtowc_r): Just call __mbtowc from here.
	(__ascii_mbtowc): New function.
	(__iso_mbtowc): New function.
	(__cp_mbtowc): New function.
	(__utf8_mbtowc): New function.
	(__sjis_mbtowc): New function.  Disable on Cygwin.
	(__eucjp_mbtowc): New function.  Disable on Cygwin.
	(__jis_mbtowc): New function.  Disable on Cygwin.
	* libc/stdlib/sb_charsets.c: New file, adding singlebyte to UTF
	conversion tables for all ISO and CP charsets.
	(__iso_8859_index): New function.
	(__cp_index): New function.
	* libc/stdlib/wctomb_r.c (__wctomb): Define.  Set to __ascii_wctomb
	by default.
	(_wctomb_r): Just call __wctomb from here.
	(__ascii_wctomb): New function.
	(__utf8_wctomb): New function.
	(__sjis_wctomb): New function.  Disable on Cygwin.
	(__eucjp_wctomb): New function.  Disable on Cygwin.
	(__jis_wctomb): New function.  Disable on Cygwin.
	(__iso_wctomb): New function.
	(__cp_wctomb): New function.
2009-03-24 10:13:27 +00:00
Jeff Johnston 4d5112e2b1 2009-03-23 Richard Earnshaw <rearnsha@arm.com>
* libc/machine/arm/strcmp.c (strcmp): Treat char as unsigned.
2009-03-23 18:25:10 +00:00
Corinna Vinschen 9accf06e03 * libc/locale/locale.c (loadlocale): Fix typo in language and
territory evaluation.
2009-03-23 11:28:12 +00:00
Jeff Johnston e8846923cf 2009-03-20 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/errno.h: Protect various non-standard errnos
        with either __LINUX_ERRNO_EXTENSIONS__ or __CYGWIN__.
        * libc/include/sys/config.h[__CYGWIN__]: Define
        __LINUX_ERRNO_EXTENSIONS__.
2009-03-20 20:44:14 +00:00
Corinna Vinschen 360dc06fdb * libc/stdlib/mbtowc_r.c (_mbtowc_r): Return EILSEQ in case of an
invalid character sequence.

	* libc/stdlib/mbtowc_r.c (_mbtowc_r): Fix compiler warning due to
	missing declaration of __locale_charset.
	* libc/stdlib/wctomb_r.c (_wctomb_r): Ditto.
2009-03-19 19:47:52 +00:00
Jeff Johnston d57ff5a8ac 2009-03-18 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* libm/common/s_log2.c: New file.
        * libm/common/sf_log2.c: Ditto.
        * libm/common/Makefile.am: Add s_log2.c and sf_log2.c.
        * libm/common/Makefile.in: Regenerated.
        * libc/include/math.h: Add log2 and log2f function prototypes.
2009-03-18 18:11:18 +00:00
Corinna Vinschen d99179dbf3 * libc/stdlib/mbstowcs_r.c (_mbstowcs_r): Handle NULL destination
string correctly.
2009-03-17 12:16:28 +00:00
Jeff Johnston d70118655b 2009-03-16 Mark Mitchell <mark@codesourcery.com>
* libc/machine/arm/strlen.c (strlen): Fix defect in Thumb-2 mode.

2009-03-16  Richard Earnshaw  <rearnsha@arm.com>

        * libc/machine/arm/strlen.c (strlen): Correctly detect
        end-of-string.
        * libc/machine/arm/strcpy.c (strcpy): Likewise.
        * libc/machine/arm/strcmp.c (strcmp, strcmp_unaligned): Likewise.
2009-03-16 20:12:30 +00:00
Corinna Vinschen 044af76e50 * libc/include/sys/errno.h (ESTRPIPE): Define.
* libc/string/strerror.c (strerror): Decode it.
2009-03-15 13:41:46 +00:00
Corinna Vinschen 159a17c8c8 * libc/include/wchar.h (wcsdup, _wcsdup_r): Declare.
* libc/string/Makefile.am: Add wcsdup.c.
	* libc/string/Makefile.in: Regenerate.
	* libc/string/strings.tex: Add wcsdup documentation reference.
	* libc/string/wcsdup.c: New file.
2009-03-15 13:39:07 +00:00
Corinna Vinschen f03b7b10ec * libc/include/stdlib.h (_mkstemp_r, _mktemp_r): Move out of
!_REENT_ONLY section.
2009-03-14 12:17:19 +00:00
Corinna Vinschen 71675a3908 * libc/include/stdio.h (_mkstemp_r, _mktemp_r): Move declarations
to stdlib.h.
	* libc/include/stdlib.h (mktemp, _mktemp_r): Warn when using.
	* libc/stdio/mktemp.c: Explain the security risk when using
	mktemp.
2009-03-14 12:14:08 +00:00
Corinna Vinschen d75c0f75bc * libc/time/time.tex (wcsftime.def): Include.
* libc/time/wcsftime.c:  Clean up documentation a little.
2009-03-12 15:34:57 +00:00
Corinna Vinschen 14a164a726 * libc/stdio/swscanf.c: Some documentation corrections. 2009-03-12 14:30:28 +00:00
Corinna Vinschen 4a825d4145 * libc/stdio/swprintf.c (_swprintf_r, swprintf):
correct how terminating L'\0' is added;
	change return to match standard for when output does not fit;
	some corrections and enhancements to the docs.
	* libc/stdio/vswprintf.c (_vswprintf_r):  ditto, except for docs.
	* libc/stdio/vfwprintf.c:  some corrections to the docs and some
	enhancements to comments.  (No code changes.)
	* libc/time/strftime.c:  Correct some problems that made wcsftime()
	not work correctly:  work properly with swprintf returns that are
	different from snprintf returns, correct test vector lengths for
	when sizeof(wchar_t) > 1.
	* libc/stdio/sprintf.c:  Some documentation and comment corrections and
	enhancements to match those done to swprintf.c.
2009-03-12 10:27:10 +00:00
Corinna Vinschen dc48005c28 * libc/include/wchar.h (wcscasecmp, wcsncasecmp): Declare.
* libc/string/Makefile.am: Add wcscasecmp.c, wcsncasecmp.c
	* libc/stdio/Makefile.in: Regenerate.
	* libc/string/strings.tex: Add new documentation references.
	* libc/string/wcscasecmp.c: New file.
	* libc/string/wcsncasecmp.c: New file.
2009-03-11 12:57:53 +00:00
Corinna Vinschen d0b85c158f * libc/include/wchar.h (fwscanf, swscanf, vfwscanf, vswscanf, vwscanf,
wscanf): Declare.
	(_fwscanf_r, _swscanf_r, _vfwscanf_r, _vswscanf_r, _vwscanf_r,
	_wscanf_r): Declare.
	* libc/stdio/Makefile.am: Add new wscanf files.
	* libc/stdio/Makefile.in: Regenerate.
	* libc/stdio/fwscanf.c: New file.
	* libc/stdio/local.h (__svfwscanf_r, __ssvfwscanf_r, __svfiwscanf_r,
	__ssvfiwscanf_r): Declare.
	* libc/stdio/stdio.tex: Add new documentation references.
	* libc/stdio/swscanf.c: New file.
	* libc/stdio/vfwscanf.c: New file.
	* libc/stdio/vswscanf.c: New file.
	* libc/stdio/vwscanf.c: New file.
	* libc/stdio/wscanf.c: New file.

	* libc/stdio/vfscanf.c (_sungetc_r): Make externaly available.  Only
	define if INTEGER_ONLY is defined.  Declare otherwise.
	(__ssrefill_r): Ditto.
	(_sfread_r): Ditto.

	Remove static eofread/eofread1 functions and use __seofread
	function instead, throughout.
	* libc/stdio/local.h (__seofread): Declare.
	* libc/stdio/stdio.c (__seofread): Define.

	* libc/stdio/fgetwc.c (__fgetwc): Fix compiler warning.
	* libc/stdio/fgetws.c (_fgetws_r): Ditto.
	* libc/stdio/fread.c (_fread_r): Ditto.
	* libc/stdio/vfprintf.c: Ditto.
	* libc/stdio/vswprintf.c: Ditto.
2009-03-11 11:53:22 +00:00
Corinna Vinschen e20efdda16 * libc/machine/arm/arm_asm.h: Fix typo. 2009-03-10 09:02:32 +00:00
Corinna Vinschen 3c4becbe18 * libc/time/strftime.c: Adapt for dual-purpose use so not only
defines strftime(), but can also define wcsftime(); add optional
	test package; speed up %Y handling.
	* libc/time/wcsftime.c:  New file, defining wcsftime() (albeit
	indirectly by including strftime.c) and its documentation.
	* libc/time/time.tex:  Enhance tm_isdst explanation, change strftime
	description to match modified description in strftime.c
	* libc/time/Makefile.am:  Add wcsftime.c and wcsftime.def.  Add a rule
	so that wcsftime.o gets rebuilt when strftime changes.
	* libc/time/Makefile.in:  Regenerate.
	* libc/include/wchar.h (wcsftime): Declare.
2009-03-09 12:35:03 +00:00
Corinna Vinschen e94fc807d9 * libc/reent/reent.c (_reclaim_reent): Make a block from MP-related
statements in _REENT_SMALL case.  Check if _atexit is not NULL before
	dereferencing it.
	(_wrapup_reent): Check if _atexit is not NULL before dereferencing it.
2009-03-06 17:11:20 +00:00
Corinna Vinschen 6121968b19 * libc/include/stdio.h (__VALIST): Guard against multiple definition.
* libc/include/wchar.h: Include stdarg.h.
	(__VALIST): Define conditionally.
	(fwprintf, swprintf, vfwprintf, vswprintf, vwprintf, wprintf: Declare.
	(_fwprintf_r, _swprintf_r, _vfwprintf_r, _vswprintf_r, _vwprintf_r,
	 _wprintf_r): Declare.
	* libc/stdio/Makefile.am: Add new files.
	* libc/stdio/Makefile.in: Regenerate.
	* libc/stdio/fwprintf.c: New file.
	* libc/stdio/local.h (_svfwprintf_r, _svfiwprintf_r): Declare.
	(__CH_CLASS, __STATE, __ACTION): Move definition from vfprintf.c here
	and move to the __ namespace.
	(__chclass, __state_table, __action_table): Declare.
	* libc/stdio/stdio.tex: Add new documentation references.
	* libc/stdio/swprintf.c: New file.
	* libc/stdio/vfprintf.c (__SPRINT): New macro to call the right
	__sprint_r function according to compilation unit.  Use throughout.
	(__ssprint_r): Rename STRING_ONLY variant from __sprint_r.
	Make externaly available.  Only define if INTEGER_ONLY is defined.
	(__sprint_r): Make externaly available.  Only define if INTEGER_ONLY
	is defined.  Handle stream orientation.
	(__sbprintf): Copy FILE's _flags2 member as well.
	(__chclass, __state_table, __action_table): Prepend __ to name and
	make externally available.
	* libc/stdio/vfwprintf.c: New file.
	* libc/stdio/vswprintf.c: New file.
	* libc/stdio/vwprintf.c: New file.
	* libc/stdio/wprintf.c: New file.
2009-03-06 09:55:52 +00:00
Corinna Vinschen d6cd9169dc * libc/locale/locale.c (_setlocale_r): New implementation based on
FreeBSD's setlocale.
	(currentlocale): New helper function.
	(loadlocale): Ditto.
	(__locale_charset): New function.
	(__locale_msgcharset): Rename from __locale_charset.
	* libc/ctype/local.h (__lc_ctype): Remove declaration.
	(__locale_charset): Declare.
	* libc/ctype/iswalpha.c (iswalpha): Call __locale_charset instead of
	using __lc_ctype directly.  Only compare against the charset alone.
	* libc/ctype/iswblank.c (iswblank): Ditto.
	* libc/ctype/iswcntrl.c (iswcntrl): Ditto.
	* libc/ctype/iswprint.c (iswprint): Ditto.
	* libc/ctype/iswpunct.c (iswpunct): Ditto.
	* libc/ctype/iswspace.c (iswspace): Ditto.
	* libc/ctype/towlower.c (towlower): Ditto.
	* libc/ctype/towupper.c (towupper): Ditto.
	* libc/stdlib/mbtowc_r.c (_mbtowc_r): Ditto.
	* libc/stdlib/wctomb_r.c (_wctomb_r): Ditto.
	* libc/sys/linux/intl/loadmsgcat.c (_nl_init_domain_conv): Call
	__locale_msgcharset instead of __locale_charset.
2009-03-03 09:28:45 +00:00
Jeff Johnston 95d85fcb1a 2009-03-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/wctomb_r.c (_wctomb_r): When checking single-byte
        charset, cast wchar to size_t in case wchar_t is signed.
        * libc/stdlib/wctomb.c (wctomb): Add similar single-byte check.
2009-03-02 23:30:59 +00:00
Jeff Johnston 49b09e5afa 2009-03-02 Corinna Vinschen <corinna@vinschen.de>
* libc/stdlib/wctomb_r.c (_wctomb_r): Return EILSEQ in case of an
        invalid wchar.  Return -1 if wchar doesn't fit into singlebyte
        value in case of using a singlebyte charset.
2009-03-02 23:20:28 +00:00
Jeff Johnston 1f73aa9f82 2009-02-26 Brooks Moses <brooks@codesourcery.com>
* libc/machine/arm/strcpy.c: Add missing comma.
2009-02-26 21:32:45 +00:00
Jeff Johnston 4377def75b Fix character set problem with Ralf's name. 2009-02-26 21:04:59 +00:00
Jeff Johnston ef2d60ac22 2009-02-26 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/machine/lm32/configure.in: Let
        AC_CONFIG_SRCDIR point to setjmp.S instead of setjmp.s
        * libs/machine/lm32/configure: Regenerate.
2009-02-26 21:03:53 +00:00
Jeff Johnston 297367e3b3 2009-02-25 Brooks Moses <brooks@codesourcery.com>
* libc/stdlib/Makefile.am (CHEWOUT_FILES): Add
          mbsnrtowcs.def, wcsnrtombs.def.
        * libc/stdlib/Makefile.in: Regenerate.
        * libc/stdlib/stdlib.tex (@menu): Use correct section
          names for mbsrtowcs, wcsrtombs.
        * libc/stdlib/wcstod.c: Remove stray character in
          documentation.
2009-02-25 21:33:18 +00:00
Corinna Vinschen 8d8bf5a5e2 * mbtowc_r.c (_mbtowc_r): Remove conversion of 5 and 6 byte UTF-8
sequences since they are invalid in the Unicode standard.
	Handle surrogate pairs in case of wchar_t == UTF-16.
	* wctomb_r.c (_wctomb_r): Don't convert invalid Unicode wchar_t
	values beyond 0x10ffff into UTF-8 chars.  Handle surrogate pairs in
	case of wchar_t == UTF-16.
2009-02-25 09:10:09 +00:00
Kevin Buettner 56eafaf6e3 * libc/stdio/open_memstream.c (stdint.h): Include. 2009-02-25 04:00:05 +00:00
Jeff Johnston 02b20a2311 2009-02-23 Craig Howland <howland@LGSInnovations.com>
* libc/unix/ttyname.c:  Remove ttyname_r() (to a new file to avoid
        coupling ttyname_r() and ttyname() due to the latter's large buffer).
        * libc/unix/ttyname_r.c:  New file to hold ttyname_r(), previously in
        ttyname.c.
        * libc/unix/ttyname.h:  New file (common size definition for the 2
        ttyname*c files that are now split).
        * libc/unix/Makefile.am (ELIX_2_SOURCES):  Add ttyname_r.c.
        * libc/unix/Makefile.in:  Regenerate.
2009-02-23 23:42:03 +00:00
Corinna Vinschen 2e10d61ccb * libc/include/wchar.h (mbsnrtowcs): Declare.
(_mbsnrtowcs_r): Declare.
	(wcsnrtombs): Declare.
	(_wcsnrtombs_r): Declare.
	* libc/stdlib/Makefile.am (ELIX_2_SOURCES): Add mbsnrtowcs.c
	and wcsnrtombs.c.
	* libc/stdlib/Makefile.in: Regenerate.
	* libc/stdlib/mbsnrtowcs.c: New file, implementing _mbsnrtowcs_r
	and mbsnrtowcs.  Document mbsnrtowcs and mbsrtowcs.
	* libc/stdlib/mbsrtowcs.c (_mbsrtowcs_r): Just call _mbsnrtowcs_r.
	(mbsrtowcs): Ditto.
	* libc/stdlib/wcsnrtombs.c: New file, implementing _wcsnrtombs_r
	and wcsnrtombs.  Document wcsrtombs and wcsnrtombs.
	* libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Just call _wcsnrtombs_r.
	(wcsrtombs): Ditto.
	* libc/stdlib/stdlib.tex: Accommodate new documentation.
2009-02-19 09:19:42 +00:00
Jeff Johnston 3f60f7e544 2009-02-18 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/open_memstream.c (internal_open_memstream_r): Fix max
        buffer size to be in wchar_t units if wide == 1 is passed in.  In
        this case, also initialize the first character of the buffer to be
        wide char null.
        (_open_wmemstream_r): Cast buf to be (char **) to avoid warning.
        * libc/stdlib/mbtowc_r.c (_mbtowc_r): Change all occurences of
        incrementing the size_t value n to first check that n is not already
        size_t -1.  Fix some compiler warnings.
        * libc/stdlib/wcstod.c: Add includes for <wctype.h> and <math.h>.
2009-02-18 21:28:41 +00:00
Corinna Vinschen 84e851fd64 * libc/stdio/open_memstream.c: Add open_wmemstream to doumentation.
(struct memstream): Add wide element.
	Change saved to a union to take char and wchar_t values.
	(memwriter): Accommodate wide-oriented oeprations.
	(memseeker): Ditto.
	(memseeker64): Ditto.
	(memcloser): Ditto.
	(internal_open_memstream_r): New static function.  Take functionality
	from former _open_memstream_r and handle additional "wide" parameter.
	(_open_memstream_r): Just call internal_open_memstream_r with wide==-1
	from here.
	(_open_wmemstream_r): New function.
	(open_wmemstream): Ditto.
	* libc/include/wchar.h (open_wmemstream): Declare.
	(_open_wmemstream_r): Declare.
2009-02-18 17:35:24 +00:00
Corinna Vinschen c65466e242 * libc/stdio/fputwc.c: Fix typo in man page info. 2009-02-16 15:04:34 +00:00
Jeff Johnston 77ea728b96 2009-02-12 Corinna Vinschen <corinna@vinschen.de>
* libc/include/wchar.h (_wcstod_r): Declare.
        (_wcstof_r): Declare.
        (wcstod): Declare.
        (wcstof): Declare.
        * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add wcstod.c.
        (CHEWOUT_FILES): Add wcstod.def.
        * libc/stdlib/Makefile.in: Regenerate.
        * libc/stdlib/stdlib.tex: Add wcstod.
        * libc/stdlib/wcstod.c: New file.
2009-02-12 23:10:01 +00:00
Jeff Johnston 18cbf1d394 2009-02-05 Neal H. Walfield <neal@gnu.org>
* libc/machine/x86_64/memcpy.S (memcpy): Don't use the red zone.
2009-02-05 20:10:21 +00:00
Jeff Johnston 3e703e875a 2009-01-28 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/vfscanf.c (__SVFSCANF_R): Add additional check for
        inf and nan processing to not proceed if we have already collected
        zeroes.
2009-01-28 18:12:52 +00:00
DJ Delorie dcad81990b * configure.host (m32c-*-*): Add long long I/O support by default. 2009-01-27 01:41:31 +00:00
Jeff Johnston 2b7e0645c9 2009-01-21 Richard Earnshaw <rearnsha@arm.com>
* libc/machine/arm/arm_asm.h: New file.
        * libc/machine/arm/strlen.c: New file.
        * libc/machine/arm/strcpy.c: New file.
        * libc/machine/arm/strcmp.c: New file.
        * libc/machine/arm/Makefile.am: Add new string routines.
2009-01-22 00:02:35 +00:00
Jeff Johnston 2e287a6327 2009-01-19 Neal H. Walfield <neal@gnu.org>
* libc/include/stdint.h (INT64_C, UINT64_C, INTMAX_C, UINTMAX_C)
        [__have_long64 && __have_longlong64]: Use L and UL, not LL and ULL.
        * libc/include/inttypes.h (__PRI64, __SCN64, __PRIMAX, __SCNMAX,
        __PRIPTR, __SCNPTR) [__have_long64 && __have_longlong64]: Use l,
        not ll.
2009-01-19 22:02:06 +00:00
Jeff Johnston d9db4e43f3 2009-01-12 Nathan Froyd <froydnj@codesourcery.com>
* libc/machine/powerpc/vfscanf.c (__sccl): Remove declaration.
2009-01-12 23:32:37 +00:00
Jeff Johnston ceedb0dcb8 2009-01-12 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/fwalk.c (__fwalk, __fwalk_reent): Remove locking of
        each fp.  Let the function being called lock the fp, if necessary.
2009-01-12 22:19:11 +00:00
Kazu Hirata 887c6b762e * libc/include/sys/stdio.h (_flockfile, _funlockfile): Fix typos. 2009-01-08 00:01:33 +00:00
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 272fac20e7 2008-12-19 Jeff Johnston <jjohnstn@redhat.com>
* NEWS: Update with 1.17.0 info.
        * README: Ditto.
        * acinclude.m4: Change version number to 1.17.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.17
2008-12-22 19:45:56 +00:00
Jeff Johnston a3cf030478 2008-12-17 Jon Beniston <jon@beniston.com>
* configure.host: Set syscall_dir for lm32 target.
2008-12-17 23:09:09 +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 a1631dba6c 2008-12-12 Craig Howland <howland@LGSInnovations.com>
* libc/include/wchar.h:  Added wcstok() declaration.
        * libc/string/wcstok.c: New file, implementing wcstok.
        * libc/string/Makefile.am: Add wcstok support.
        * libc/string/wcstrings.tex: Ditto.
        * libc/string/Makefile.in: Regenerated.
2008-12-12 19:47:05 +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
Jeff Johnston db48463a7f 2008-12-12 Ralf Corsepius <ralf.corsepius@rtems.org>
* libc/include/sys/features.h: Set RTEMS's _POSIX_MONOTONIC_CLOCK to
        200112L (SUSv3 compliance).
        Comment out RTEMS's _POSIX_SHARED_MEMORY_OBJECTS (Unsupported).
2008-12-12 17:16:03 +00:00
Jeff Johnston f570da9508 2008-12-12 Ralf Corsepius <ralf.corsepius@rtems.org>
* libc/sys/rtems/crt0.c: Add stubs for getdents(), nanosleep(),
        _execve(), _exit().
2008-12-12 17:11:33 +00:00
Jeff Johnston 7851320a41 2008-12-12 Ralf Corsepius <ralf.corsepius@rtems.org>
* configure.host: Let *rtems* default to c99-formats.
2008-12-12 17:07:37 +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 6b9838a343 Formatting fix. 2008-12-11 22:49:58 +00:00
Jeff Johnston 04e4752943 2008-12-11 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/time.h(gettimeofday): Change prototype so
        2nd parameter is void *, matching SUSV2.
        * libc/syscalls/sysgettod.c(gettimeofday): Ditto.
2008-12-11 22:48:38 +00:00
Jeff Johnston 0e859ad10f 2008-12-11 Jukka Pietarinen <jukka.pietarinen@mrf.fi>
* configure.host: Add lm32
        * libc/include/machine/ieeefp.h: Add __lm32__
        * libc/include/machine/setjmp.h: Add __lm32__
        * libc/machine/configure.in: Add lm32
        * libc/machine/configure: Regenerated.
        * libc/machine/lm32/aclocal.m4: New file.
        * libc/machine/lm32/configure.in: Ditto.
        * libc/machine/lm32/configure: Ditto.
        * libc/machine/lm32/Makefile.am: Ditto.
        * libc/machine/lm32/Makefile.in: Ditto.
        * libc/machine/lm32/setjmp.s: Ditto.
2008-12-11 20:05:38 +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
Jeff Johnston 11a985e00f 2008-12-10 Joseph Myers <joseph@codesourcery.com>
* libc/include/stdint.h (INT32_MIN, INT32_MAX, UINT32_MAX,
        INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX): Define to
        constants with "long" types where appropriate.
        (INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN,
        INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX,
        UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX):
        Correct to match logic for defining corresponding types.
        (INTMAX_MAX, INTMAX_MIN, UINTMAX_MAX): Define.
        (SIZE_MAX): Define using __SIZE_MAX__ if available.
        (PTRDIFF_MAX): Define using __PTRDIFF_MAX__ if available.
        (PTRDIFF_MIN): Define in terms of PTRDIFF_MAX.
        (WCHAR_MAX, WCHAR_MIN, WINT_MAX, WINT_MIN): Define.
        (UINT8_C, UINT16_C): Define to give signed values if corresponding
        types would promote to int.
2008-12-10 21:27:58 +00:00
Corinna Vinschen a81a17c43b * libc/include/sys/features.h (_POSIX_V6_ILP32_OFF32): Always define.
(_POSIX_V6_LP64_OFF64): Ditto.
	(_POSIX_V6_LPBIG_OFFBIG): Ditto.
2008-12-04 13:58:11 +00:00
Jeff Johnston 3ba3b001a2 2008-11-28 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/inode.c: Include <dirent.h> instead of
        <linux/dirent.h>.
        * libc/sys/linux/io64.c: Add weak alias for _stat64.
2008-11-28 17:15:47 +00:00
Jeff Johnston 27171a8cfa 2008-11-27 Ralf Corsepius <ralf.corsepius@rtems.org>
* libc/posix/telldir.c: Use #if !defined() instead of #ifndef
        to fix GCC warning.
2008-11-27 21:01:40 +00:00
Jeff Johnston 8f337bfef9 2008-11-27 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/Makefile.am: Add spu-mcount.S spu-gmon.c.
        * libc/machine/spu/Makefile.in: Regenerated.
        * libc/machine/spu/spu-gmon.c: New file.
        * libc/machine/spu/spu-mcount.S: New file.
2008-11-27 20:57:46 +00:00
Jeff Johnston e707c2c9e2 2008-11-27 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.host (*-rtems*): Turn on using portion of unix subdirectory.
2008-11-27 20:50:31 +00:00
Jeff Johnston bad5c314f7 2008-11-27 Craig Howland <howland@LGSInnovations.com>
* libc/argz/argz_add.c:  Added #include <argz.h> to get function
        prototypes.
        * libc/argz/argz_append.c: Ditto.
        * libc/argz/argz_count.c: Ditto.
        * libc/argz/argz_create.c: Ditto.
        * libc/argz/argz_create_sep.c: Ditto.
        * libc/argz/argz_delete.c: Ditto.
        * libc/argz/argz_next.c: Ditto.
        * libc/argz/argz_stringify.c: Ditto
        * libc/stdlib/strtod.c: Added #include <stdlib.h> to get function
        prototypes.
        * libc/stdlib/wcstoul.c: Added #include <wchar.h> to get function
        prototypes, corrected traditional usage comment.
        * libc/include/wchar.h: Added _mbsrtowcs_r() prototype.
2008-11-27 20:45:37 +00:00
Jeff Johnston 14535fc538 2008-11-26 Ken Werner <ken.werner@de.ibm.com>
* libm/machine/spu/headers/acosd2.h: Rebase against current simdmath.
        * libm/machine/spu/headers/asind2.h: Likewise.
        * libm/machine/spu/headers/asinhf4.h: Likewise.
        * libm/machine/spu/headers/divd2.h: Likewise.
        * libm/machine/spu/headers/erf_utils.h: Likewise.
        * libm/machine/spu/headers/erfcd2.h: Likewise.
        * libm/machine/spu/headers/erfcf4.h: Likewise.
        * libm/machine/spu/headers/erfd2.h: Likewise.
        * libm/machine/spu/headers/recipd2.h: Likewise.
2008-11-26 19:59:25 +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 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
Jeff Johnston 0ef912dfc4 2008-11-24 Jeff Johnston <jjohnstn@redhat.com>
* libc/search/hash_func.c: Comment out unused static hash functions.
        * libc/reent/stat64r.c: New file.
        * libc/reent/Makefile.am: Add stat64r.c support.
        * libc/reent/Makefile.in: Regenerated.
2008-11-24 21:16:06 +00:00
Jeff Johnston 9aa929ef17 Fix typo. 2008-11-24 21:14:29 +00:00
Jeff Johnston df913771a7 2008-11-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/posix/scandir.c: Fix memory leaks.
2008-11-24 20:42:33 +00:00
Jeff Johnston b45d16228b 2008-11-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/posix/Makefile.am: Compile readdir_r.c
        * libc/posix/Makefile.in: Regenerated.
2008-11-24 20:11:42 +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 d5567b8d75 2008-11-20 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/sys/linux_syscalls.h: Additional syscall defines to
        be in sync with current kernels.
2008-11-20 20:23:24 +00:00
Jeff Johnston 75cc619bb3 2008-11-20 Ken Werner <ken.werner@de.ibm.com>
Patrick Mansfield  <patmans@us.ibm.com>
            Joel Schopp   <jschopp@austin.ibm.com>

        * libc/machine/spu/configure.in: Add __ea detection.
        * libc/machine/spu/Makefile.am: Add new files.
        * libc/machine/spu/include/ea.h: New file.
        * libc/machine/spu/ea_internal.h: Likewise.
        * libc/machine/spu/sys/mman.h: Likewise.
        * libc/machine/spu/mmap_ea.c: Likewise.
        * libc/machine/spu/munmap_ea.c: Likewise.
        * libc/machine/spu/mremap_ea.c: Likewise.
        * libc/machine/spu/msync_ea.c: Likewise.
        * libc/machine/spu/memchr_ea.c: Likewise.
        * libc/machine/spu/memcmp_ea.c: Likewise.
        * libc/machine/spu/memcpy_ea.c: Likewise.
        * libc/machine/spu/memmove_ea.c: Likewise.
        * libc/machine/spu/memset_ea.c: Likewise.
        * libc/machine/spu/malloc_ea.c: Likewise.
        * libc/machine/spu/realloc_ea.c: Likewise.
        * libc/machine/spu/calloc_ea.c: Likewise.
        * libc/machine/spu/free_ea.c: Likewise.
        * libc/machine/spu/posix_memalign_ea.c: Likewise.
        * libc/machine/spu/strcat_ea.c: Likewise.
        * libc/machine/spu/strchr_ea.c: Likewise.
        * libc/machine/spu/strcmp_ea.c: Likewise.
        * libc/machine/spu/strcpy_ea.c: Likewise.
        * libc/machine/spu/strcspn_ea.c: Likewise.
        * libc/machine/spu/strlen_ea.c: Likewise.
        * libc/machine/spu/strncat_ea.c: Likewise.
        * libc/machine/spu/strncmp_ea.c: Likewise.
        * libc/machine/spu/strncpy_ea.c: Likewise.
        * libc/machine/spu/strpbrk_ea.c: Likewise.
        * libc/machine/spu/strrchr_ea.c: Likewise.
        * libc/machine/spu/strspn_ea.c: Likewise.
        * libc/machine/spu/strstr_ea.c: Likewise.
        * libc/machine/spu/read_ea.c: Likewise.
        * libc/machine/spu/pread_ea.c: Likewise.
        * libc/machine/spu/readv_ea.c: Likewise.
        * libc/machine/spu/write_ea.c: Likewise.
        * libc/machine/spu/pwrite_ea.c: Likewise.
        * libc/machine/spu/writev_ea.c: Likewise.
2008-11-20 20:20:51 +00:00
Jeff Johnston 0e9810262d 2008-11-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/sys/config.h[__mips__]: Don't bother
        setting __ATTRIBUTE_IMPURE_PTR__ here.
        [__rtems__][__mips__]: No need to undef the __ATTRIBUTE_IMPURE_PTR__
        macro anymore.
2008-11-19 21:05:31 +00:00
Jeff Johnston 8ee939ea9f 2008-11-19 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/bits/dirent.h: New header file.
        * libc/sys/linux/sys/dirent.h: Include <bits/dirent.h> instead of
        <linux/dirent.h>.
        * libc/posix/Makefile.am: Remove reallocf.
        * libc/posix/Makefile.in: Regenerated.
        * libc/posix/reallocf.c: Moved to...
        * libc/stdlib/reallocf.c: Here
        * libc/stdlib/malloc.c: Add reallocf documentation.
        * libc/include/stdlib.h: Add reallocf and _reallocf_r prototypes.
        * libc/stdlib/Makefile.am: Add reallocf.
        * libc/stdlib/Makefile.in: Regenerated.
        * libc/posix/_isatty.c: Set errno.
2008-11-19 20:56:22 +00:00
Jeff Johnston e231c7dae9 2008-11-19 Craig Howland <howland@LGSInnovations.com>
* libc/unix/collate.c (__collate_err): simplify to remove unnecessary
        strdup() and strlen() calls, also getting rid of a compiler warning.
2008-11-19 20:04:09 +00:00
Jeff Johnston 34ff0a4e6f 2008-11-19 Ralf Corsepius <ralf.corsepius@rtems.org>
* libc/include/sys/config.h: Don't put
        __ATTRIBUTE_IMPURE_PTR__ into .sdata section for mips-rtems.
2008-11-19 19:48:31 +00:00
Jeff Johnston c58cf6af0f 2008-11-19 Ralf Corsepius <ralf.corsepius@rtems.org>
* libc/posix/runetype.h: Add include of stddef.h and remove
        defining standard types: size_t and wchar_t.
2008-11-19 17:13:13 +00:00
Jeff Johnston b8e9a7c099 2008-11-19 Ralf Corsepius <ralf.corsepius@rtems.org>
* libc/include/pthread.h: Remove prototypes for
        pthread_attr_getcputime and pthread_attr_setcputime which
        were proposed but never approved by the POSIX standard.
2008-11-19 17:02:34 +00:00
Jeff Johnston 1f9aa7a3f0 2008-11-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/unix/ttyname.c: Use isatty() instead of tcgetattr().
2008-11-18 22:55:06 +00:00
Jeff Johnston fd450adfe7 2008-11-18 Jeff Johnston <jjohnstn@redhat.com>
* libc/unix/basename.c: Add !_NO_BASENAME flag check so code can be
        ignored if desired by a platform.
        * libc/unix/dirname.c: Ditto except replace BASENAME with file name.
        * libc/unix/getcwd.c: Ditto.
        * libc/unix/getlogin.c: Ditto.
        * libc/unix/getpass.c: Ditto.
        * libc/unix/getpwent.c: Ditto.
        * libc/unix/getut.c: Ditto.
        * libc/unix/pread.c: Ditto.
        * libc/unix/pwrite.c: Ditto.
        * libc/unix/sigset.c: Ditto.
2008-11-18 21:47:44 +00:00
Jeff Johnston 57f69f200e 2008-11-18 Craig Howland <howland@LGSInnovations.com>
* libc/unix/ttyname.c: Add ttyname_r and change ttyname to use
        ttyname_r.
2008-11-18 21:39:10 +00:00
Jeff Johnston aa677662af 2008-11-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.host: RTEMS now uses posix subdirectory.
2008-11-17 22:08:05 +00:00
Jeff Johnston 0ea8752342 2008-11-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* sys/rtems/include/limits.h: Add _POSIX2_RE_DUP_MAX.
        * sys/rtems/sys/param.h: sys/rtprio.h not needed.
2008-11-17 22:05:12 +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 d456d606e3 2008-10-31 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/limits.h: Add ARG_MAX, PATH_MAX, and _POSIX2_RE_DUP_MAX.
        * libc/include/envlock.h: New file.
        * libc/include/fnmatch.h: Ditto.
        * libc/include/glob.h: Ditto.
        * libc/include/regex.h: Ditto.
        * libc/include/wordexp.h: Ditto.
        * libc/posix/Makefile.am: Add new files moved from
        libc/sys/linux/stdlib.
        * libc/posix/Makefile.in: Regenerated.
        * libc/posix/COPYRIGHT: New file moved from libc/sys/linux/stdlib.
        * libc/posix/cclass.h: Ditto.
        * libc/posix/cname.h: Ditto.
        * libc/posix/collate.c: Ditto.
        * libc/posix/collate.h: Ditto.
        * libc/posix/collcmp.c: Ditto.
        * libc/posix/engine.c: Ditto.
        * libc/posix/fnmatch.3: Ditto.
        * libc/posix/glob.3: Ditto.
        * libc/posix/fnmatch.c: Ditto.
        * libc/posix/glob.c: Ditto.
        * libc/posix/namespace.h: Ditto.
        * libc/posix/reallocf.c: Ditto.
        * libc/posix/regcomp.c: Ditto.
        * libc/posix/regerror.c: Ditto.
        * libc/posix/regex.3: Ditto.
        * libc/posix/regex2.h: Ditto.
        * libc/posix/regexec.c: Ditto.
        * libc/posix/regfree.c: Ditto.
        * libc/posix/rune.h: Ditto.
        * libc/posix/runetype.h: Ditto.
        * libc/posix/scandir.c: Remove advertising clause which is not in
        effect.
        * libc/posix/sysexits.h: Ditto.
        * libc/posix/un-namespace.h: Ditto.
        * libc/posix/utils.h: Ditto.
        * libc/posix/wordexp.c: Ditto.
        * libc/posix/wordfree.c: Ditto.
        * libc/posix/execl.c: Add !_NO_EXECVE flag check.
        * libc/posix/execle.c: Ditto.
        * libc/posix/execlp.c: Ditto.
        * libc/posix/execv.c: Ditto.
        * libc/posix/execve.c: Ditto.
        * libc/posix/execvp.c: Ditto.
        * libc/posix/popen.c: Add !_NO_POPEN flag check.
        * libc/sys/linux/configure: Regenerated.
        * libc/sys/linux/configure.in: Remove stdlib.
        * libc/sys/linux/include/limits.h: Add include of linux/limits.h.
        * libc/sys/linux/stdlib/Makefile.am: Removed.
        * libc/sys/linux/stdlib/Makefile.in: Ditto.
        * libc/sys/linux/stdlib/COPYRIGHT: Moved to libc/posix.
        * libc/sys/linux/stdlib/cclass.h: Ditto.
        * libc/sys/linux/stdlib/cname.h: Ditto.
        * libc/sys/linux/stdlib/collate.c: Ditto.
        * libc/sys/linux/stdlib/collate.h: Ditto.
        * libc/sys/linux/stdlib/collcmp.c: Ditto.
        * libc/sys/linux/stdlib/engine.c: Ditto.
        * libc/sys/linux/stdlib/fnmatch.3: Ditto.
        * libc/sys/linux/stdlib/fnmatch.c: Ditto.
        * libc/sys/linux/stdlib/glob.3: Ditto.
        * libc/sys/linux/stdlib/glob.c: Ditto.
        * libc/sys/linux/stdlib/reallocf.c: Ditto.
        * libc/sys/linux/stdlib/regcomp.c: Ditto.
        * libc/sys/linux/stdlib/regerror.c: Ditto.
        * libc/sys/linux/stdlib/regex.3: Ditto.
        * libc/sys/linux/stdlib/regex2.h: Ditto.
        * libc/sys/linux/stdlib/regexec.c: Ditto.
        * libc/sys/linux/stdlib/regfree.c: Ditto.
        * libc/sys/linux/stdlib/utils.h: Ditto.
        * libc/sys/linux/stdlib/wordexp.c: Ditto.
        * libc/sys/linux/stdlib/wordfree.c: Ditto.
2008-10-31 21:03:42 +00:00
Jeff Johnston 5d2b3a0a5a 2008-10-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/sys/unistd.h: RTEMS follows standard for sync().
2008-10-16 23:03:40 +00:00
Jeff Johnston 01bf0593df 2008-10-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/time.h: Add CLOCK_MONOTONIC.
   * libc/include/sys/features.h: Define
   _POSIX_MONOTONIC_CLOCK for RTEMS.
2008-10-16 21:53:58 +00:00
Jeff Johnston f7b03c3c5b 2008-10-15 Jeff Johnston <jjohnstn@redhat.com>
* newlib.hin: Restore to previous 1.14 version which has no
        PACKAGE_ macros.
2008-10-16 19:38:15 +00:00
Jeff Johnston baa9e037cc 2008-10-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/sys/unistd.h: Enable ttyname_r() for RTEMS.
2008-10-15 21:37:54 +00:00
Jeff Johnston bc5585e6e5 2008-10-15 Craig Howland <howland@LGSInnovations.com>
* libc/include/ctype.h (isblank):  isblank is C99.
	* libc/ctype/isblank.c (isblank comments):  ditto.  isblank does not
	have a macro version (as was claimed in the description).
2008-10-15 20:36:26 +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
Jeff Johnston 0d2597f5a0 2008-10-06 Eric Blake <ebb9@byu.net>
* libc/stdlib/ldtoa.c (etoasc): Fix rounding to even when fraction
        is 0.5 or 0.75.
2008-10-06 19:47:06 +00:00
Jeff Johnston 75fb38a5fb 2008-10-06 Craig Howland <howland@LGSInnovations.com>
* libc/time/tzset_r.c (_tzset_r):  Change US default start/end dates to
	2007 law revision of start in 2nd Sunday in March, end 1st Sun in Nov.
2008-10-06 19:21:29 +00:00
Jeff Johnston 015b86d725 2008-10-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/string/str-two-way.h (critical_factorization): Cast the index
        operation to ensure unsigned rollover occurs when adding to SIZE_MAX.
2008-10-02 20:12:34 +00:00
Jeff Johnston eea95bd143 2008-10-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/include/stdint.h (SIZE_MAX): Fix value which should
        be size of size_t, not int.
        (SIZE_MIN): Remove.
        * libc/sys/linux/sys/stdint.h: Ditto
2008-10-02 17:29:11 +00:00
Jeff Johnston 9d36d24f6e 2008-10-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/reent.h[_REENT_SMALL](_REENT_INIT_RAND48): Add
        initialization of _rand_next to 1.
2008-10-02 16:43:23 +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
Jeff Johnston 9e71090b9a 2008-09-26 Craig Howland <howland@LGSInnovations.com>
* libc/stdlib/getenv_r.c (_getenv_r): Modify to not match if name
        contains an equal sign.
2008-09-26 16:23:58 +00:00
Jeff Johnston 610eefefdd 2008-09-25 Raphael Derossa Pereira <raphaelpereira@gmail.com>
* libc/include/pthread.h[_UNIX98_THREAD_MUTEX_ATTRIBUTES]: Add
        new pthread_mutexattr_gettype and pthread_mutexattr_settype
        prototypes.
        * libc/include/sys/types.h[_UNIX98_THREAD_MUTEX_ATTRIBUTES]: Add
        new mutex type values.
        (pthread_mutexattr_t)[_UNIX98_THREAD_MUTEX_ATTRIBUTES]: Add type
        field.
2008-09-26 16:15:50 +00:00
Jeff Johnston 57d7cfcdb7 2008-09-24 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/setenv_r.c (_unsetenv_r): Modify to return -1 only if
        name is NULL, empty, or contains equal sign.
2008-09-25 03:00:04 +00:00
Jeff Johnston 37f996a2b2 2008-09-24 Pawel Veselov <pawel.veselov@gmail.com>
Fix setenv/getenv/unsetenv to be OpenGroup compliant:
        * libc/include/stdlib.h (unsetenv, _unsetenv_r): Redefine with integer
        return types.
        * libc/stdlib/getenv_r.c (_findenv_r): Do no special processing with
        names that contain equal chars.
        * libc/stdlib/setenv.c: Redefine _unsetenv_r as returning int.
        * libc/stdlib/setenv_r.c (_setenv_r): Return -1 and set errno to
        EINVAL if name contains an equal sign.  Do not remove any equal signs
        from the value.
        (_unsetenv_r): Modified to return int.  Return -1 and set EINVAL
        if name contains equal sign.  Return -1 if no variable(s) were found
        and return 0 otherwise.
2008-09-25 01:23:08 +00:00
Jeff Johnston 29212ab3cd 2008-09-19 Eric Blake <ebb9@byu.net>
Supply missing POSIX errno values.
        * libc/include/sys/errno.h (ENOTRECOVERABLE, EOWNERDEAD): Define.
        * libc/string/strerror.c (strerror): Decode them, and ECANCELED.
2008-09-19 16:11:35 +00:00
Jeff Johnston 0b840b0009 2008-09-10 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/strcpy.h: Add missing header.
        * libc/machine/spu/spu_timer_slih.c: Remove unused Variable.
        * libm/machine/spu/headers/lgammaf4.h: Add type cast.
2008-09-11 00:33:58 +00:00
Ben Elliston fc378cf7ce Remove bogus entry. 2008-09-09 04:43:43 +00:00
Jeff Johnston da64e6bb4e 008-09-08 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/dl/atomicity.h (exchange_and_add): Fix asm statement to use "m" instead of "0".
	(atomic_add): Ditto.
	* libc/sys/linux/linuxthreads/spinlock.c (__pthread_release): Ditto.
	* libc/sys/linux/net/getaddrinfo.c: Add limit.h include.
	* libc/sys/linux/stdlib/glob.c: Ditto.
2008-09-08 22:25:14 +00:00
Jeff Johnston 27b975f6fd 2008-09-04 Ken Werner <ken.werner@de.ibm.com>
* libm/machine/spu/headers/acosd2.h: Duplicated preamble text removed.
        * libm/machine/spu/headers/acosf4.h: Likewise.
        * libm/machine/spu/headers/acoshd2.h: Likewise.
        * libm/machine/spu/headers/acoshf4.h: Likewise.
        * libm/machine/spu/headers/asind2.h: Likewise.
        * libm/machine/spu/headers/asinf4.h: Likewise.
        * libm/machine/spu/headers/asinhd2.h: Likewise.
        * libm/machine/spu/headers/asinhf4.h: Likewise.
        * libm/machine/spu/headers/atan2d2.h: Likewise.
        * libm/machine/spu/headers/atan2f4.h: Likewise.
        * libm/machine/spu/headers/atand2.h: Likewise.
        * libm/machine/spu/headers/atanf4.h: Likewise.
        * libm/machine/spu/headers/atanhd2.h: Likewise.
        * libm/machine/spu/headers/atanhf4.h: Likewise.
        * libm/machine/spu/headers/cos_sin.h: Likewise.
        * libm/machine/spu/headers/cosd2.h: Likewise.
        * libm/machine/spu/headers/cosf4.h: Likewise.
        * libm/machine/spu/headers/coshd2.h: Likewise.
        * libm/machine/spu/headers/coshf4.h: Likewise.
        * libm/machine/spu/headers/divd2.h: Likewise.
        * libm/machine/spu/headers/divf4.h: Likewise.
        * libm/machine/spu/headers/erf_utils.h: Likewise.
        * libm/machine/spu/headers/erfcd2.h: Likewise.
        * libm/machine/spu/headers/erfcf4.h: Likewise.
        * libm/machine/spu/headers/erfd2.h: Likewise.
        * libm/machine/spu/headers/erff4.h: Likewise.
        * libm/machine/spu/headers/exp2d2.h: Likewise.
        * libm/machine/spu/headers/exp2f4.h: Likewise.
        * libm/machine/spu/headers/expd2.h: Likewise.
        * libm/machine/spu/headers/expf4.h: Likewise.
        * libm/machine/spu/headers/expm1d2.h: Likewise.
        * libm/machine/spu/headers/expm1f4.h: Likewise.
        * libm/machine/spu/headers/floord2.h: Likewise.
        * libm/machine/spu/headers/floorf4.h: Likewise.
        * libm/machine/spu/headers/hypotd2.h: Likewise.
        * libm/machine/spu/headers/hypotf4.h: Likewise.
        * libm/machine/spu/headers/isnand2.h: Likewise.
        * libm/machine/spu/headers/isnanf4.h: Likewise.
        * libm/machine/spu/headers/ldexpd2.h: Likewise.
        * libm/machine/spu/headers/ldexpf4.h: Likewise.
        * libm/machine/spu/headers/lgammad2.h: Likewise.
        * libm/machine/spu/headers/lgammaf4.h: Likewise.
        * libm/machine/spu/headers/log10d2.h: Likewise.
        * libm/machine/spu/headers/log1pd2.h: Likewise.
        * libm/machine/spu/headers/log1pf4.h: Likewise.
        * libm/machine/spu/headers/log2d2.h: Likewise.
        * libm/machine/spu/headers/log2f4.h: Likewise.
        * libm/machine/spu/headers/logbf4.h: Likewise.
        * libm/machine/spu/headers/logd2.h: Likewise.
        * libm/machine/spu/headers/logf4.h: Likewise.
        * libm/machine/spu/headers/nearbyintf4.h: Likewise.
        * libm/machine/spu/headers/nextafterd2.h: Likewise.
        * libm/machine/spu/headers/nextafterf4.h: Likewise.
        * libm/machine/spu/headers/powd2.h: Likewise.
        * libm/machine/spu/headers/powf4.h: Likewise.
        * libm/machine/spu/headers/recipd2.h: Likewise.
        * libm/machine/spu/headers/recipf4.h: Likewise.
        * libm/machine/spu/headers/rintf4.h: Likewise.
        * libm/machine/spu/headers/scalbnf4.h: Likewise.
        * libm/machine/spu/headers/signbitd2.h: Likewise.
        * libm/machine/spu/headers/sincosd2.h: Likewise.
        * libm/machine/spu/headers/sincosf4.h: Likewise.
        * libm/machine/spu/headers/sind2.h: Likewise.
        * libm/machine/spu/headers/sinf4.h: Likewise.
        * libm/machine/spu/headers/sinhd2.h: Likewise.
        * libm/machine/spu/headers/sinhf4.h: Likewise.
        * libm/machine/spu/headers/sqrtd2.h: Likewise.
        * libm/machine/spu/headers/sqrtf4.h: Likewise.
        * libm/machine/spu/headers/tand2.h: Likewise.
        * libm/machine/spu/headers/tanf4.h: Likewise.
        * libm/machine/spu/headers/tanhd2.h: Likewise.
        * libm/machine/spu/headers/tanhf4.h: Likewise.
        * libm/machine/spu/headers/tgammad2.h: Likewise.
        * libm/machine/spu/headers/tgammaf4.h: Likewise.
        * libm/machine/spu/headers/truncd2.h: Likewise.
        * libm/machine/spu/headers/truncf4.h: Likewise.
        * libm/machine/spu/headers/simdmath.h: Likewise.
2008-09-04 17:50:56 +00:00
Jeff Johnston 06e514022d 2008-09-04 Ken Werner <ken.werner@de.ibm.com>
* libm/machine/spu/headers/acoshf4.h: Rebase against current simdmath.
        * libm/machine/spu/headers/asinhd2.h: Likewise.
        * libm/machine/spu/headers/atanhd2.h: Likewise.
        * libm/machine/spu/headers/atanhf4.h: Likewise.
        * libm/machine/spu/headers/erff4.h: Likewise.
        * libm/machine/spu/headers/expd2.h: Likewise.
        * libm/machine/spu/headers/ldexpd2.h: Likewise.
        * libm/machine/spu/headers/lgammaf4.h: Likewise.
        * libm/machine/spu/headers/logbf4.h: Likewise.
        * libm/machine/spu/headers/nextafterd2.h: Likewise.
        * libm/machine/spu/headers/nextafterf4.h: Likewise.
        * libm/machine/spu/headers/recipd2.h: Likewise.
        * libm/machine/spu/headers/simdmath.h: Likewise.
        * libm/machine/spu/headers/acoshd2.: Likewise.
2008-09-04 17:46:14 +00:00
Jeff Johnston db04da9279 2008-09-04 Ken Werner <ken.werner@de.ibm.com>
* libm/machine/spu/headers/cbrt.h: cbrt_factors[] declared.
        * libm/machine/spu/headers/cbrtf.h: Likewise.
2008-09-04 17:27:49 +00:00
Jeff Johnston 2c73a5e682 2008-09-01 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/include/spu_timer.h: spu_timebase function added.
        * libc/machine/spu/spu_timebase.c: New file.
        * libc/machine/spu/Makefile.am: Add new file.
        * libc/machine/spu/Makefile.in: Regenerated.
2008-09-02 16:48:48 +00:00
Jeff Johnston b6ab3057f6 2008-08-28 Craig Howland <howland@LGSInnovations.com>
* libc/time/mktime.c (mktime): Fix tm_isdst value usage (allowing
        any positive value from user (per std) rather than depending
        upon 1).
2008-08-28 18:18:12 +00:00
Jeff Johnston 60ac13a0b0 2008-08-28 Corinna Vinschen <corinna@vinschen.de>
* libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Optimize condition
        for accepting a converted character.
2008-08-28 17:36:49 +00:00
Jeff Johnston cbeb458829 2008-08-27 Sandra Loosemore <sandra@codesourcery.com>
* libc/libc.texinfo: Remove "LOCAL KLUGE" that prevents it
        from building pdfs.
        * libm/libm.texinfo: Likewise.
2008-08-27 21:32:02 +00:00
Jeff Johnston 2d8d8175f1 2008-08-27 Corinna Vinschen <corinna@vinschen.de>
* libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Fix condition for
        accepting a converted character and continuing the loop.
2008-08-27 18:31:04 +00:00
Jeff Johnston 410c1d122d 2008-07-24 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/ctype.h (_ctype_): Restore for C++ backward
        compatability only.
2008-07-24 17:55:26 +00:00
Jeff Johnston fa914bf8ab 2008-07-21 Jeff Johnston <jjohnstn@redhat.com>
* libc/ctype/ctype_.c: Add new pointer __ctype_ptr__ which is one
        less than the old __ctype_ptr.
        * libc/ctype/isalnum.c: Use __ctype_ptr__.
        * libc/ctype/isalpha.c: Ditto.
        * libc/ctype/iscntrl.c: Ditto.
        * libc/ctype/isdigit.c: Ditto.
        * libc/ctype/islower.c: Ditto.
        * libc/ctype/isprint.c: Ditto.
        * libc/ctype/ispunct.c: Ditto.
        * libc/ctype/isspace.c: Ditto.
        * libc/ctype/isupper.c: Ditto.
        * libc/ctype/isxdigit.c: Ditto.
        * libc/include/ctype.h: Change ctype macros to use new __ctype_ptr__
        and add declaration of __ctype_ptr__.  Remove older ctype table pointers
        from here even though they can still work.
2008-07-21 21:28:34 +00:00
Jeff Johnston b47d83c645 2008-07-18 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/strcpy.h: Fix error in previous patch.
2008-07-18 16:36:22 +00:00
Jeff Johnston d2af9effc5 2008-07-17 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/assert.h (__ASSERT_FUNC): Define to __FUNCTION__ when
        __STDC_VERSION__ < 199901L and __GNUC__ >= 2.
2008-07-17 20:56:51 +00:00
Jeff Johnston eb19b8f95a 2008-07-17 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/strcpy.h: Pad null bytes if necessary.
2008-07-17 19:00:44 +00:00
Jeff Johnston 17bfd1e083 2008-07-08 Kenji Tanaka <tanaka.ken2@jp.panasonic.com>
* libc/machine/mn10300/memset.S: Fix bug where return value is
        incorrectly set if number of bytes set is a multiple of 4.
2008-07-08 20:36:27 +00:00
Jeff Johnston 2adedff8b3 2008-07-07 Hans-Peter Nilsson <hp@axis.com>
* libc/machine/mips/strncpy.c: Include stdint.h to get uintptr_t.
        (strncpy): Cast src to uintptr_t before checking alignment with "&".
2008-07-07 15:51:55 +00:00
Jeff Johnston 18a635e315 2008-07-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/argz/argz_count.c: Include stddef.h to get size_t.
        * libc/argz/argz_extract.c: Ditto.
        * libc/argz/argz_stringify.c: Ditto.
        * libc/search/hash.h: Ditto.
        * libc/sys/linux/include/sched.h: Ditto.
        * libc/sys/linux/sys/types.h: Ditto.
2008-07-02 18:38:45 +00:00
Jeff Johnston a9f7d0a7a7 2008-07-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/machine/mips/strncpy.c (strncpy): Fix logic so unaligned
        source data is taken care of before loop unrolling.
2008-07-02 18:17:48 +00:00
Hans-Peter Nilsson 5592f939b4 Fix strict-aliasing issues with _strtod_r and Storeinc.
* libc/stdlib/strtod.c (_strtod_r): Change local variables aadj,
	rv, rv0 from double to type U.  Use accessor macros dval, dword0
	and dword1 for all accesses except for the ULtod call, where rv.i
	replaces the pointer cast.
	* libc/stdlib/mprec.h (U): Rename member L to i for easier re-use
	of access macros.  Tweak comment.
	Remove #ifdef'd YES_ALIAS code.
	(dword0, dword1, dval): Define in terms of uncast union member
	access.  Ditto for _DOUBLE_IS_32BITS variants.
	(Storeinc): Replace aliasing-flawed microoptimized definition with
	alternative suggested in comment.  Remove now stale comment.
2008-06-25 01:45:02 +00:00
Corinna Vinschen eb3f08acf8 * libc/include/machine/setjmp.h (_longjmp): Define as function on
Cygwin.
	(_setjmp): Ditto.
2008-06-21 18:48:45 +00:00
Eric Blake 8fa475e4b1 Per Posix, strsignal returns non-const char*.
* libc/include/string.h (strsignal): Fix return type.
2008-06-18 15:27:41 +00:00
Jeff Johnston 12b0cae7d0 2008-06-17 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/sys/linux_syscalls.h: New file to add Linux syscall
        support.
2008-06-17 17:28:20 +00:00
Jeff Johnston 4e73927b06 2008-06-16 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/sys/dirent.h: Add extern "C" specifier if C++.
	* libc/machine/spu/sys/sched.h: Likewise.
	* libc/machine/spu/sys/syscall.h: Likewise.
2008-06-16 18:54:17 +00:00
Jeff Johnston b243d287e4 2008-06-16 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/mk_syscalls: Provide .type and .size directives
	in generated assembler files.
	* libc/machine/spu/fprintf.S: Regenerate.
	* libc/machine/spu/fscanf.S: Regenerate.
	* libc/machine/spu/printf.S: Regenerate.
	* libc/machine/spu/scanf.S: Regenerate.
	* libc/machine/spu/snprintf.S: Regenerate.
	* libc/machine/spu/sprintf.S: Regenerate.
	* libc/machine/spu/sscanf.S: Regenerate.
	* libc/machine/spu/stack_reg_va.S (__stack_reg_va): Provide .type
	and .size directives.
	* libc/machine/spu/setjmp.S (setjmp): Likewise.
	(longjmp): Likewise.
2008-06-16 18:51:10 +00:00
Jeff Johnston 2b4c1b417f 2008-06-11 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/machine/_default_types.h: Fix GNUC check to
        handle 4.0 and greater.
2008-06-11 22:14:54 +00:00
Jeff Johnston a0496b5e4f 2008-06-09 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/Makefile.am: Add new files.
	* libc/machine/spu/Makefile.in: Likewise.
	* libc/machine/spu/include/spu_timer.h: New file to add timer support
        using interrupts.
	* libc/machine/spu/spu_clock_stop.c: Likewise.
	* libc/machine/spu/spu_clock_svcs.c: Likewise.
	* libc/machine/spu/spu_timer_flih.S: Likewise.
	* libc/machine/spu/spu_timer_free.c: Likewise.
	* libc/machine/spu/spu_timer_internal.h: Likewise.
	* libc/machine/spu/spu_timer_slih.c: Likewise.
	* libc/machine/spu/spu_timer_slih_reg.c: Likewise.
	* libc/machine/spu/spu_timer_stop.c: Likewise.
	* libc/machine/spu/spu_timer_svcs.c: Likewise.
2008-06-10 02:13:22 +00:00
Jeff Johnston 3da06ba822 2008-06-09 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/strcat.c: Return value fixed.
        * libc/machine/spu/strncat.c: Likewise.
2008-06-09 17:26:30 +00:00
Eric Blake 2dd1fb6ff5 Fix bug in previous patch.
* libc/machine/i386/memset.S (memset): Mask second arg correctly.
2008-05-28 14:00:39 +00:00
Jeff Johnston 676ae29038 2008-05-27 Jeff Johnston <jjohnstn@redhat.com>
* libc/string/memset.c: Fix documented prototype to remove
        erroneous const attribute on first parameter.
2008-05-27 18:44:40 +00:00
Jeff Johnston 70bff2d503 2008-05-26 Eric Blake <ebb9@byu.net>
Optimize the generic and x86 memchr.
        * libc/string/memchr.c (memchr) [!__OPTIMIZE_SIZE__]:
        Pre-align pointer so unaligned searches aren't penalized.
        * libc/machine/i386/memchr.S (memchr) [!__OPTIMIZE_SIZE__]: Word
        operations are faster than repnz byte searches.
2008-05-26 23:31:08 +00:00
Jeff Johnston a6bd72a278 2008-05-26 Eric Blake <ebb9@byu.net>
Optimize the generic and x86 memset.
        * libc/string/memset.c (memset) [!__OPTIMIZE_SIZE__]:
        Pre-align pointer so unaligned stores aren't penalized.
        * libc/machine/i386/memset.S (memset): [!__OPTIMIZE_SIZE__]:
        Pre-align pointer so unaligned stores aren't penalized.  Prefer
        8-byte over 4-byte alignment.  Reduce register pressure.
2008-05-26 23:23:15 +00:00
Jeff Johnston cae28869c1 2008-05-26 Eric Blake <ebb9@byu.net>
Optimize the generic and x86 strlen.
        * libc/string/strlen.c (strlen) [!__OPTIMIZE_SIZE__]: Pre-align
        data so unaligned searches aren't penalized.
        * libc/machine/i386/strlen.S (strlen) [!__OPTIMIZE_SIZE__]:
        Word operations are faster than repnz byte searches.
2008-05-26 22:56:14 +00:00
Corinna Vinschen 1fc3031588 * libc/include/sys/_default_fcntl.h: Include <sys/time.h> on Cygwin. 2008-05-23 12:33:50 +00:00
Jeff Johnston 3c77dcff9e 2008-05-22 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/reent.h: Add _h_errno field.
	* libc/sys/linux/libc-symbols.h: Add default stubs for new libc macros
	now used in net directory.
	* libc/sys/linux/bits/libc-lock.h: Always define _IO_MTSAFE_IO.
	* libc/sys/linux/include/hesiod.h: Add needed macros for new code
	in net directory.
	* libc/sys/linux/include/netdb.h: Ditto.
	* libc/sys/linux/include/resolv.h: Ditto.
	* libc/sys/linux/include/stdint.h: Ditto.
	* libc/sys/linux/include/arpa/nameser.h: Ditto.
	* libc/sys/linux/include/net/ethernet.h: Ditto.
	* libc/sys/linux/include/net/if_ppp.h: Ditto.
	* libc/sys/linux/include/netinet/if_ether.h: Ditto.
	* libc/sys/linux/machine/i386/get_clockfreq.c: Remove static memmem.
	* libc/sys/linux/machine/i386/include/endian.h: Protect macros with
	flags to avoid duplicate definition.
	* libc/sys/linux/machine/i386/include/param.h: Ditto.
	* libc/sys/linux/net/Makefile.am: Modified to account for removed and
	added files.
	* libc/sys/linux/net/Makefile.in: Regenerated.
	* libc/sys/linux/net/base64.c: Replaced with glibc version of code.
	* libc/sys/linux/net/getaddrinfo.c: Ditto.
	* libc/sys/linux/net/getnameinfo.c: Ditto.
	* libc/sys/linux/net/getproto.c: Ditto.
	* libc/sys/linux/net/getservent.c: Ditto.
	* libc/sys/linux/net/inet_netof.c: Ditto.
	* libc/sys/linux/net/inet_lnaof.c: Ditto.
	* libc/sys/linux/net/ns_name.c: Ditto.
	* libc/sys/linux/net/ns_netint.c: Ditto.
	* libc/sys/linux/net/inet_ntoa.c: Ditto.
	* libc/sys/linux/net/ns_parse.c: Ditto.
	* libc/sys/linux/net/ns_print.c: Ditto.
	* libc/sys/linux/net/ns_ttl.c: Ditto.
	* libc/sys/linux/net/nsap_addr.c: Ditto.
	* libc/sys/linux/net/rcmd.c: Ditto.
	* libc/sys/linux/net/res_comp.c: Ditto.
	* libc/sys/linux/net/res_data.c: Ditto.
	* libc/sys/linux/net/res_debug.c: Ditto.
	* libc/sys/linux/net/res_init.c: Ditto.
	* libc/sys/linux/net/res_mkquery.c: Ditto.
	* libc/sys/linux/net/res_query.c: Ditto.
	* libc/sys/linux/net/res_send.c: Ditto.
	* libc/sys/linux/net/send.c: Ditto.
	* libc/sys/linux/stdlib/collate.c: Ditto.
	* libc/sys/linux/sys/ioctl.h: Ditto.
	* libc/sys/linux/sys/socket.h: Ditto.
	* libc/sys/linux/sys/unistd.h: Ditto.
	* libc/sys/linux/iconv/iconvconfig.c: Removed either because no longer
	used or because licensing includes advertising clause that cannot be
	ignored.
	* libc/sys/linux/iconv/strtab.c: Ditto.
	* libc/sys/linux/include/libc_private.h: Ditto.
	* libc/sys/linux/include/nsswitch.h: Ditto.
	* libc/sys/linux/include/net/if_atm.h: Ditto.
	* libc/sys/linux/include/net/if_media.h: Ditto.
	* libc/sys/linux/include/net/if_pppvar.h: Ditto.
	* libc/sys/linux/include/netinet/if_atm.h: Ditto.
	* libc/sys/linux/include/netinet/ip_flow.h: Ditto.
	* libc/sys/linux/intl/locale.alias: Ditto.
	* libc/sys/linux/net/addr2ascii.3: Ditto.
	* libc/sys/linux/net/bindresvport.c: Ditto.
	* libc/sys/linux/net/byteorder.3: Ditto.
	* libc/sys/linux/net/res_config.h: Ditto.
	* libc/sys/linux/net/ether_addr.c: Ditto.
	* libc/sys/linux/net/ethers.3: Ditto.
	* libc/sys/linux/net/getaddrinfo.3: Ditto.
	* libc/sys/linux/net/gethostbydns.c: Ditto.
	* libc/sys/linux/net/gethostbyht.c: Ditto.
	* libc/sys/linux/net/gethostbyname.3: Ditto.
	* libc/sys/linux/net/gethostbynis.c: Ditto.
	* libc/sys/linux/net/gethostnamadr.c: Ditto.
	* libc/sys/linux/net/getifaddrs.3: Ditto.
	* libc/sys/linux/net/getifaddrs.c: Ditto.
	* libc/sys/linux/net/getipnodebyname.3: Ditto.
	* libc/sys/linux/net/getnameinfo.3: Ditto.
	* libc/sys/linux/net/getnetbydns.c: Ditto.
	* libc/sys/linux/net/getnetbyht.c: Ditto.
	* libc/sys/linux/net/getnetbynis.c: Ditto.
	* libc/sys/linux/net/getnetent.3: Ditto.
	* libc/sys/linux/net/getnetnamadr.c: Ditto.
	* libc/sys/linux/net/getprotoent.3: Ditto.
	* libc/sys/linux/net/getprotoent.c: Ditto.
	* libc/sys/linux/net/getprotoname.c: Ditto.
	* libc/sys/linux/net/getservbyname.c: Ditto.
	* libc/sys/linux/net/getservbyport.c: Ditto.
	* libc/sys/linux/net/getservent.3: Ditto.
	* libc/sys/linux/net/herror.c: Ditto.
	* libc/sys/linux/net/hesiod.3: Ditto.
	* libc/sys/linux/net/hesiod.c: Ditto.
	* libc/sys/linux/net/if_indextoname.3: Ditto.
	* libc/sys/linux/net/inet.3: Ditto.
	* libc/sys/linux/net/inet6_option_space.3: Ditto.
	* libc/sys/linux/net/inet6_rthdr_space.3: Ditto.
	* libc/sys/linux/net/inet_makeaddr.c: Ditto.
	* libc/sys/linux/net/inet_net.3: Ditto.
	* libc/sys/linux/net/inet_network.c: Ditto.
	* libc/sys/linux/net/innetgr-stub.c: Ditto.
	* libc/sys/linux/net/ip6opt.c: Ditto.
	* libc/sys/linux/net/iso_addr.3: Ditto.
	* libc/sys/linux/net/iso_addr.c: Ditto.
	* libc/sys/linux/net/linkaddr.3: Ditto.
	* libc/sys/linux/net/linkaddr.c: Ditto.
	* libc/sys/linux/net/map_v4v6.c: Ditto.
	* libc/sys/linux/net/name6.c: Ditto.
	* libc/sys/linux/net/namespace.h: Ditto.
	* libc/sys/linux/net/ns.3: Ditto.
	* libc/sys/linux/net/ns_addr.c: Ditto.
	* libc/sys/linux/net/ns_ntoa.c: Ditto.
	* libc/sys/linux/net/nsdispatch.3: Ditto.
	* libc/sys/linux/net/nsdispatch.c: Ditto.
	* libc/sys/linux/net/nslexer.c: Ditto.
	* libc/sys/linux/net/nslexer.l: Ditto.
	* libc/sys/linux/net/nsparser.c: Ditto.
	* libc/sys/linux/net/nsparser.h: Ditto.
	* libc/sys/linux/net/nsparser.y: Ditto.
	* libc/sys/linux/net/rcmd.3: Ditto.
	* libc/sys/linux/net/rcmdsh.3: Ditto.
	* libc/sys/linux/net/res_mkupdate.c: Ditto.
	* libc/sys/linux/net/res_update.c: Ditto.
	* libc/sys/linux/net/resolver.3: Ditto.
	* libc/sys/linux/net/rthdr.c: Ditto.
	* libc/sys/linux/net/vars.c: Ditto.
	* libc/sys/linux/shlib-compat.h: New file.
	* libc/sys/linux/machine/i386/atomic.h: Ditto.
	* libc/sys/linux/net/XXX-lookup.c: Ditto.
	* libc/sys/linux/net/alias-lookup.c: Ditto.
	* libc/sys/linux/net/res_libc.c: Ditto.
	* libc/sys/linux/net/aliases.h: Ditto.
	* libc/sys/linux/net/check_pf.c: Ditto.
	* libc/sys/linux/net/databases.def: Ditto.
	* libc/sys/linux/net/digits_dots.c: Ditto.
	* libc/sys/linux/net/ether_aton.c: Ditto.
	* libc/sys/linux/net/ether_aton_r.c: Ditto.
	* libc/sys/linux/net/ether_hton.c: Ditto.
	* libc/sys/linux/net/ether_line.c: Ditto.
	* libc/sys/linux/net/ether_ntoa.c: Ditto.
	* libc/sys/linux/net/ether_ntoa_r.c: Ditto.
	* libc/sys/linux/net/ether_ntoh.c: Ditto.
	* libc/sys/linux/net/etherent.h: Ditto.
	* libc/sys/linux/net/ethers-lookup.c: Ditto.
	* libc/sys/linux/net/function.def: Ditto.
	* libc/sys/linux/net/getXXbyYY.c: Ditto.
	* libc/sys/linux/net/getXXbyYY_r.c: Ditto.
	* libc/sys/linux/net/getXXent.c: Ditto.
	* libc/sys/linux/net/getXXent_r.c: Ditto.
	* libc/sys/linux/net/getaliasent.c: Ditto.
	* libc/sys/linux/net/getaliasent_r.c: Ditto.
	* libc/sys/linux/net/getaliasname.c: Ditto.
	* libc/sys/linux/net/getaliasname_r.c: Ditto.
	* libc/sys/linux/net/gethstbyad.c: Ditto.
	* libc/sys/linux/net/gethstbyad_r.c: Ditto.
	* libc/sys/linux/net/gethstbynm.c: Ditto.
	* libc/sys/linux/net/gethstbynm2.c: Ditto.
	* libc/sys/linux/net/gethstbynm2_r.c: Ditto.
	* libc/sys/linux/net/gethstbynm_r.c: Ditto.
	* libc/sys/linux/net/gethstent.c: Ditto.
	* libc/sys/linux/net/gethstent_r.c: Ditto.
	* libc/sys/linux/net/getnetbyad.c: Ditto.
	* libc/sys/linux/net/getnetbyad_r.c: Ditto.
	* libc/sys/linux/net/getnetbynm.c: Ditto.
	* libc/sys/linux/net/getnetbynm_r.c: Ditto.
	* libc/sys/linux/net/getnetent.c: Ditto.
	* libc/sys/linux/net/getnetent_r.c: Ditto.
	* libc/sys/linux/net/getnetgrent.c: Ditto.
	* libc/sys/linux/net/getnetgrent_r.c: Ditto.
	* libc/sys/linux/net/getnssent.c: Ditto.
	* libc/sys/linux/net/getnssent_r.c: Ditto.
	* libc/sys/linux/net/getproto_r.c: Ditto.
	* libc/sys/linux/net/getprtent.c: Ditto.
	* libc/sys/linux/net/getprtent_r.c: Ditto.
	* libc/sys/linux/net/getprtname.c: Ditto.
	* libc/sys/linux/net/getprtname_r.c: Ditto.
	* libc/sys/linux/net/getrpcbyname.c: Ditto.
	* libc/sys/linux/net/getrpcbyname_r.c: Ditto.
	* libc/sys/linux/net/getrpcbynumber.c: Ditto.
	* libc/sys/linux/net/getrpcbynumber_r.c: Ditto.
	* libc/sys/linux/net/getrpcent.c: Ditto.
	* libc/sys/linux/net/getrpcent_r.c: Ditto.
	* libc/sys/linux/net/getservent_r.c: Ditto.
	* libc/sys/linux/net/getsrvbynm.c: Ditto.
	* libc/sys/linux/net/getsrvbynm_r.c: Ditto.
	* libc/sys/linux/net/getsrvbypt.c: Ditto.
	* libc/sys/linux/net/getsrvbypt_r.c: Ditto.
	* libc/sys/linux/net/grp-lookup.c: Ditto.
	* libc/sys/linux/net/herrno.c: Ditto.
	* libc/sys/linux/net/hosts-lookup.c: Ditto.
	* libc/sys/linux/net/ifaddrs.h: Ditto.
	* libc/sys/linux/net/ifreq.c: Ditto.
	* libc/sys/linux/net/ifreq.h: Ditto.
	* libc/sys/linux/net/in6_addr.c: Ditto.
	* libc/sys/linux/net/inet6_option.c: Ditto.
	* libc/sys/linux/net/inet_mkadr.c: Ditto.
	* libc/sys/linux/net/inet_net.c: Ditto.
	* libc/sys/linux/net/key-lookup.c: Ditto.
	* libc/sys/linux/net/local.h: Ditto.
	* libc/sys/linux/net/netgroup.h: Ditto.
	* libc/sys/linux/net/netgrp-lookup.c: Ditto.
	* libc/sys/linux/net/network-lookup.c: Ditto.
	* libc/sys/linux/net/not-cancel.h: Ditto.
	* libc/sys/linux/net/ns_samedomain.c: Ditto.
	* libc/sys/linux/net/nscd-types.h: Ditto.
	* libc/sys/linux/net/nss.h: Ditto.
	* libc/sys/linux/net/nsswitch.c: Ditto.
	* libc/sys/linux/net/nsswitch.h: Ditto.
	* libc/sys/linux/net/opensock.c: Ditto.
	* libc/sys/linux/net/proto-lookup.c: Ditto.
	* libc/sys/linux/net/pwd-lookup.c: Ditto.
	* libc/sys/linux/net/res_debug.h: Ditto.
	* libc/sys/linux/net/res_hconf.c: Ditto.
	* libc/sys/linux/net/res_hconf.h: Ditto.
	* libc/sys/linux/net/rexec.c: Ditto.
	* libc/sys/linux/net/rpc-lookup.c: Ditto.
	* libc/sys/linux/net/ruserpass.c: Ditto.
	* libc/sys/linux/net/service-lookup.c: Ditto.
	* libc/sys/linux/net/spwd-lookup.c: Ditto.
	* libc/sys/linux/net/nscd/nscd-client.h: Ditto.
	* libc/sys/linux/net/nscd/nscd_proto.h: Ditto.
2008-05-22 21:30:28 +00:00
Eric Blake ae47b14a12 Optimize the generic strchr.
* libc/string/strchr.c (strchr) [!__OPTIMIZE_SIZE__]: Pre-align
data so unaligned searches aren't penalized.  Special-case
searching for 0.
2008-05-22 02:31:46 +00:00
Eric Blake 4962a9453a Optimize strchr for x86.
* libc/machine/i386/strchr.S (strchr): Pre-align data so unaligned
searches aren't penalized.  Special-case searching for 0.
2008-05-21 21:46:04 +00:00
Nick Clifton cb1f8161c1 * libc/sys/sysnecv850/crt0.S (___dso_handle): Define (weak).
* iq2000/crt0.S (__dso_handle): Define (weak).
        * frv/crt0.S (__dso_handle): Define (weak).
        * mn10300/crt0.S (___dso_handle): Define (weak).
2008-05-21 07:44:32 +00:00
Jeff Johnston a9309ff5b6 2008-05-20 DJ Delorie <dj@redhat.com>
* libc/sys/sysnecv850/isatty.c (_isatty): Renamed from isatty.
2008-05-20 18:00:12 +00:00
Jeff Johnston 26432b0bb5 2008-05-14 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/reent.h: Change _REENT_INIT... macros to
        access macro parameter with parentheses around it.
2008-05-14 22:09:10 +00:00
Mark Mitchell df93e6f193 * libc/include/stdint.h (SIZE_MIN): Remove.
(SIZE_MAX): Define.
	* testsuite/newlib.stdlib/stdlib.exp: New.
	* testsuite/newlib.stdlib/size_max.c: Likewise.
2008-05-02 14:52:56 +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
Corinna Vinschen 78970a51f3 * libc/include/sys/stat.h: Guard at-functions with !__INSIDE_CYGWIN__.
(fstatat): Fix type of third parameter.
2008-04-26 07:49:39 +00:00
Nick Clifton 026f9d290f * libc/machine/arm/setjmp.S: Fix thumb2 support.
* arm/crt0.S: Allow assembly under ARMv7 ISA.  Support for
            initializing stack pointers for interrupt modes is still pending.
2008-04-25 09:02:40 +00:00
Nick Clifton 51bef6a9c6 * libc/include/machine/ieeefp.h: Fix typo: _DOUBLE_IS_32_BITS
should be _DOUBLE_IS_32BITS.
2008-04-24 11:26:41 +00:00
Corinna Vinschen 0d02384a48 * libc/include/sys/stat.h (UTIME_NOW): Define for Cygwin.
(UTIME_OMIT): Ditto.
	(utimensat): Declare for Cygwin.
	(futimens): Ditto.
2008-04-24 09:39:21 +00:00
Jeff Johnston e2af45bfd1 2008-04-23 Ken Werner <ken.werner@de.ibm.com>
* libc/include/_ansi.h: _LONG_LONG renamed to _LONG_LONG_TYPE.
        * libc/include/math.h: Likewise.
2008-04-23 23:10:54 +00:00
Corinna Vinschen ca48eb65e9 * libc/include/stdio.h (renameat): Declare for Cygwin.
(symlinkat): Ditto.
	* libc/include/sys/unistd.h (readlink): Align declaration to POSIX.
	(faccessat): Declare for Cygwin.
	(fchownat): Ditto.
	(linkat): Ditto.
	(readlinkat): Ditto.
	* libc/include/sys/_default_fcntl.h (AT_FDCWD): Define for Cygwin.
	(AT_EACCESS): Ditto.
	(AT_SYMLINK_NOFOLLOW): Ditto.
	(AT_SYMLINK_FOLLOW): Ditto.
	(AT_REMOVEDIR): Ditto.
	(futimesat): Declare for Cygwin.
	(openat): Ditto.
	(unlinkat): Ditto.
	* libc/include/sys/stat.h (fchmodat): Ditto.
	(fstatat): Ditto.
	(mkdirat): Ditto.
	(mkfifoat): Ditto.
	(mknodat): Ditto.
2008-04-23 11:13:24 +00:00
Jeff Johnston e950505015 2008-04-16 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/sys/errno.h: Use _impure_data, not _reent_data.
2008-04-16 20:04:08 +00:00
Jeff Johnston c2bd84bc27 2008-04-16 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/impure.c: Add missing underscore to impure_data.
2008-04-16 18:46:20 +00:00
Jeff Johnston 45b142890d 2008-04-14 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/impure.c: New file, supply a non-static _impure_data.
        * libc/machine/spu/Makefile.am: Add new file impure.c.
        * libc/machine/spu/Makefile.in: Regenerate.
        * libc/machine/spu/sys/errno.h: Define errno to be _reent_data._errno.
2008-04-15 19:57:48 +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
DJ Delorie 6f810581fb [newlib]
* libm/machine/spu/configure: Regenerate with autoconf 2.61.
	* libc/sys/configure: Regenerate with autoconf 2.61.
	* libc/machine/configure: Regenerate with autoconf 2.61.
[libgloss]
	* hp74x/configure: Regenerate with autoconf 2.61.
	* fr30/configure: Regenerate with autoconf 2.61.
	* mips/configure: Regenerate with autoconf 2.61.
	* xstormy16/configure: Regenerate with autoconf 2.61.
	* rs6000/configure: Regenerate with autoconf 2.61.
	* d30v/configure: Regenerate with autoconf 2.61.
	* i386/configure: Regenerate with autoconf 2.61.
	* configure: Regenerate with autoconf 2.61.
	* wince/configure: Regenerate with autoconf 2.61.
	* pa/configure: Regenerate with autoconf 2.61.
	* m32r/configure: Regenerate with autoconf 2.61.
	* mn10200/configure: Regenerate with autoconf 2.61.
	* iq2000/configure: Regenerate with autoconf 2.61.
	* cris/configure: Regenerate with autoconf 2.61.
	* m68k/configure: Regenerate with autoconf 2.61.
	* spu/configure: Regenerate with autoconf 2.61.
	* m32c/configure: Regenerate with autoconf 2.61.
	* mn10300/configure: Regenerate with autoconf 2.61.
	* i960/configure: Regenerate with autoconf 2.61.
	* arm/configure: Regenerate with autoconf 2.61.
	* libnosys/configure: Regenerate with autoconf 2.61.
	* m68hc11/configure: Regenerate with autoconf 2.61.
	* bfin/configure: Regenerate with autoconf 2.61.
	* crx/configure: Regenerate with autoconf 2.61.
	* mt/configure: Regenerate with autoconf 2.61.
	* sparc/configure: Regenerate with autoconf 2.61.
	* sparc/libsys/configure: Regenerate with autoconf 2.61.
	* mcore/configure: Regenerate with autoconf 2.61.
	* mep/configure: Regenerate with autoconf 2.61.
	* frv/configure: Regenerate with autoconf 2.61.
	* doc/configure: Regenerate with autoconf 2.61.
2008-04-04 21:52:01 +00:00
Jeff Johnston bd6e30d59a 2008-04-01 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/memcmp.c: New file for SPU optimized memcmp.
        * libc/machine/spu/strncmp.h: New file supply _strncmp_internal.
        * libc/machine/spu/Makefile.am: Add memcmp.c.
        * libc/machine/spu/Makefile.in: Rebuild.
        * libc/machine/spu/strncmp.c: Use _strncmp_internal.
2008-04-01 19:02:16 +00:00
Jeff Johnston 71f3a8f566 2008-04-01 Patrick Mansfield <patmans@us.ibm.com>
* configure.host: Build SPU with -DREENTRANT_SYSCALLS_PROVIDED and
          -DMISSING_SYSCALL_NAMES.
2008-04-01 18:58:07 +00:00
Jeff Johnston 1d4a4944e5 2008-03-27 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/Makefile.am: Add assert.c.
	* libc/machine/spu/Makefile.in: Regenerate.
	* libc/machine/spu/assert.c: New file.
2008-04-01 18:53:41 +00:00
Jeff Johnston 3ab380aaa8 2008-03-27 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/reent.h: Define _func_r functions in this file to
        func if REENTRANT_SYSCALLS_PROVIDED and MISSING_SYSCALL_NAMES are
        defined.
2008-03-27 23:28:17 +00:00
Corinna Vinschen 4af0c5e8f3 * libc/include/sys/unistd.h: Declare lockf(2) and define lockf
constants when building for Cygwin.
2008-03-27 09:55:05 +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 c622842865 2008-03-07 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/getopt.h: Hide newlib extensions under
        the __need_getopt_newlib flag.
        * libc/stdlib/getopt.c: #define __need_getopt_newlib before including
        getopt.h.  Put entire code under !HAVE_GETOPT to support platforms
        with their own getopt implementation.
        * configure.host: Specify HAVE_GETOPT for x86-linux.
2008-03-07 18:16:35 +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 beb0ab6466 Fix strtod("nan()", ptr).
* libc/stdlib/gdtoa-hexnan.c (hexnan): When the optional
n-char-sequence is omitted, still parse the ().
-------------------------------------------------------------------
2008-03-04 18:27:01 +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 be62101c60 2008-03-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/getopt.h (no_argument): Added for glibc compatibility.
        (required_argument, optional_argument): Ditto.
2008-03-03 19:47:59 +00:00
Jeff Johnston 76ff710cfa 2008-02-29 Gregory Pietsch <gpietsch@comcast.net>
* libc/stdlib/getopt.c (getopt_internal): Rewrite to accept
        data area so as to support reentrant calls.  Change all callers
        to fill in data area with global values and restore any changes
        to the global values after call.
        (__getopt_r, __getopt_long_r, __getopt_long_only_r): New routines
        to support reentrancy that add a data area argument.
        * libc/include/getopt.h: Add new _r routines and provide macros
        so they can be called with using double-underscores.
2008-02-29 21:11:57 +00:00
Eric Blake 7a44c13ecb Fix strtod("-0x", NULL).
* libc/stdlib/strtod.c (_strtod_r): Fall back to 0 if hex parse
fails.
2008-02-21 17:14:14 +00:00
Jeff Johnston de20111eba 2008-02-12 Jeff Johnston <jjohnstn@redhat.com>
* libc/machine/powerpc/vfprintf.c (_VFPRINTF_R): Prepare
        for user specifying --disable-newlib-io-long-long on configure.
        Call _fflush_r instead of fflush.  For _mbtowc_r, pass the
        reentrant pointer passed in rather than _REENT.
2008-02-12 18:07:55 +00:00
Jeff Johnston f46f40b54e 2008-02-12 Peter Rosin <peda@lysator.liu.se>
* libc/stdlib/getopt.c (getopt_internal): Handle optional
        arguments better for long options and short options not
        appearing as the first option in a sequence.
2008-02-12 17:20:09 +00:00
Jeff Johnston 74d928bf7a 2008-02-11 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/straddr.h: New file, supplies _straddr.
        * libc/machine/spu/strcat.c: Use _straddr and _strcpy.
        * libc/machine/spu/strcpy.c: Use _strcpy.
        * libc/machine/spu/strcpy.h: Supply _strcpy for optimized SPU
        str[n]cpy and str[n]cat.
        * libc/machine/spu/strncat.c: Use _straddr and _strcpy.
        * libc/machine/spu/strncpy.c: Use _strcpy.
2008-02-11 22:19:59 +00:00
Jeff Johnston 9b924fc304 2008-02-11 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/strlen.c: Remove the len variable and unneeded
        calculation of its value.
2008-02-11 22:14:46 +00:00
Brian Ford 17bccd4120 Remove conflict marker as obvious. 2008-01-30 18:49:59 +00:00
Hans-Peter Nilsson 77ec26b04a * libc/sys/mmixware/isatty.c (_isatty): Renamed from isatty.
Make ISO C.
2008-01-25 04:31:11 +00:00
DJ Delorie 226f5a32da * libc/sys/sh/syscalls.c (_isatty): New. 2008-01-22 00:24:45 +00:00
Jeff Johnston cece11c511 2008-01-21 Neal H. Walfield <neal@gnu.org>
* Makefile.am (crt1.o): Use correct source.
        * Makefile.in: Regenerated.
2008-01-21 18:29:17 +00:00
Eric Blake dc26a86fbb * libc/string/Makefile.am (ELIX_2_SOURCES): Fix definition.
* libc/string/Makefile: Regenerate.
2008-01-15 13:35:33 +00:00
Corinna Vinschen 12df8a5b53 * libc/include/machine/setjmp.h (__SIGMASK_FUNC): Define as
pthread_sigmask or sigprocmask depending on _POSIX_THREADS.
	(sigsetjmp): Use __SIGMASK_FUNC.
	(siglongjmp): Ditto.
	(_setjmp): Define as macro.
	(_longjmp): Ditto.
2008-01-15 09:41:06 +00:00
Eric Blake 40617efc8b Make strstr and strcasestr O(n), not O(n^2); add memmem.
* libc/string/str-two-way.h: New file.
* libc/string/memmem.c (memmem): New file.
* libc/include/string.h (memmem): Declare for all platforms.
* libc/string/strstr.c (strstr): Provide O(n) implementation when
not optimizing for space.
* libc/string/strcasestr.c (strcasestr): Likewise.
* libc/string/Makefile.am (ELIX_SOURCES): Rename to...
(ELIX_2_SOURCES): ...this.
(ELIX_4_SOURCES): New category, for memmem.
(lib_a_SOURCES, libstring_la_SOURCES): Build new file.
(CHEWOUT_FILES): Build documentation for memmem.
* libc/string/strings.tex: Include new docs.
2008-01-12 04:25:55 +00:00
Jeff Johnston ceb32a183c 2008-01-08 Jeff Johnston <jjohnstn@redhat.com>
* libc/machine/m68k/memcpy.S: Remove % from register references
        as this is already handled by m68kasm.h.
        * libc/machine/m68k/memset.S: Ditto.
2008-01-08 21:48:06 +00:00
Jeff Johnston a32113705f 2008-01-07 Jeff Johnston <jjohnstn@redhat.com>
* libc/machine/m68k/m68kasm.h: New file.
        * libc/machine/m68k/setjmp.S: Remove common definitions and
        place in m68kasm.h.  Include "m68kasm.h".
        * libc/machine/m68k/memcpy.S: Include "m68kasm.h" and use
        SYM() macro when referencing function name.
        * libc/machine/m68k/memset.S: Ditto.
2008-01-07 18:59:45 +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 7c8bd7a075 2008-01-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/syscalls/sysclose.c: Always call reentrant version of the
        underlying syscall since one is guaranteed to exist in libc/reent.
        * libc/syscalls/sysexecve.c: Ditto.
        * libc/syscalls/sysfcntl.c: Ditto.
        * libc/syscalls/sysfork.c: Ditto.
        * libc/syscalls/sysfstat.c: Ditto.
        * libc/syscalls/sysgetpid.c: Ditto.
        * libc/syscalls/sysgettod.c: Ditto.
        * libc/syscalls/syskill.c: Ditto.
        * libc/syscalls/syslink.c: Ditto.
        * libc/syscalls/syslseek.c: Ditto.
        * libc/syscalls/sysopen.c: Ditto.
        * libc/syscalls/sysread.c: Ditto.
        * libc/syscalls/syssbrk.c: Ditto.
        * libc/syscalls/sysstat.c: Ditto.
        * libc/syscalls/systimes.c: Ditto.
        * libc/syscalls/sysunlink.c: Ditto.
        * libc/syscalls/syswait.c: Ditto.
        * libc/syscalls/syswrite.c: Ditto.
2008-01-03 00:16:49 +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
Jeff Johnston 6af69de3d3 2007-12-19 Jeff Johnston <jjohnstn@redhat.com>
* libc/string/strcasestr.c: Remove id macro.
        * libc/sys/linux/linuxthreads/attr.c: Fix up sched_priority
        field reference to be __sched_priority.
        * libc/sys/linux/linuxthreads/joinrace.c: Ditto.
        * libc/sys/linux/linuxthreads/manager.c: Ditto.
        * libc/sys/linux/stdlib/collate.c: Remove id macro.
        * libc/sys/linux/stdlib/collcmp.c: Ditto.
        * libc/sys/linux/stdlib/engine.c: Ditto.
        * libc/sys/linux/stdlib/fnmatch.c: Ditto.
        * libc/sys/linux/stdlib/glob.c: Ditto.
        * libc/sys/linux/stdlib/reallocf.c: Ditto.
        * libc/sys/linux/stdlib/regcomp.c: Ditto.
        * libc/sys/linux/stdlib/regerror.c: Ditto.
        * libc/sys/linux/stdlib/regexec.c: Ditto.
        * libc/sys/linux/stdlib/regfree.c: Ditto.
        * libc/sys/linux/sys/cdefs.h: Replace with latest version.
        * libc/sys/linux/include/argp.h: Ditto.
        * libc/sys/linux/sys/libc-lock.h: New file.
        * libc/sys/linux/sys/stdint.h: Ditto.
        * libc/sys/linux/include/sched.h: New file.
2007-12-19 22:27:00 +00:00
Jeff Johnston 3cc8a378d1 2007-12-19 Dave Korn <dave.korn@artimi.com>
Jeff Johnston  <jjohnstn@redhhat.com>

        * libc/include/_ansi.h: Add _LONG_LONG definition.
        * libc/include/math.h (llrint, llrintf, rintl, lrintl, llrintl): Add
        prototypes.
        * libc/machine/i386/machine/fastmath.h: Add support for new i386
        fast math versions of rint, lrint, and llrint family functions.
        * libm/machine/i386/Makefile.am: Add new files.
        * libm/machine/i386/Makefile.in: Regenerated.
        * libm/machine/i386/f_llrint.c, libm/machine/i386/f_lrint.c,
        libm/machine/i386/f_rint.c, libm/machine/i386/f_llrintf.c,
        libm/machine/i386/f_lrintf.c, libm/machine/i386/f_rintf.c,
        libm/machine/i386/f_llrintl.c, libm/machine/i386/f_lrintl.c,
        libm/machine/i386/f_rintl.c:  New files with fast math implementations.
2007-12-19 22:20:25 +00:00
Jeff Johnston 41e94f2488 2007-12-19 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/features.h: Add checks for C90 compilers using
        -ansi.
2007-12-19 18:51:19 +00:00
Corinna Vinschen ac26b72723 * libc/include/wchar.h: Add prototypes for wcpcpy and wcpncpy.
* libc/string/Makefile.am (ELIX_SOURCES): Add wcpcpy.c and
	wcpncpy.c.
	(CHEWOUT_FILES): Add wcpcpy.def and wcpncpy.def.
	* libc/string/Makefile.in: Regenerate.
	* libc/string/wcpcpy.c: New file.
	* libc/string/wcpncpy.c: New file.
	* libc/string/wcstrings.tex: Add wcpcpy and wcpncpy.
2007-12-19 17:33:12 +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
Jeff Johnston 60bef55d30 2007-11-19 Nick Clifton <nickc@redhat.com>
* libc/machine/mn10300/Makefile.am (CCASFLAGS): Add -Wa,--gdwarf-2.
        * libc/machine/mn10300/Makefile.in: Regenerate.
        * libc/machine/mn10300/memchar.S: Remove redundant labels.  Add
        .debug_frame section.
        * libc/machine/mn10300/memcmp.S: Likewise.
        * libc/machine/mn10300/memcpy.S: Likewise.
        * libc/machine/mn10300/memset.S: Likewise.
        * libc/machine/mn10300/strchr.S: Likewise.
        * libc/machine/mn10300/strcmp.S: Likewise.
        * libc/machine/mn10300/strcpy.S: Likewise.
        * libc/machine/mn10300/strlen.S: Likewise.
2007-11-19 20:03:25 +00:00
Corinna Vinschen 815774e87f * libc/include/sys/unistd.h: Remove Cygwin definition of MAXPATHLEN. 2007-11-08 16:20:12 +00:00
Dave Brolley 7b4cad4ae6 2007-11-07 Dave Brolley <brolley@redhat.com>
* libc/machine/configure: Regenerated to pick up mep-elf changes.

        * Contribute mep-elf from Red Hat
        2006-10-27  DJ Delorie  <dj@redhat.com>

        * libc/include/machine/setjmp.h: Add MeP support.

        2003-04-17  DJ Delorie  <dj@redhat.com>

        * configure.host (mep-*-*): Support "long long" type.

        2001-06-06  DJ Delorie  <dj@redhat.com>

        * libc/include/machine/ieeefp.h (mep): Support little endian too.

        2001-05-14  DJ Delorie  <dj@redhat.com>

        * configure.host: Add mep's machine_dir.
        * libc/include/setjmp.h: Add mep support.
        * libc/machine/mep: New.
        * libc/machine/mep/setjmp.S: New, support mep's setjmp/longjmp.

        2001-05-04  DJ Delorie  <dj@redhat.com>

        * configure.host: Add mep.
        * libc/include/machine/ieeefp.h: Ditto.
2007-11-07 21:42:24 +00:00
DJ Delorie 69bfb481a8 * libc/signal/signal.c (_raise_r): Don't attempt to initialize the
signal table, just use a default, in case initialization cause
recursion.
2007-10-31 22:22:31 +00:00
Jeff Johnston 2a3a02a687 2007-10-23 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/wcstombs_r.c: Add SUSV2 support for calculating
        size if output buffer is NULL.
2007-10-23 19:50:29 +00:00
Jeff Johnston 70317d8506 2007-10-17 Jeff Johnston <jjohnstn@redhat.com>
* libm/mathfp/s_logarithm.c: Fix error introduced by previous
        fix when handling negative input values.  Make function
        consistent with math directory and glibc version such that
        inf and nan values return inf and nan respectively with no
        errno setting.
        * libm/mathfp/sf_logarithm.c: Ditto.
        * libm/math/w_log.c: Set errno to ERANGE when input is 0.0.
        * libm/math/wf_log.c: Ditto.
        * libm/math/w_log10.c: Ditto.
        * libm/math/wf_log10.c: Ditto.
2007-10-18 00:03:32 +00:00
Jeff Johnston 923f9573a3 2007-10-17 Jeff Johnston <jjohnstn@redhat.com>
* libm/mathfp/s_logarithm.c: Fix case where input is 0 to
        return -inf.
        * libm/mathfp/sf_logarithm.c: Ditto.
2007-10-17 20:14:49 +00:00
Jeff Johnston 8b6308401d 2007-10-17 Jeff Johnston <jjohnstn@redhat.com>
* libc/machine/i386/machine/fastmath.h: New file.
2007-10-17 19:21:32 +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
Nick Clifton 97f0a0ecf6 * libc/sys/linux/dl/do-lookup.h (FCT): Support symbols with the STT_COMMON type. 2007-10-09 16:01:43 +00:00
Ben Elliston b7bc4cccd6 * libm/machine/spu/headers/acosd2.h: Include spu_intrinsics.h
before simdmath.h to get a definition for `vector'.
	* libm/machine/spu/headers/asind2.h: Likewise.
2007-10-09 04:24:11 +00:00
Jeff Johnston 1671fbe1ca 2007-09-28 Patrick Mansfield <patmans@us.ibm.com>
* libm/machine/spu/headers/dom_chkd_less_than.h: New file.
	* libm/machine/spu/headers/dom_chkd_negone_one.h: Ditto.
	* libm/machine/spu/headers/dom_chkf_less_than.h: Ditto.
	* libm/machine/spu/headers/dom_chkf_negone_one.h: Ditto.
	* libm/machine/spu/headers/acos.h: Add domain check.
	* libm/machine/spu/headers/acosf.h: Ditto.
	* libm/machine/spu/headers/acosh.h: Ditto.
	* libm/machine/spu/headers/acoshf.h: Ditto.
	* libm/machine/spu/headers/asin.h: Ditto.
	* libm/machine/spu/headers/asinf.h: Ditto.
	* libm/machine/spu/headers/atanh.h: Ditto.
	* libm/machine/spu/headers/atanhf.h: Ditto.
	* libm/machine/spu/headers/fmod.h: Ditto.
	* libm/machine/spu/headers/fmodf.h: Ditto.
	* libm/machine/spu/headers/log.h: Ditto.
	* libm/machine/spu/headers/log10.h: Ditto.
	* libm/machine/spu/headers/log1p.h: Ditto.
	* libm/machine/spu/headers/log1pf.h: Ditto.
	* libm/machine/spu/headers/log2.h: Ditto.
	* libm/machine/spu/headers/log2f.h: Ditto.
	* libm/machine/spu/headers/sqrt.h: Ditto.
	* libm/machine/spu/headers/sqrtf.h: Ditto.
	* libm/machine/spu/headers/tgamma.h: Ditto.
	* libm/machine/spu/headers/tgammaf.h: Ditto.
2007-09-28 18:58:10 +00:00
Jeff Johnston e30a7b84aa 2007-09-28 Patrick Mansfield <patmans@us.ibm.com>
* libm/machine/spu/Makefile.am: Add new C files.
	* libm/machine/spu/Makefile.in: Regenerate.
	* libm/machine/spu/headers/acos.h: New file.
	* libm/machine/spu/headers/acosd2.h: Ditto.
	* libm/machine/spu/headers/acosf.h: Ditto.
	* libm/machine/spu/headers/acosf4.h: Ditto.
	* libm/machine/spu/headers/acosh.h: Ditto.
	* libm/machine/spu/headers/acoshd2.h: Ditto.
	* libm/machine/spu/headers/acoshf.h: Ditto.
	* libm/machine/spu/headers/acoshf4.h: Ditto.
	* libm/machine/spu/headers/asin.h: Ditto.
	* libm/machine/spu/headers/asind2.h: Ditto.
	* libm/machine/spu/headers/asinf.h: Ditto.
	* libm/machine/spu/headers/asinf4.h: Ditto.
	* libm/machine/spu/headers/asinh.h: Ditto.
	* libm/machine/spu/headers/asinhd2.h: Ditto.
	* libm/machine/spu/headers/asinhf.h: Ditto.
	* libm/machine/spu/headers/asinhf4.h: Ditto.
	* libm/machine/spu/headers/atan.h: Ditto.
	* libm/machine/spu/headers/atan2.h: Ditto.
	* libm/machine/spu/headers/atan2d2.h: Ditto.
	* libm/machine/spu/headers/atan2f.h: Ditto.
	* libm/machine/spu/headers/atan2f4.h: Ditto.
	* libm/machine/spu/headers/atand2.h: Ditto.
	* libm/machine/spu/headers/atanf4.h: Ditto.
	* libm/machine/spu/headers/atanh.h: Ditto.
	* libm/machine/spu/headers/atanhd2.h: Ditto.
	* libm/machine/spu/headers/atanhf.h: Ditto.
	* libm/machine/spu/headers/atanhf4.h: Ditto.
	* libm/machine/spu/headers/cos.h: Ditto.
	* libm/machine/spu/headers/cos_sin.h: Ditto.
	* libm/machine/spu/headers/cosd2.h: Ditto.
	* libm/machine/spu/headers/cosf.h: Ditto.
	* libm/machine/spu/headers/cosf4.h: Ditto.
	* libm/machine/spu/headers/cosh.h: Ditto.
	* libm/machine/spu/headers/coshd2.h: Ditto.
	* libm/machine/spu/headers/coshf.h: Ditto.
	* libm/machine/spu/headers/coshf4.h: Ditto.
	* libm/machine/spu/headers/divd2.h: Ditto.
	* libm/machine/spu/headers/divf4.h: Ditto.
	* libm/machine/spu/headers/erf.h: Ditto.
	* libm/machine/spu/headers/erf_utils.h: Ditto.
	* libm/machine/spu/headers/erfc.h: Ditto.
	* libm/machine/spu/headers/erfcd2.h: Ditto.
	* libm/machine/spu/headers/erfcf.h: Ditto.
	* libm/machine/spu/headers/erfcf4.h: Ditto.
	* libm/machine/spu/headers/erfd2.h: Ditto.
	* libm/machine/spu/headers/erff.h: Ditto.
	* libm/machine/spu/headers/erff4.h: Ditto.
	* libm/machine/spu/headers/exp.h: Ditto.
	* libm/machine/spu/headers/exp2.h: Ditto.
	* libm/machine/spu/headers/exp2d2.h: Ditto.
	* libm/machine/spu/headers/exp2f4.h: Ditto.
	* libm/machine/spu/headers/expd2.h: Ditto.
	* libm/machine/spu/headers/expf4.h: Ditto.
	* libm/machine/spu/headers/expm1.h: Ditto.
	* libm/machine/spu/headers/expm1d2.h: Ditto.
	* libm/machine/spu/headers/expm1f.h: Ditto.
	* libm/machine/spu/headers/expm1f4.h: Ditto.
	* libm/machine/spu/headers/floord2.h: Ditto.
	* libm/machine/spu/headers/floorf4.h: Ditto.
	* libm/machine/spu/headers/hypot.h: Ditto.
	* libm/machine/spu/headers/hypotd2.h: Ditto.
	* libm/machine/spu/headers/hypotf.h: Ditto.
	* libm/machine/spu/headers/hypotf4.h: Ditto.
	* libm/machine/spu/headers/isnan.h: Ditto.
	* libm/machine/spu/headers/isnand2.h: Ditto.
	* libm/machine/spu/headers/isnanf.h: Ditto.
	* libm/machine/spu/headers/isnanf4.h: Ditto.
	* libm/machine/spu/headers/ldexpd2.h: Ditto.
	* libm/machine/spu/headers/ldexpf4.h: Ditto.
	* libm/machine/spu/headers/lgamma.h: Ditto.
	* libm/machine/spu/headers/lgammad2.h: Ditto.
	* libm/machine/spu/headers/lgammaf.h: Ditto.
	* libm/machine/spu/headers/lgammaf4.h: Ditto.
	* libm/machine/spu/headers/log.h: Ditto.
	* libm/machine/spu/headers/log10.h: Ditto.
	* libm/machine/spu/headers/log10d2.h: Ditto.
	* libm/machine/spu/headers/log1p.h: Ditto.
	* libm/machine/spu/headers/log1pd2.h: Ditto.
	* libm/machine/spu/headers/log1pf.h: Ditto.
	* libm/machine/spu/headers/log1pf4.h: Ditto.
	* libm/machine/spu/headers/log2.h: Ditto.
	* libm/machine/spu/headers/log2d2.h: Ditto.
	* libm/machine/spu/headers/log2f4.h: Ditto.
	* libm/machine/spu/headers/logbf.h: Ditto.
	* libm/machine/spu/headers/logbf4.h: Ditto.
	* libm/machine/spu/headers/logd2.h: Ditto.
	* libm/machine/spu/headers/logf4.h: Ditto.
	* libm/machine/spu/headers/nearbyintf.h: Ditto.
	* libm/machine/spu/headers/nearbyintf4.h: Ditto.
	* libm/machine/spu/headers/nextafter.h: Ditto.
	* libm/machine/spu/headers/nextafterd2.h: Ditto.
	* libm/machine/spu/headers/nextafterf.h: Ditto.
	* libm/machine/spu/headers/nextafterf4.h: Ditto.
	* libm/machine/spu/headers/pow.h: Ditto.
	* libm/machine/spu/headers/powd2.h: Ditto.
	* libm/machine/spu/headers/powf.h: Ditto.
	* libm/machine/spu/headers/powf4.h: Ditto.
	* libm/machine/spu/headers/recipd2.h: Ditto.
	* libm/machine/spu/headers/recipf4.h: Ditto.
	* libm/machine/spu/headers/rintf.h: Ditto.
	* libm/machine/spu/headers/rintf4.h: Ditto.
	* libm/machine/spu/headers/scalbnf4.h: Ditto.
	* libm/machine/spu/headers/signbit.h: Ditto.
	* libm/machine/spu/headers/signbitd2.h: Ditto.
	* libm/machine/spu/headers/simdmath.h: Ditto.
	* libm/machine/spu/headers/sin.h: Ditto.
	* libm/machine/spu/headers/sincos.h: Ditto.
	* libm/machine/spu/headers/sincosd2.h: Ditto.
	* libm/machine/spu/headers/sincosf.h: Ditto.
	* libm/machine/spu/headers/sincosf4.h: Ditto.
	* libm/machine/spu/headers/sind2.h: Ditto.
	* libm/machine/spu/headers/sinf.h: Ditto.
	* libm/machine/spu/headers/sinf4.h: Ditto.
	* libm/machine/spu/headers/sinh.h: Ditto.
	* libm/machine/spu/headers/sinhd2.h: Ditto.
	* libm/machine/spu/headers/sinhf.h: Ditto.
	* libm/machine/spu/headers/sinhf4.h: Ditto.
	* libm/machine/spu/headers/sqrtd2.h: Ditto.
	* libm/machine/spu/headers/sqrtf.h: Ditto.
	* libm/machine/spu/headers/sqrtf4.h: Ditto.
	* libm/machine/spu/headers/tan.h: Ditto.
	* libm/machine/spu/headers/tand2.h: Ditto.
	* libm/machine/spu/headers/tanf.h: Ditto.
	* libm/machine/spu/headers/tanf4.h: Ditto.
	* libm/machine/spu/headers/tanh.h: Ditto.
	* libm/machine/spu/headers/tanhd2.h: Ditto.
	* libm/machine/spu/headers/tanhf.h: Ditto.
	* libm/machine/spu/headers/tanhf4.h: Ditto.
	* libm/machine/spu/headers/tgamma.h: Ditto.
	* libm/machine/spu/headers/tgammad2.h: Ditto.
	* libm/machine/spu/headers/tgammaf.h: Ditto.
	* libm/machine/spu/headers/tgammaf4.h: Ditto.
	* libm/machine/spu/headers/truncd2.h: Ditto.
	* libm/machine/spu/headers/truncf4.h: Ditto.
	* libm/machine/spu/log2.c: Ditto.
	* libm/machine/spu/s_asinh.c: Ditto.
	* libm/machine/spu/s_atan.c: Ditto.
	* libm/machine/spu/s_cos.c: Ditto.
	* libm/machine/spu/s_erf.c: Ditto.
	* libm/machine/spu/s_expm1.c: Ditto.
	* libm/machine/spu/s_isnan.c: Ditto.
	* libm/machine/spu/s_log1p.c: Ditto.
	* libm/machine/spu/s_nextafter.c: Ditto.
	* libm/machine/spu/s_sin.c: Ditto.
	* libm/machine/spu/s_tan.c: Ditto.
	* libm/machine/spu/s_tanh.c: Ditto.
	* libm/machine/spu/sf_asinh.c: Ditto.
	* libm/machine/spu/sf_cos.c: Ditto.
	* libm/machine/spu/sf_erf.c: Ditto.
	* libm/machine/spu/sf_expm1.c: Ditto.
	* libm/machine/spu/sf_log1p.c: Ditto.
	* libm/machine/spu/sf_logb.c: Ditto.
	* libm/machine/spu/sf_nearbyint.c: Ditto.
	* libm/machine/spu/sf_nextafter.c: Ditto.
	* libm/machine/spu/sf_rint.c: Ditto.
	* libm/machine/spu/sf_sin.c: Ditto.
	* libm/machine/spu/sf_tan.c: Ditto.
	* libm/machine/spu/sf_tanh.c: Ditto.
	* libm/machine/spu/w_acos.c: Ditto.
	* libm/machine/spu/w_acosh.c: Ditto.
	* libm/machine/spu/w_asin.c: Ditto.
	* libm/machine/spu/w_atan2.c: Ditto.
	* libm/machine/spu/w_atanh.c: Ditto.
	* libm/machine/spu/w_cosh.c: Ditto.
	* libm/machine/spu/w_exp.c: Ditto.
	* libm/machine/spu/w_exp2.c: Ditto.
	* libm/machine/spu/w_hypot.c: Ditto.
	* libm/machine/spu/w_lgamma.c: Ditto.
	* libm/machine/spu/w_log.c: Ditto.
	* libm/machine/spu/w_log10.c: Ditto.
	* libm/machine/spu/w_pow.c: Ditto.
	* libm/machine/spu/w_sincos.c: Ditto.
	* libm/machine/spu/w_sinh.c: Ditto.
	* libm/machine/spu/w_tgamma.c: Ditto.
	* libm/machine/spu/wf_acos.c: Ditto.
	* libm/machine/spu/wf_acosh.c: Ditto.
	* libm/machine/spu/wf_asin.c: Ditto.
	* libm/machine/spu/wf_atan2.c: Ditto.
	* libm/machine/spu/wf_atanh.c: Ditto.
	* libm/machine/spu/wf_cosh.c: Ditto.
	* libm/machine/spu/wf_hypot.c: Ditto.
	* libm/machine/spu/wf_lgamma.c: Ditto.
	* libm/machine/spu/wf_pow.c: Ditto.
	* libm/machine/spu/wf_sincos.c: Ditto.
	* libm/machine/spu/wf_sinh.c: Ditto.
	* libm/machine/spu/wf_sqrt.c: Ditto.
	* libm/machine/spu/wf_tgamma.c: Ditto.
2007-09-28 18:44:24 +00:00
Jeff Johnston 505ea71432 2007-09-28 Patrick Mansfield <patmans@us.ibm.com>
* configure.host: Define _POSIX_MODE to match the existing vector
	math code, as we don't support the matherr callout.
	* libm/machine/spu/Makefile.am: New file.
	* libm/machine/spu/Makefile.in: Auto-generated.
	* libm/machine/spu/headers/atanf.h: New file.
	* libm/machine/spu/headers/cbrt.h: Ditto.
	* libm/machine/spu/headers/cbrtf.h: Ditto.
	* libm/machine/spu/headers/ceil.h: Ditto.
	* libm/machine/spu/headers/ceilf.h: Ditto.
	* libm/machine/spu/headers/copysign.h: Ditto.
	* libm/machine/spu/headers/copysignf.h: Ditto.
	* libm/machine/spu/headers/exp2f.h: Ditto.
	* libm/machine/spu/headers/expf.h: Ditto.
	* libm/machine/spu/headers/fabs.h: Ditto.
	* libm/machine/spu/headers/fabsf.h: Ditto.
	* libm/machine/spu/headers/fdim.h: Ditto.
	* libm/machine/spu/headers/fdimf.h: Ditto.
	* libm/machine/spu/headers/floor.h: Ditto.
	* libm/machine/spu/headers/floorf.h: Ditto.
	* libm/machine/spu/headers/fma.h: Ditto.
	* libm/machine/spu/headers/fmaf.h: Ditto.
	* libm/machine/spu/headers/fmax.h: Ditto.
	* libm/machine/spu/headers/fmaxf.h: Ditto.
	* libm/machine/spu/headers/fmin.h: Ditto.
	* libm/machine/spu/headers/fminf.h: Ditto.
	* libm/machine/spu/headers/fmod.h: Ditto.
	* libm/machine/spu/headers/fmodf.h: Ditto.
	* libm/machine/spu/headers/frexp.h: Ditto.
	* libm/machine/spu/headers/frexpf.h: Ditto.
	* libm/machine/spu/headers/ilogb.h: Ditto.
	* libm/machine/spu/headers/ilogbf.h: Ditto.
	* libm/machine/spu/headers/ldexp.h: Ditto.
	* libm/machine/spu/headers/ldexpf.h: Ditto.
	* libm/machine/spu/headers/llrint.h: Ditto.
	* libm/machine/spu/headers/llrintf.h: Ditto.
	* libm/machine/spu/headers/llround.h: Ditto.
	* libm/machine/spu/headers/llroundf.h: Ditto.
	* libm/machine/spu/headers/log10f.h: Ditto.
	* libm/machine/spu/headers/log2f.h: Ditto.
	* libm/machine/spu/headers/logf.h: Ditto.
	* libm/machine/spu/headers/lrint.h: Ditto.
	* libm/machine/spu/headers/lrintf.h: Ditto.
	* libm/machine/spu/headers/lround.h: Ditto.
	* libm/machine/spu/headers/lroundf.h: Ditto.
	* libm/machine/spu/headers/nearbyint.h: Ditto.
	* libm/machine/spu/headers/remainder.h: Ditto.
	* libm/machine/spu/headers/remainderf.h: Ditto.
	* libm/machine/spu/headers/remquo.h: Ditto.
	* libm/machine/spu/headers/remquof.h: Ditto.
	* libm/machine/spu/headers/rint.h: Ditto.
	* libm/machine/spu/headers/round.h: Ditto.
	* libm/machine/spu/headers/roundf.h: Ditto.
	* libm/machine/spu/headers/scalbn.h: Ditto.
	* libm/machine/spu/headers/scalbnf.h: Ditto.
	* libm/machine/spu/headers/sqrt.h: Ditto.
	* libm/machine/spu/headers/trunc.h: Ditto.
	* libm/machine/spu/headers/truncf.h: Ditto.
	* libm/machine/spu/headers/vec_literal.h: Ditto.
	* libm/machine/spu/llrint.c: Ditto.
	* libm/machine/spu/llrintf.c: Ditto.
	* libm/machine/spu/llround.c: Ditto.
	* libm/machine/spu/llroundf.c: Ditto.
	* libm/machine/spu/log2f.c: Ditto.
	* libm/machine/spu/s_cbrt.c: Ditto.
	* libm/machine/spu/s_ceil.c: Ditto.
	* libm/machine/spu/s_copysign.c: Ditto.
	* libm/machine/spu/s_fabs.c: Ditto.
	* libm/machine/spu/s_fdim.c: Ditto.
	* libm/machine/spu/s_floor.c: Ditto.
	* libm/machine/spu/s_fma.c: Ditto.
	* libm/machine/spu/s_fmax.c: Ditto.
	* libm/machine/spu/s_fmin.c: Ditto.
	* libm/machine/spu/s_frexp.c: Ditto.
	* libm/machine/spu/s_ilogb.c: Ditto.
	* libm/machine/spu/s_ldexp.c: Ditto.
	* libm/machine/spu/s_lrint.c: Ditto.
	* libm/machine/spu/s_lround.c: Ditto.
	* libm/machine/spu/s_nearbyint.c: Ditto.
	* libm/machine/spu/s_remquo.c: Ditto.
	* libm/machine/spu/s_rint.c: Ditto.
	* libm/machine/spu/s_round.c: Ditto.
	* libm/machine/spu/s_scalbn.c: Ditto.
	* libm/machine/spu/s_trunc.c: Ditto.
	* libm/machine/spu/sf_atan.c: Ditto.
	* libm/machine/spu/sf_cbrt.c: Ditto.
	* libm/machine/spu/sf_ceil.c: Ditto.
	* libm/machine/spu/sf_copysign.c: Ditto.
	* libm/machine/spu/sf_fabs.c: Ditto.
	* libm/machine/spu/sf_fdim.c: Ditto.
	* libm/machine/spu/sf_floor.c: Ditto.
	* libm/machine/spu/sf_fma.c: Ditto.
	* libm/machine/spu/sf_fmax.c: Ditto.
	* libm/machine/spu/sf_fmin.c: Ditto.
	* libm/machine/spu/sf_frexp.c: Ditto.
	* libm/machine/spu/sf_ilogb.c: Ditto.
	* libm/machine/spu/sf_ldexp.c: Ditto.
	* libm/machine/spu/sf_lrint.c: Ditto.
	* libm/machine/spu/sf_lround.c: Ditto.
	* libm/machine/spu/sf_remquo.c: Ditto.
	* libm/machine/spu/sf_round.c: Ditto.
	* libm/machine/spu/sf_scalbn.c: Ditto.
	* libm/machine/spu/sf_trunc.c: Ditto.
	* libm/machine/spu/w_fmod.c: Ditto.
	* libm/machine/spu/w_remainder.c: Ditto.
	* libm/machine/spu/w_sqrt.c: Ditto.
	* libm/machine/spu/wf_exp.c: Ditto.
	* libm/machine/spu/wf_exp2.c: Ditto.
	* libm/machine/spu/wf_fmod.c: Ditto.
	* libm/machine/spu/wf_log.c: Ditto.
	* libm/machine/spu/wf_log10.c: Ditto.
	* libm/machine/spu/wf_remainder.c: Ditto.
2007-09-28 18:32:57 +00:00
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 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
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
Jeff Johnston 4a9880e071 2007-05-23 Patrick Mansfield <patmans@us.ibm.com>
* 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.
2007-05-23 21:41:17 +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
Corinna Vinschen d48670ed78 * libc/argz/argz_create_sep.c (argz_create_sep): Initialize *argz_len
to zero.
	* libc/include/argz.h: Guard against multiple inclusion.  Guard for
	use with C++.
2007-05-23 16:36:23 +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
Jeff Johnston b2250c70bd 2007-05-17 Cary R. <cygcary <at> yahoo.com>
* 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 21:52:11 +00:00
Jeff Johnston e0500490bc 2007-05-17 Yaakov Selkowitz <yselkowitz <at> users.sourceforge.net>
* 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.
2007-05-17 18:50:57 +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 895d76fed6 * libc/include/math.h (INFINITY, NAN, FP_ILOGB0, FP_ILOGBNAN)
(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>.
2007-05-16 19:59:40 +00:00
Eric Blake f65607751c * libc/stdlib/wctomb_r.c (_wctomb_r): Avoid gcc warnings on cygwin.
* libc/search/hash.c (__hash_open): Likewise.
2007-05-16 19:31: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
Kazu Hirata fb3937fade * 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: Use sub.l followed by dbra.
	* libc/machine/m68k/memset.S: Likewise.
2007-05-03 19:45:26 +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 2babeb3d94 2007-05-01 Cary R. <cygcary <at> yahoo.com>
* 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-05-01 18:42:15 +00:00
Jeff Johnston 643aff874d 2007-04-27 Jeff Johnston <jjohnstn@redhat.com>
* 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 22:10:47 +00:00
Jeff Johnston 9e5957de57 2007-04-27 Kazu Hirata <kazu@codesourcery.com>
* 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-27 16:05:35 +00:00
Jeff Johnston 976e9d281b 2007-04-26 Patrick Mansfield <patmans@us.ibm.com>
* 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-26 19:23:37 +00:00
Jeff Johnston 34450bd565 2007-04-25 Jeff Johnston <jjohnstn@redhat.com>
* 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 22:28:19 +00:00
Jeff Johnston 42cd3e6c52 2007-04-25 Patrick Mansfield <patmans@us.ibm.com>
* 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 20:45:39 +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
Jeff Johnston 245240b5e9 2007-04-25 Patrick Mansfield <patmans@us.ibm.com>
* feholdexcept.h: Use *envp not env so we clear the proper bits in
        the fpscr, and don't set some random ones.
2007-04-25 17:36:32 +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 8aebc414ec 2007-04-23 Jeff Johnston <jjohnstn@redhat.com>
* 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-23 19:46:08 +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
Eric Blake 503e2d1c76 * libc/include/stdio.h (_ELIDABLE_INLINE): Work even when using
CFLAGS=-O0.
2007-04-10 12:49:18 +00:00
Eric Blake 17c0c97d7c * libc/include/stdio.h: Add gcc format attributes to printf and
scanf families.
2007-04-10 12:47:13 +00:00
Jeff Johnston abe43f4262 2007-04-09 Joel Schopp <jschopp@austin.ibm.com>
* libc/machine/spu/strxfrm.c: Fix strxfrm so we still copy data
        even if the passed in length n is shorter than the source string.
        This matches both the non-spu specific and the glibc strxfrm
        behaviour.
2007-04-09 16:03:26 +00:00
Kazu Hirata 07278e6cc7 * testsuite/lib/flags.exp (newlib_include_flags): Drop
-I${newlib_dir}.
2007-04-05 16:53:17 +00:00
Kazu Hirata 0efa93c061 * libc/stdlib/__call_atexit.c (__call_exitprocs): Handle atexit
functions registering additional atexit functions.
2007-04-05 16:47:38 +00:00
Jeff Johnston 748c191767 2007-04-04 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/sys/syscall.h: New file for __send_to_ppe
	prototype.
	* libc/machine/spu/c99ppe.h: Remove static version of send_to_ppe.
	* libc/machine/spu/clearerr.c: Call __send_to_ppe vs send_to_ppe.
	* libc/machine/spu/fclose.c: Ditto.
	* 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/perror.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/rewind.c: Ditto.
	* libc/machine/spu/scanf.c: Ditto.
	* libc/machine/spu/setbuf.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.
2007-04-04 21:03:13 +00:00
Jeff Johnston a706aa2e1c 2007-04-04 Jeff Johnston <jjohnstn@redhat.com>
* libc/argz/argz_insert.c: Add stddef.h to get ptrdiff_t type.
2007-04-04 20:49:07 +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
Dave Korn 2c58b5a5e8 2007-03-30 Dave Korn <dave.korn@artimi.com>
* libc/include/stdio.h (_ELIDABLE_INLINE):  New macro to conceal
	conflicting inline semantics between C99 and GNU89.
	(__sgetc_r):  Replace static inline with _ELIDABLE_INLINE to be
	compatible with -fkeep-inline-functions usage.
	(__sputc_r):  Likewise for consistency even though disabled.
2007-03-30 00:49:56 +00:00
Nick Clifton 519aec5d59 Reflect changes made to generic vfprintf.c:
* libc/machine/powerpc/vfprintf.c (__sprint): Rename to __sprint_r and add a "struct reent *" argument.
  (__sbprintf): Rename to __sbprintf_r, add a "struct reent *" argument and call _VFPRINTF_R instead of VFPRINTF.
  (_VFPRINTF_R): Add data pointer to call to cantwrite().  Fix uses of __sprint() and __sbprintf.
2007-03-29 06:25:44 +00:00
Jeff Johnston 443871a60b 2007-03-16 Charles Wilson <cygwin@...>
* libc/argz/argz_insert.c: "before" pointer is
        invalid after *argz realloc.  Compute offset
        between "before" and *argz, and use it after
        reallocation instead.
2007-03-16 21:16:09 +00:00
Jeff Johnston a167bcd8e5 2007-03-16 Eric Blake <ebb9@byu.net>
* libc/stdio64/fseek064.c (_fseeko64_r): Fix reentrancy.
        * libc/stdio64/freopen64.c (_freopen64_r): Ditto.
2007-03-16 20:05:10 +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 d9edc05f47 2007-02-23 Jeff Johnston <jjohnstn@redhat.com>
* libm/math/w_pow.c: Fix typo in documentation comment.
2007-02-23 18:29:31 +00:00
Jeff Johnston 59673dbb2a 2007-02-21 Patrick Mansfield <patmans@us.ibm.com>
* libc/reent/timer.c: Removed (split into two new files).
        * libc/reent/timesr.c: New file for _times_r.
        * libc/reent/gettimeofdayr.c: New file out _gettimeofday_r.
        * reent/Makefile.in: Remove timer.c, add timesr.c and
        gettimeofdayr.c.
        * libc/reent/Makefile.am: Regenerate.
2007-02-21 19:22:33 +00:00
Jeff Johnston 547c5c6104 2007-02-20 Patrick Mansfield <patmans@us.ibm.com>
* configure.host: Build SPU with default_newlib_atexit_dynamic_alloc="no".
2007-02-20 21:02:36 +00:00
Jeff Johnston 3b7e017ec4 2007-02-20 Kazunori Asayama <asayama@sm.sony.co.jp>
* libc/machine/spu/Makefile.am: Add new objects.
        * libc/machine/spu/Makefile.in: Regenerated.
        * libc/machine/spu/fiprintf.c: New file. Add implementation of
        integer-only version.
        * libc/machine/spu/fiscanf.c: Ditto.
        * libc/machine/spu/iprintf.c: Ditto.
        * libc/machine/spu/iscanf.c: Ditto.
        * libc/machine/spu/siprintf.c: Ditto.
        * libc/machine/spu/siscanf.c: Ditto.
        * libc/machine/spu/sniprintf.c: Ditto.
        * libc/machine/spu/vfiprintf.c: Ditto.
        * libc/machine/spu/vfiscanf.c: Ditto.
        * libc/machine/spu/viprintf.c: Ditto.
        * libc/machine/spu/viscanf.c: Ditto.
        * libc/machine/spu/vsiprintf.c: Ditto.
        * libc/machine/spu/vsiscanf.c: Ditto.
        * libc/machine/spu/vsniprintf.c: Ditto.
        * libc/machine/spu/fprintf.c: Add support for integer-only
        version.
        * libc/machine/spu/fscanf.c: Ditto.
        * libc/machine/spu/printf.c: Ditto.
        * libc/machine/spu/scanf.c: Ditto.
        * libc/machine/spu/snprintf.c: Ditto.
        * libc/machine/spu/sprintf.c: Ditto.
        * libc/machine/spu/sscanf.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.
2007-02-20 20:58:38 +00:00
Jeff Johnston 960e5d8f19 2007-02-20 Kazunori Asayama <asayama@sm.sony.co.jp>
* libc/include/stdio.h: Add declaration for vsiprintf.
2007-02-20 20:53:35 +00:00
Jeff Johnston 958e329d59 2007-02-14 Patrick Mansfield <patmans@us.ibm.com>
Add a floating point environment for SPU (cell):

        * configure.host: add libm_machine_dir=spu.
        * libm/machine/configure: Add spu.
        * libm/machine/configure.in: regenerated with spu added.
        * libc/machine/spu/include/fenv.h: New file.
        * libc/machine/spu/sys/fenv.h: Ditto.
        * libm/machine/spu/Makefile.am: Ditto.
        * libm/machine/spu/Makefile.in: Ditto.
        * libm/machine/spu/aclocal.m4: Ditto.
        * libm/machine/spu/configure: Ditto.
        * libm/machine/spu/configure.in: Ditto.
        * libm/machine/spu/fe_dfl_env.c: Ditto.
        * libm/machine/spu/feclearexcept.c: Ditto.
        * libm/machine/spu/fegetenv.c: Ditto.
        * libm/machine/spu/fegetexceptflag.c: Ditto.
        * libm/machine/spu/fegetround.c: Ditto.
        * libm/machine/spu/feholdexcept.c: Ditto.
        * libm/machine/spu/feraiseexcept.c: Ditto.
        * libm/machine/spu/fesetenv.c: Ditto.
        * libm/machine/spu/fesetexceptflag.c: Ditto.
        * libm/machine/spu/fesetround.c: Ditto.
        * libm/machine/spu/fetestexcept.c: Ditto.
        * libm/machine/spu/feupdateenv.c: Ditto.
        * libm/machine/spu/headers/feclearexcept.h: Ditto.
        * libm/machine/spu/headers/fefpscr.h: Ditto.
        * libm/machine/spu/headers/fegetenv.h: Ditto.
        * libm/machine/spu/headers/fegetexceptflag.h: Ditto.
        * libm/machine/spu/headers/fegetround.h: Ditto.
        * libm/machine/spu/headers/feholdexcept.h: Ditto.
        * libm/machine/spu/headers/feraiseexcept.h: Ditto.
        * libm/machine/spu/headers/fesetenv.h: Ditto.
        * libm/machine/spu/headers/fesetexceptflag.h: Ditto.
        * libm/machine/spu/headers/fesetround.h: Ditto.
        * libm/machine/spu/headers/fetestexcept.h: Ditto.
        * libm/machine/spu/headers/feupdateenv.h: Ditto.
2007-02-14 23:18:25 +00:00
Corinna Vinschen 4f7e59f268 * libc/include/sys/features.h: Add _POSIX_MESSAGE_PASSING for
Cygwin.
2007-02-14 10:07:02 +00:00
Corinna Vinschen d7e4c7a807 * libc/include/sys/features.h: Add _POSIX_SHARED_MEMORY_OBJECTS for
Cygwin.  Fix value of _POSIX_SEMAPHORES.  Fix formatting.
2007-02-08 13:34:20 +00:00
Corinna Vinschen 0e37a2e6e5 * libc/include/sys/features.h: Add definition of all supported
_POSIX_xxx values for Cygwin.
	* libc/include/sys/types.h (pthread_rwlock_t): Omit definition
	on Cygwin.
	(pthread_rwlockattr_t): Ditto.
	* libc/include/sys/unistd.h: Define all _SC_xxx values as
	required by SUSv3.  Unify formatting.
2007-02-07 17:19:35 +00:00
Jeff Johnston 6699fabb91 2007-02-02 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/include/sys/errno.h: Add ECANCELED.
2007-02-02 16:22:28 +00:00
Jeff Johnston 22a339e8f2 2007-02-01 Joel Schopp <jschopp@austin.ibm.com>
Kazunori Asayama <asayama@sm.sony.co.jp>

        * libc/machine/spu/Makefile.am: Add objects.
        * libc/machine/spu/Makefile.in: Regenerated.
        * libc/machine/spu/vsscanf.c: New file. Add a stdio function
        implementation.
        * libc/machine/spu/snprintf.c: Ditto.
        * libc/machine/spu/sprintf.c: Ditto.
        * libc/machine/spu/sscanf.c: Ditto.
        * libc/machine/spu/remove.c: Ditto.
        * libc/machine/spu/rename.c: Ditto.
        * libc/machine/spu/tmpnam.c: Ditto.
        * libc/machine/spu/vsnprintf.c: Add initialization routine of
        stdio stuffs.
        * libc/machine/spu/vsprintf.c: Ditto.
2007-02-01 16:43:45 +00:00
Jeff Johnston 7d592bb178 2007-02-01 Joel Schopp <jschopp@austin.ibm.com>
Kazunori Asayama <asayama@sm.sony.co.jp>

        * configure.host: Enable SPU specific stdio directory.
        * libc/machine/spu/Makefile.am: Add objects.
        * libc/machine/spu/Makefile.in: Regenerated.
        * libc/machine/spu/c99ppe.h: Add macros and function
        declarations to initialize SPU specific stdio stuffs.
        * libc/machine/spu/stdio.c: Add functions to manage Cell SPU
        specific FILE structures.
        * libc/machine/spu/perror.c: Add initialization routine of
        stdio stuffs.
        * libc/machine/spu/printf.c: Ditto.
        * libc/machine/spu/putchar.c: Ditto.
        * libc/machine/spu/puts.c: Ditto.
        * libc/machine/spu/vprintf.c: Ditto.
        * libc/machine/spu/clearerr.c: New file. Add a stdio function
        implementation.
        * libc/machine/spu/feof.c: Ditto.
        * libc/machine/spu/ferror.c: Ditto.
        * libc/machine/spu/fileno.c: Ditto.
        * libc/machine/spu/fopen.c: Ditto.
        * libc/machine/spu/fclose.c: Ditto.
        * libc/machine/spu/freopen.c: Ditto.
        * libc/machine/spu/fflush.c: Ditto.
        * libc/machine/spu/fseek.c: Ditto.
        * libc/machine/spu/ftell.c: Ditto.
        * libc/machine/spu/rewind.c: Ditto.
        * libc/machine/spu/fgetpos.c: Ditto.
        * libc/machine/spu/fsetpos.c: Ditto.
        * libc/machine/spu/fread.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/fgetc.c: Ditto.
        * libc/machine/spu/fgets.c: Ditto.
        * libc/machine/spu/ungetc.c: Ditto.
        * libc/machine/spu/putc.c: Ditto.
        * libc/machine/spu/fputc.c: Ditto.
        * libc/machine/spu/fputs.c: Ditto.
        * libc/machine/spu/vfprintf.c: Ditto.
        * libc/machine/spu/vfscanf.c: Ditto.
        * libc/machine/spu/fprintf.c: Ditto.
        * libc/machine/spu/fscanf.c: Ditto.
        * libc/machine/spu/scanf.c: Ditto.
        * libc/machine/spu/vscanf.c: Ditto.
        * libc/machine/spu/setbuf.c: Ditto.
        * libc/machine/spu/setvbuf.c: Ditto.
        * libc/machine/spu/tmpfile.c: Ditto.

2007-02-01  Jeff Johnston  <jjohnstn@redhat.com>

        * libc/include/sys/config.h[__SPU__]: Define __CUSTOM_FILE_IO__.
        * libc/include/stdio.h[!__CUSTOM_FILE_IO__]: Add flag check
        around stdio macros that manipulate fields in the normal file
        structure.
        * libc/include/sys/reent.h[__CUSTOM_FILE_IO__]: Include
        <sys/custom_file.h> to define custom FILE structure.
        * libc/include/sys/custom_file.h: New default header file
        that generates error if not overridden when __CUSTOM_FILE_IO__ set.
        * libc/machine/spu/sys/custom_file.h: New file.
2007-02-01 16:33:05 +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
Ben Elliston c7cd784974 * libc/machine/spu/vsnprintf.c (c99_vsnprintf_t): Const-qualify
fmt member.
	* libc/machine/spu/printf.c (c99_printf_t): Likewise.
	(printf): Pass fmt to va_start to suppress a warning.
2007-01-30 03:18:52 +00:00
Ben Elliston cb7ba0e119 * libc/search/hash.c (init_hash): Make `info' parameter const. 2007-01-30 03:13:29 +00:00
Jeff Johnston f89533c1ff 2007-01-19 Kazunori Asayama <asayama@sm.sony.co.jp>
* libc/machine/spu/c99ppe.h: Replace vector with __vector.
        * libc/machine/spu/vec_literal.h: Ditto.
        * libc/machine/spu/strncmp.c: Ditto.
2007-01-19 23:53:07 +00:00
Jeff Johnston 94b91791ea 2007-01-15 Joseph Myers <joseph@codesourcery.com>
Kazu Hirata  <kazu@codesourcery.com>

        * libc/machine/powerpc/setjmp.S (setjmp, longjmp): Add support
        for E500V1 and E500V2.
2007-01-15 16:41:08 +00:00
Jeff Johnston 26190be144 2007-01-11 Jeff Johnston <jjohnstn@redhat.com>
* libm/configure.in: Always configure machine directory.
        * libm/Makefile.am: Make machine subdirectory part of SUBDIRS
        unconditionally.
        * libm/configure: Regenerated.
        * libm/Makefile.in: Ditto.
        * libm/*/Makefile.in: Ditto.
2007-01-11 20:57:52 +00:00
Jeff Johnston 8e0e8f40fb 2007-01-05 Brian Ford <Brian.Ford@FlightSafety.com>
* configure.host (*-*-cygwin*): Define HAVE_BLKSIZE.
2007-01-08 19:01:23 +00:00
Jeff Johnston 9cd4a2de61 2007-01-02 Ben Elliston <bje@au.ibm.com>
* doc/makedoc.c: Include <stdlib.h>.
        (malloc, realloc): Remove extern declarations.
2007-01-02 16:59:59 +00:00
Jeff Johnston a4b117829f 2005-12-18 Jeff Johnston <jjohnstn@redhat.com>
* NEWS: Update with 1.15.0 info.
        * README: Ditto.
        * acinclude.m4: Change version number to 1.15.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.15.
2006-12-18 22:21:56 +00:00
Jeff Johnston def943c11c 2006-12-18 Kazu Hirata <kazu@codesourcery.com>
Merge from newlib-csl-20060320-branch:
        2006-12-01  Nathan Sidwell  <nathan@codesourcery.com>
                    Kazu Hirata  <kazu@codesourcery.com>

        * configure.host: Recognize fido.
2006-12-18 21:49:14 +00:00
Jeff Johnston 505ccc75c4 2006-12-18 Joel Schopp <jschopp@austin.ibm.com>
* libc/machine/spu/c99ppe.h: New file
        * libc/machine/spu/perror.c: New file to override libc/stdio version.
        * libc/machine/spu/printf.c: New file
        * libc/machine/spu/putchar.c: New file
        * libc/machine/spu/puts.c: New file
        * libc/machine/spu/vprintf.c: New file
        * libc/machine/spu/vsnprintf.c: New file
        * libc/machine/spu/vsprintf.c: New file
        * libc/machine/spu/Makefile.am: Add new targets.
        * libc/machine/spu/Makefile.in: Regenerated.
2006-12-18 20:39:02 +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 db029fca63 Remove entry for next patch that hasn't happened yet. 2006-12-18 20:24:48 +00:00
Jeff Johnston f522256075 2006-12-18 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/mallocr.c (malloc_extend_top): Add patch from
        2.6.5 version of Doug Lea's malloc which is the basis of
        this code.
2006-12-18 20:21:48 +00:00
Jeff Johnston 9b354d7f3b 2006-12-18 Kazunori Asayama <asayama@sm.sony.co.jp>
* libc/include/machine/setjmp.h: Replace vector with __vector.
2006-12-18 16:48:03 +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 6a20095878 2006-12-13 Joel Schopp <jschopp@austin.ibm.com>
* libc/machine/spu/setjmp.S: Fix to handle registers past 115
        correctly.
2006-12-13 23:06:02 +00:00
Jeff Johnston dd52bb72fb 2006-12-13 Joel Schopp <jschopp@austin.ibm.com>
* newlib/include/alloca.h: add undef alloca to work with xlc
2006-12-13 23:01:21 +00:00
Jeff Johnston 4e051d914a 2006-12-12 Joel Schopp <jschopp@austin.ibm.com>
* libc/include/machine/setjmp.h[__SPU__]: Redefine _JBTYPE for
        cell spu
2006-12-13 19:36:17 +00:00
Jeff Johnston 489bb390ce 2006-12-04 Kazunori Asayama <asayama@sm.sony.co.jp>
* libc/machine/spu/strncpy.c: Add padding.
2006-12-04 17:29:10 +00:00
Jeff Johnston 3e2d7a911f 2006-12-04 Kazunori Asayama <asayama@sm.sony.co.jp>
* testsuite/newlib.string/tstring.c:
2006-12-04 17:25:13 +00:00
Jeff Johnston 0a2ef99804 2006-12-01 Kazunori Asayama <asayama@sm.sony.co.jp>
* libc/machine/spu/strchr.c: Fix mask for misaligned string.
        * libc/machine/spu/strrchr.c: Ditto.
2006-12-01 17:18:36 +00:00
Jeff Johnston 75190a8fa2 2006-11-30 Lev Bishop <lev.bishop@gmail.com>
* libc/include/math.h: Allow C99 functions/macros to be
        defined for C++ even when __STRICT_ANSI__.
2006-11-30 23:40: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 80c6ead242 2006-11-29 Kazunori Asayama <asayama@sm.sony.co.jp>
* libc/machine/spu/memset.c: Fix type of explicit cast.
        * libc/machine/spu/strncmp.c: Add explicit cast.
        * libc/machine/spu/strrchr.c: Ditto.
        * libc/machine/spu/strspn.c: Ditto.
2006-11-29 19:54:05 +00:00
Jeff Johnston 9bc5b6181b 2006-11-22 Luca Barbato <lu_zero@gentoo.org>
* libc/machine/spu/memcpy.c: Use spu_splats, explicit cast.
        * libc/machine/spu/memmove.c: Use spu_splats, explicit cast.
        * libc/machine/spu/memset.c: Use spu_splats, remove apple-cast.
        * libc/machine/spu/strchr.c: Use spu_splats, remove apple-cast.
        * libc/machine/spu/strncat.c: Explicit cast.
        * libc/machine/spu/strncmp.c: Use spu_splats.
        * libc/machine/spu/strncpy.c: Explicit cast.
        * libc/machine/spu/strrchr.c: Use spu_splats.
        * libc/machine/spu/strspn.c: Use spu_splats.
2006-11-22 21:19:56 +00:00
Jeff Johnston 52077eb28c 2006-11-15 Till Straumann <strauman@slac.stanford.edu>
* libc/time/tzset_r.c (_tzset_r): Initialize local variable.
2006-11-15 20:10:25 +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 9842c7e4e8 Change Jie Zhang's e-mail address to work e-mail. 2006-11-09 16:24:06 +00:00
Jeff Johnston 292f8e2328 2006-11-08 Jie Zhang <jzhang918@gmail.com>
* configure.host: Add support for bfin.
        * libc/include/machine/ieeefp.h: Define __IEEE_LITTLE_ENDIAN for bfin.
        * libc/include/machine/setjmp.h: Define _JBLEN for bfin.
        * libc/machine/bfin/aclocal.m4: Generate.
        * libc/machine/bfin/configure.in: New.
        * libc/machine/bfin/configure: Generate.
        * libc/machine/bfin/Makefile.am: New.
        * libc/machine/bfin/Makefile.in: Generate.
        * libc/machine/bfin/setjmp.S: New.
        * libc/machine/bfin/longjmp.S: New.
        * libc/machine/configure.in: Add bfin support.
        * libc/machine/configure: Generate.
2006-11-08 19:26:43 +00:00
Corinna Vinschen b1755fe736 * libc/include/sys/unistd.h (_SC_STREAM_MAX): Define on Cygwin.
(_PC_FILESIZEBITS): Add definition.
	(_PC_2_SYMLINKS): Ditto.
	(_PC_SYMLINK_MAX): Ditto.
2006-11-07 15:33:40 +00:00
Jeff Johnston d384d86834 2006-10-27 Joel Schopp <jschopp@austin.ibm.com>
* libc/machine/spu/memcpy.c: Override generic function with vectorized
        version optimized for the cell spu.
        * libc/machine/spu/memmove.c: Ditto.
        * libc/machine/spu/memset.c: Ditto.
        * libc/machine/spu/strcat.c: Ditto.
        * libc/machine/spu/strchr.c: Ditto.
        * libc/machine/spu/strcmp.c: Ditto.
        * libc/machine/spu/strcpy.c: Ditto.
        * libc/machine/spu/strcspn.c: Ditto.
        * libc/machine/spu/strlen.c: Ditto.
        * libc/machine/spu/strncat.c: Ditto.
        * libc/machine/spu/strncmp.c: Ditto.
        * libc/machine/spu/strncpy.c: Ditto.
        * libc/machine/spu/strpbrk.c: Ditto.
        * libc/machine/spu/strrchr.c: Ditto.
        * libc/machine/spu/strspn.c: Ditto.
        * libc/machine/spu/strxfrm.c: Ditto.
        * libc/machine/spu/vec_literal.h: Add abstraction of vector literals,
        removing altivec style initializers.
        * libc/machine/spu/Makefile.am: Add new files to list so they build
        * libc/machine/spu/Makefile.in: Regenerate from new Makefile.am
2006-10-27 23:02:00 +00:00
Jeff Johnston f29fdb2f9d 2006-10-27 Jeff Johnston <jjohnstn@redhat.com>
* README: Add a brief section on how to regenerate
        configuration files in newlib.
2006-10-27 19:22:57 +00:00
Jeff Johnston 884dc68fe0 2006-10-25 Vladimir Prus <vladimir@codesourcery.com>
* libc/include/math.h: (exception): Add a comment
        telling fixincludes that we handle C vs. C++ issue.
2006-10-25 18:46:40 +00:00
Corinna Vinschen 6d44157687 * Fix ChangeLog entry to mention full path of changed file. 2006-10-19 08:36:02 +00:00
Jeff Johnston f8fe93f9b8 2006-10-11 Yang Tse <yangsita@gmail.com>
* setjmp.h: Use __extension__ keyword for gcc's braced-groups.
2006-10-11 19:20:31 +00:00
Corinna Vinschen d95c57921f * libc/reent/reeent.c (_reclaim_reent): Free _REENT_MP_RESULT. 2006-10-11 08:04:50 +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 e83c3d0ae5 2006-09-22 Paul Brook <paul@codesourcery.com>
* libc/include/sys/reent.h: Define and use __reent_assert.
2006-09-22 19:33:11 +00:00
Jeff Johnston 23754b33c3 2006-09-13 Joel Sherrill <joel@oarcorp.com>
* libc/include/pthread.h: Add pthread barriers,
        rwlocks, and spinlocks.  Change const to
        _CONST and prefix parameter names with
        an underscore.
        * libc/include/sys/types.h: Add id and attribute
        types for barriers, wrlocks, and spinlocks.
        * libc/include/sys/features.h: Enable barriers,
        wrlocks, and spinlocks for RTEMS.
2006-09-13 22:09:27 +00:00
Jeff Johnston ba1bb1b368 2006-09-13 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/math.h: Remove _CONST from _LIB_VERSION, as it is
        supposed to be writable.
        * libm/common/s_lib_ver.c: Ditto.
2006-09-13 22:06:43 +00:00
Jeff Johnston 8f9f25dad8 2006-09-12 Paul Brook <paul@codesourcery.com>
* libc/stdlib/rand.c (srand): Add _REENT_CHECK_RAND48.
2006-09-12 17:31:40 +00:00
Jeff Johnston 0324070e35 2006-09-07 Masaki Muranaka <monaka@monami-software.com>
* libc/machine/xstormy16/Makefile.am:
        Add $(lpfx) prefix to LIBADD objects.
        lib_a_DEPENDENCIES uses the value of lib_a_LIBADD.
        * libc/machine/xstormy16/Makefile.in: Regenerated.
2006-09-07 17:32: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
Kazu Hirata c023e783e9 libgloss/
Merge from newlib-csl-20060320-branch:
	2006-08-31  Nathan Sidwell  <nathan@codesourcery.com>

	* m68k/bdm-crt1.c: Call hardware_init_hook before copying
	initialized data.

	* m68k/Makefile.in (CF_BDM_SCRIPTS): Rename to CF_RAM_SCRIPTS.
	(CF_SCRIPTS): Update.
	(%-bdm.ld): Rename to %-ram.ld.

	2006-08-25  Nathan Sidwell  <nathan@codesourcery.com>

	* m68k/Makefile.in (DBUG_BSP, DBUG_OBJS): Remove.
	(BDM_CRT0): New.
	(BDM_OBJS): Add bdm-crt1.o.
	(BDM_OTHER_OBJS): Remove print.o putnum.o
	(CF_BOARDS): New.
	(CF_BDM_SCRIPTS): Generated name of ram scripts.
	(CF_ROM_SCRIPTS): Generated name of rom scripts.
	(CF_SCRIPTS): Adjust.
	(all): Add BDM_CRT0.
	(bdm-crt0.o, bdm-crt1.o): New targets.
	(bdm-isv.o): Remove.
	(m5208evb, m5213evb, m52235evb, m5235evb, m5273c3, m5282evb,
	m5329evb, m5485evb): New.
	(%-bdm.ld, %-rom.ld): New. Replace individual linker script rules.
	(install): Remove DBUG installs.
	* m68k/bdm-crt0.S: New.
	* m68k/bdm-crt1.c: New.
	* m68k/bdm-exit.c: Call __reset.
	* m68k/bdm-isv.c: Remove.
	* m68k/cf.sc: Adjust to produce either rom or ram images.
	* m68k/dbug-exit.S, m68k/dbug-inbyte.S, m68k/dbug-outbyte.S: Remove.

	2006-07-24  Nathan Sidwell  <nathan@codesourcery.com>

	Bug 844
	* m68k/cf.sc: Set entry point to _start.
	* m68k/crt0.X (_start): New name for entrypoint
	(start): Weak alias for start.

	2006-06-09  Nathan Sidwell  <nathan@codesourcery.com>

	* m68k/bdm-system.c (_system): Support system(NULL).

	2006-06-08  Nathan Sidwell  <nathan@codesourcery.com>

	* m68k/bdm-system.c (_system): Properly encode non failure exit
	code.

	2006-06-05  Nathan Sidwell  <nathan@codesourcery.com>

	* m68k/Makefile.in (BDM_SYSOBJS): Remove bdm-inbyte.o.
	Add bdm-time.o.
	* m68k/bdm-close.c: Add copyright notice.
	* m68k/bdm-fstat.c: Add copyright notice.
	* m68k/bdm-gettimeofday.c: Add copyright notice.
	* m68k/bdm-inbyte.c: Remove.
	* m68k/bdm-isatty.c: Add copyright notice.
	* m68k/bdm-lseek.c: Add copyright notice. Fix &/| thinko.
	* m68k/bdm-open.c: Add copyright notice.
	* m68k/bdm-read.c: Add copyright notice.
	* m68k/bdm-rename.c: Add copyright notice.
	* m68k/bdm-stat.c: Add copyright notice.
	* m68k/bdm-system.c: Add copyright notice.
	* m68k/bdm-time.c: New.
	* m68k/bdm-unlink.c: Add copyright notice.
	* m68k/bdm-write.c: Add copyright notice.

	2006-05-25  Nathan Sidwell  <nathan@codesourcery.com>

	* m68k/Makefile.in (m52235-dbug.ld, m52235-bdm.ld): New
	scripts.

	2006-05-24  Nathan Sidwell  <nathan@codesourcery.com>

	* m68k/Makefile.in (BDM_SYSOBJS): Remove bdm-outbyte.o.
	* m68k/bdm-outbyte.c: Delete.
	* m68k/bdm-semihost.h (BDM_OUTBYTE): Mark as obsolete.

	2006-05-22  Sandra Loosemore <sandra@codesourcery.com>

	* m68k/bdm-semihost.h: Add new constants for additional
	semihosting functions.  Add new BDM_TRAP macro to encapsulate
	inline asm.
	* m68k/bdm-exit.c (_exit): Use new BDM_TRAP macro.
	* m68k/bdm-outbyte.c (outbyte): Ditto.
	* m68k/bdm-isrs.c, m68k/bdm-isv.c: Former BDM_TRAP
	now called BDM_TRAPNUM.
	* m68k/bdm-gdb.h, m68k/bdm-gdb.c: New files
	containing declarations and conversion functions for GDB's fileio
	protocol.
	* m68k/bdm-close.c: New file to define corresponding function.
	* m68k/bdm-fstat.c: Ditto.
	* m68k/bdm-gettimeofday.c: Ditto.
	* m68k/bdm-isatty.c: Ditto.
	* m68k/bdm-lseek.c: Ditto.
	* m68k/bdm-open.c: Ditto.
	* m68k/bdm-read.c: Ditto.
	* m68k/bdm-rename.c: Ditto.
	* m68k/bdm-stat.c: Ditto.
	* m68k/bdm-system.c: Ditto.
	* m68k/bdm-unlink.c: Ditto.
	* m68k/bdm-write.c Ditto.
	* m68k/Makefile.in: Add dependencies for new files.

	2006-03-29  Nathan Sidwell  <nathan@codesourcery.com>

	* m68k/bdm-isv.c (software_init_hook): Fix trap numbering.

	* m68k/Makefile.in (CF_SCRIPTS): Add m5329 board.
	Reorder.
	(*-dbug.ld, *-bdm.ld): Add appropriate IO definition.
	(m5329evb-dbug.ld, m5329evb-bdm.ld): New.
	* cf.sc (GROUP): Revert previous change.  Add IO library.

	* m68k/Makefile.in (BDM_BSP, BDM_OBJS, BDM_ISRS): New.
	(CF_SCRIPTS): Rename dbug scripts.  Add bdm scripts. Add m5485
	scripts.
	(all): Add new targets.
	(BDM_BSP): New target.
	(bdm-isv.o, bdm-exit.o, bdm-outbyte.o, bdm-semihost.o): New
	targets.
	(BDM_ISRS): New targets.
	(m5208evb.ld, m5213evb.ld, m5235evb.ld, m5272c3.ld, m5282evb.ld):
	Rename and adjust.
	(m5485evb-dbug): New.
	(m5208evb-bdm.ld, m5213evb-bdm.ld, m5235evb-bdm.ld,
	m5272c3-bdm.ld, m5282evb-bdm.ld, m5485evb-bdm.ld): New.
	(install): Add BDM_BSP.
	* m68k/bdm-exit.c: New
	* m68k/bdm-inbyte.c: New
	* m68k/bdm-outbyte.c: New
	* m68k/bdm-semihost.c: New
	* m68k/bdm-semihost.h: New
	* m68k/bdm-isrs.c: New.
	* m68k/bdm-isv.c: New.
	* dbug-cf.sc: Renamed to ...
	* cf.sc: ... here.  Add bdm flexibility. Remove GROUP

	2006-05-22  Sandra Loosemore <sandra@codesourcery.com>

	* m68k/bdm-semihost.h: Add new constants for additional
	semihosting functions.  Add new BDM_TRAP macro to encapsulate
	inline asm.
	* m68k/bdm-exit.c (_exit): Use new BDM_TRAP macro.
	* m68k/bdm-outbyte.c (outbyte): Ditto.
	* m68k/bdm-isrs.c, m68k/bdm-isv.c: Former BDM_TRAP
	now called BDM_TRAPNUM.
	* m68k/bdm-gdb.h, m68k/bdm-gdb.c: New files
	containing declarations and conversion functions for GDB's fileio
	protocol.
	* m68k/bdm-close.c: New file to define corresponding function.
	* m68k/bdm-fstat.c: Ditto.
	* m68k/bdm-gettimeofday.c: Ditto.
	* m68k/bdm-isatty.c: Ditto.
	* m68k/bdm-lseek.c: Ditto.
	* m68k/bdm-open.c: Ditto.
	* m68k/bdm-read.c: Ditto.
	* m68k/bdm-rename.c: Ditto.
	* m68k/bdm-stat.c: Ditto.
	* m68k/bdm-system.c: Ditto.
	* m68k/bdm-unlink.c: Ditto.
	* m68k/bdm-write.c Ditto.
	* m68k/Makefile.in: Add dependencies for new files.

newlib/
	Merge from newlib-csl-20060320-branch:
	2006-05-22  Sandra Loosemore <sandra@codesourcery.com>

	* configure.host: Tell it we have _rename and _system when
	building m68k-unknown-elf.
2006-09-01 05:41:06 +00:00
Nick Clifton 9e8b8cdb9f Remove references to %redact files 2006-08-30 08:40:26 +00:00
Jeff Johnston 859742654a 2006-08-29 Paul Brook <paul@codesourcery.com>
* libc/include/sys/config.h: Define _REENT_SMALL for Thumb-2.
2006-08-29 21:00:59 +00:00
Jeff Johnston c1f828e56e 2006-08-27 Joel Sherrill <joel.sherrill@OARcorp.com>
* libc/sys/rtems/machine/sys/param.h: Conditionalize definition of
        BLKDEV_IOSIZE and MAXPHYS so it will fit into small memory targets.
        This is needed to build all AVR and H8300 RTEMS multilib variants.
2006-08-28 17:17:24 +00:00
Jeff Johnston b8e05321ba 2006-08-23 Kazunori Asayama <asayama@sm.sony.co.jp>
* libc/machine/configure.in: Add configuration for SPU.
        * libc/machine/configure: Regenerated.
        * libc/machine/spu/memcpy.c: Include string.h.
2006-08-23 16:07:36 +00:00
Jeff Johnston 380d8ec45d 2006-08-22 Eric Blake <ebb9@byu.net>
* libc/posix/popen.c (popen): Don't close output end of pipe in
        child if stdout was closed on entry.
        [HAVE_FCNTL]: In parent, mark file as close-on-exec, per POSIX.
2006-08-22 20:30:37 +00:00
Christopher Faylor a0922fcb04 * sys/types.h: Correct syntax error caused by missing '\' on #ifdef line. 2006-08-19 16:13:23 +00:00
Jeff Johnston 84a7940382 2006-08-17 Brian Ford <Brian.Ford@FlightSafety.com>
* libc/time/gmtime.c: Correct man page; clock is not a
        local time and no conversion occurs.
2006-08-17 15:53:15 +00:00
Jeff Johnston 0d8de89c9b 2006-08-16 Joel Schopp <jschopp@austin.ibm.com>
* configure.host (newlib_cflags) [spu]: Add special compiler
        options to reduce size.
2006-08-16 21:51:13 +00:00
Jeff Johnston 734e841435 2006-08-16 Joel Schopp <jschopp@austin.ibm.com>
* configure.host: Add spu support.
        * libc/include/stdint.h: Ditto.
        * libc/include/machine/ieeefp.h: Ditto.
        * libc/include/machine/setjmp.h: Ditto.
        * libc/include/sys/config.h: Ditto.
        * libc/include/sys/types.h: Ditto.
        * libc/machine/spu/Makefile.am: New file.
        * libc/machine/spu/Makefile.in: Ditto.
        * libc/machine/spu/aclocal.m4: Ditto.
        * libc/machine/spu/configure: Ditto.
        * libc/machine/spu/configure.in: Ditto.
        * libc/machine/spu/memcpy.c: Ditto.
        * libc/machine/spu/setjmp.S: Ditto.
2006-08-16 21:39:43 +00:00
Jeff Johnston 079b45dc00 2006-08-03 J"orn Rennecke <joern.rennecke@st.com>
* dtoa.c (dtoa_r): Handle the denormalized _DOUBLE_IS_32BITS case
        properly.
2006-08-03 16:56:05 +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