Commit Graph

45 Commits

Author SHA1 Message Date
Thomas Fitzsimmons 3e35e424d7 * Remove files (should have been done on 2002-06-20). 2002-07-04 20:22:35 +00:00
Jeff Johnston a70486d790 2002-06-24 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h: Remove <sys/types.h>.
        (__dmath): Use __ULong instead of _uint32_t.
        * libc/include/sys/reent.h: If long or int is not 32-bits,
        include <sys/types.h> to get definitions for _int32_t and _uint32_t.
        * libc/stdlib/mprec.h: Include <sys/types.h> to get integer defs.
        * libm/common/fdlibm.h: Ditto.
2002-06-24 20:03:38 +00:00
Thomas Fitzsimmons a7b23a8f11 * Makefile.am (LIB_OBJECTLISTS): Add
libc/search/objectlist.awk.in.
	* libc/Makefile.am (SUBDIRS): Add search.
	(SUBLIBS): Add search/libsearch.la.
	* libc/configure.in (AC_OUTPUT): Add search/Makefile.
	* libc/search: New directory.
	* libc/search/Makefile.am: New file.
	* libc/search/extern.h: New file.
	* libc/search/hash.c: New file.
	* libc/search/hash.h: New file.
	* libc/search/hash_bigkey.c: New file.
	* libc/search/hash_buf.c: New file.
	* libc/search/hash_func.c: New file.
	* libc/search/hash_log2.c: New file.
	* libc/search/hash_page.c: New file.
	* libc/search/hcreate.3: New file.
	* libc/search/hcreate.c: New file.
	* libc/search/hcreate.c~: New file.
	* libc/search/hcreate_r.c: New file.
	* libc/search/ndbm.c: New file.
	* libc/search/page.h: New file.
	* libc/search/tdelete.c: New file.
	* libc/search/tdestroy.c: New file.
	* libc/search/tfind.c: New file.
	* libc/search/tsearch.3: New file.
	* libc/search/tsearch.c: New file.
	* libc/search/twalk.c: New file.
	* libc/include/db.h: New file.
	* libc/include/ndbm.h: New file.
	* libc/include/search.h: New file.
	* libc/include/sys/queue.h: New file.
	* libc/include/sys/cdefs.h: New file.
	* libc/include/sys/param.h
	[__IEEE_LITTLE_ENDIAN,__IEEE_BIG_ENDIAN]: Set BYTE_ORDER to
	LITTLE_ENDIAN or BIG_ENDIAN.
	* libc/include/sys/errno.h (EFTYPE): New macro.
	* libc/search/bsearch.c: Move from libc/stdlib.
	* libc/search/qsort.c: Likewise.
	* libc/stdlib/Makefile.am (LIB_SOURCES): Remove bsearch.c and
	qsort.c.
	(CHEWOUT_FILES): Remove bsearch.def and qsort.def.
	* libc/stdlib/stdlib.tex: Remove references to bsearch and qsort.
2002-06-20 19:51:40 +00:00
Jeff Johnston d062d3ddec 2002-06-13 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/stdlib.h: Add _Exit prototype.
        * libc/stdlib/Makefile.am: Add _Exit.c support.
        * libc/stdlib/Makefile.in: Ditto.
        * libc/stdlib/_Exit.c: New file.
2002-06-13 23:24:03 +00:00
Thomas Fitzsimmons 0953fe640f * libm/common/s_fdim.c: New file.
* libm/common/s_fma.c: Likewise.
	* libm/common/s_fmax.c: Likewise.
	* libm/common/s_fmin.c: Likewise.
	* libm/common/s_fpclassify.c: Likewise.
	* libm/common/s_lrint.c: Likewise.
	* libm/common/s_lround.c: Likewise.
	* libm/common/s_nearbyint.c: Likewise.
	* libm/common/s_remquo.c: Likewise.
	* libm/common/s_round.c: Likewise.
	* libm/common/s_scalbln.c: Likewise.
	* libm/common/s_signbit.c: Likewise.
	* libm/common/s_trunc.c: Likewise.
	* libm/common/sf_fdim.c: Likewise.
	* libm/common/sf_fma.c: Likewise.
	* libm/common/sf_fmax.c: Likewise.
	* libm/common/sf_fmin.c: Likewise.
	* libm/common/sf_lrint.c: Likewise.
	* libm/common/sf_lround.c: Likewise.
	* libm/common/sf_nearbyint.c: Likewise.
	* libm/common/sf_remquo.c: Likewise.
	* libm/common/sf_round.c: Likewise.
	* libm/common/sf_scalbln.c: Likewise.
	* libm/common/sf_trunc.c: Likewise.
	* libm/math/w_exp2.c: Likewise.
	* libm/math/w_tgamma.c: Likewise.
	* libm/math/wf_exp2.c: Likewise.
	* libm/math/wf_tgamma.c: Likewise.
	* libm/mathfp/s_exp2.c: Likewise.
	* libm/mathfp/s_tgamma.c: Likewise.
	* libm/mathfp/sf_exp2.c: Likewise.
	* libm/mathfp/sf_tgamma.c: Likewise.
	* libm/math/er_gamma.c: Fix return value.
	* libm/math/erf_gamma.c: Likewise.
	* libm/mathfp/er_gamma.c: Likewise.
	* libm/mathfp/erf_gamma.c: Likewise.
	* libc/include/math.h (!__STRICT_ANSI__): Include ISOC99-specific
	declarations and macros.
	Regenerated all Makefile.in, aclocal.m4 and configure files to
	use new libtool macros in top-level libtool.m4
2002-06-07 21:59:57 +00:00
Jeff Johnston dc824ef736 2002-05-15 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/stdlib.h: Add on_exit prototype.
        * libc/include/sys/reent.h (struct _atexit): Add argument array
        and bits to track type of exit routine to support both on_exit
        and atexit.
        (_REENT_INIT_PTR): Add missing fields that won't be zeroed out
        by default and change the setting of the atexit structure.
        (_REENT_INIT)[!_REENT_SMALL]: Remove extraneous end brace.
        * libc/stdlib/on_exit.c: New file.
        * libc/stdlib/Makefile.am: Add support for on_exit.
        * libc/stdlib/Makefile.in: Regenerated.
        * libc/stdlib/atexit.c: Change to initialize types field.
        * libc/stdlib/exit.c: Change to look at types field for each
        exit routine and either call an atexit-style or an on_exit-style
        routine accordingly.
2002-05-15 22:58:10 +00:00
Jeff Johnston c33c3635f7 2002-05-06 Jeff Johnston <jjohnstn@redhat.com>
*  libc/include/sys/reent.h (_l64a_buf): New reentrant area.
        (_REENT_L64A_BUF): New macro for accessing area.
        *  libc/stdlib/Makefile.am: Add a64l.c and l64a.c.
        *  libc/stdlib/Makefile.in: Regenerated.
        *  libc/stdlib/a64l.c: New file.
        *  libc/stdlib/l64a.c: New file.
2002-05-06 20:44:54 +00:00
Thomas Fitzsimmons 098414456c * libc/Makefile.am (SUBLIBS): Add LIBC_EXTRA_LIB.
(SUBDEFS): Add LIBC_EXTRA_DEF.
	* libc/configure.in (LIBC_EXTRA_LIB): New variable.
	(LIBC_EXTRA_DEF): Likewise.
	(extra_dir): Likewise.
	* libc/machine/xscale/machine: New directory.
	* libc/machine/xscale/machine/profile.h: New file.

	* Makefile.am (site.exp): Remove newlib_cflags.  Add
	multibuildtop.
	* testsuite/newlib.locale/UTF-8.c: Change fprintf's to printf's.
	* testsuite/lib/flags.exp: New file.
	* testsuite/lib/newlib.exp: Load flags.exp.
	(newlib_target_compile): Remove libgloss directory references.
	(newlib_init): Remove newlib_cflags references.
2002-05-01 18:44:13 +00:00
Thomas Fitzsimmons bfc27bae1a * Various formatting and whitespace changes. 2002-04-30 18:23:40 +00:00
Jonathan Larmour 822afa537a * libc/sys/arm/syscalls.c (_rename): New function. Just a stub.
(_system): New function. Ditto.
	* libc/stdlib/system.c (_system_r): Call _system if HAVE_SYSTEM.
	* configure.host: define HAVE_SYSTEM and HAVE_RENAME for xscale
	targets.
2002-04-29 21:49:56 +00:00
Thomas Fitzsimmons eaa75b70e3 * Makefile.am (check-DEJAGNU): New target.
(site.exp): Likewise.
	* acinclude.m4 (NEWLIB_CONFIGURE): Replace AC_CANONICAL_HOST
	with AC_CANONICAL_SYSTEM.  Remove AC_CANONICAL_BUILD.
	* libc/locale/locale.c (_setlocale_r): Add UTF-8 support.
	* libc/stdlib/mbtowc_r.c (_mbtowc_r): Likewise.
	* libc/stdlib/wctomb_r.c (_wctomb_r): Likewise.
	* testsuite: New directory.
	* testsuite/config: Likewise.
	* testsuite/lib: Likewise.
	* testsuite/newlib.locale: Likewise.
	* testsuite/newlib.string: Likewise.
	* testsuite/config/default.exp: New file.
	* testsuite/lib/checkoutput.exp: New file.
	* testsuite/lib/newlib.exp: New file.
	* testsuite/lib/passfail.exp: New file.
	* testsuite/newlib.locale/UTF-8.c: New file.
	* testsuite/newlib.locale/UTF-8.exp: New file.
	* testsuite/newlib.locale/locale.exp: New file.
	* testsuite/newlib.string/string.exp: New file.
	* testsuite/newlib.string/tstring.c: New file.
2002-04-24 20:53:30 +00:00
Jeff Johnston 10d0021609 2002-04-17 Jeff Johnston <jjohnstn@redhat.com>
*  libc/include/time.h (tzset, _tzset_r): Added prototypes.
        (strptime): Moved prototype to be within !__STRICT_ANSI__.
        (_tzname, _daylight, _timezone): No long __CYGWIN__ only.
        (tzname): Defined for all platforms.
        (daylight, timezone): Defined only for CYGWIN.
        *  libc/sys/linux/machine/i386/crt0.c: Add call to tzset() after
        environment set up.
        * libc/stdlib/setenv_r.c (_setenv_r): Call tzset() if the TZ
        environment variable is set.
        *  libc/time/Makefile.am: Add support for tzset.c, tzlock.c, and
        tzset_r.c.
        *  libc/time/Makefile.in: Regenerated.
        *  libc/time/gmtime.c (gmtime): Changed to call gmtime_r.
        *  libc/time/gmtime_r.c (gmtime_r): Changed to call _mktm_r.
        *  libc/time/lcltime_r.c (lcltime_r): Ditto.
        *  libc/time/local.h: New local header file.
        *  libc/time/mktime.c (mktime): Add timezone support.
        *  libc/time/mktm_r.c: New file which is the common engine
        for gmtime_r and lcltime_r.  This code has timezone support.
        *  libc/time/strftime.c (strftime): Add %Z timezone support.
        *  libc/time/tzlock.c: New file containing timezone lock stubs.
        *  libc/time/tzset.c: New file containing tzset() routine.
        *  libc/time/tzset_r.c: New file containing _tzset_r and
        internal routine for calculating timezone changes for specified year.
2002-04-17 21:23:31 +00:00
Alexandre Oliva 2f3009bd13 * libc/stdlib/mallocr.c (malloc_extend_top): If correction sbrk
fails, don't bail out, and try to correct next time.
2002-04-13 10:27:02 +00:00
Jeff Johnston d4dca0e42e 2002-04-01 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/reent.h (_REENT_INIT_PTR): New macro for
        initializing a struct _reent that has been dynamically allocated.
        (_REENT_CHECK_MISC): New macro that checks _misc struct for
        _REENT_SMALL and does nothing otherwise.
        (_REENT_STRTOK_LAST): New macro for reentrant strtok.
        (_REENT_MBLEN_STATE): New macro for reentrant mblen.
        (_REENT_MBTOWC_STATE): New macro for reentrant mbtowc.
        (_REENT_WCTOMB_STATE): New macro for reentrant wctomb.
        [_REENT_SMALL](struct _misc_reent): New structure containing
        miscellaneous reentrant areas needed by newlib.
        [_REENT_SMALL](struct _reent): Add _misc pointer.
        [_REENT_SMALL](_REENT_INIT_MISC): New macro.
        * libc/string/strtok (strtok): Change to use _REENT_CHECK_MISC
        and _REENT_STRTOK_LAST macros.
        * libc/stdlib/mblen (mblen): Change to use _REENT_CHECK_MISC
        and _REENT_MBLEN_STATE macros.
        * libc/stdlib/mbtowc (mbtowc): Change to use _REENT_CHECK_MISC
        and _REENT_MBTOWC_STATE macros.
        * libc/stdlib/wctomb (wctomb): Change to use _REENT_CHECK_MISC
        and _REENT_WCTOMB_STATE macros.
2002-04-01 23:06:21 +00:00
Jeff Johnston 54a7c6d2be 2002-04-01 Till Straumann <strauman@SLAC.Stanford.EDU>
* libc/stdlib/getenv_r.c (_findenv_r): Add missing ENV_UNLOCK.
2002-04-01 22:29:40 +00:00
Jeff Johnston 27478365a2 2002-02-05 Manik Raina <manik@cisco.com>
* libc/misc/dprintf (parse_number): #if 0 unused function.
        * libc/stdlib/ldtoa.c (_ldcheck): Remove unused local variables
        s, p, k, and outstr.
        * libc/stdlib/dtoa.c (_dtoa_r): Initialize mlo.
2002-02-05 17:14:35 +00:00
Matthew Green 8195aff714 * implement a new `struct _reent' that is significantly smaller. use this
if _REENT_SMALL is defined in config.h.  define this for xstormy16.
2002-02-03 09:24:18 +00:00
Thomas Fitzsimmons fc50413595 * libc/stdlib/Makefile.am (LIB_COMPILE): Change to equal
$(COMPILE) rather than $(CC).
	* libc/stdio/Makefile.am (LIB_COMPILE): Likewise.
	(vfprintf.$(oext)): Remove $(INCLUDES), made redundant by
	$(LIB_COMPILE) change.
	(vfiprintf.$(oext)): Likewise.
2001-12-18 02:22:55 +00:00
Thomas Fitzsimmons 2e1a71756e * Makefile.shared: New file.
* libc/sys/linux/shared.ld: New file.
	* libm/machine/*: New files.
	* libm/machine/i386/*: New files.
	* Makefile.am: Add libtool support.  Change math and mathfp
	references to variables.
	* configure.host: Add variables for libtool support.  Add
	libm_machine_dir variable.
	* configure.in: Add objectlist variables, for libtool
	support.  Add CC_FOR_BUILD tests.
	* libc/Makefile.am: Add libtool support.  Change crt0.o
	reference to be a variable reference.
	* libc/configure.in: Add libtool support.  Change sublib
	names to be lib${subdir}.la when using libtool.
	* libc/ctype/Makefile.am: Add libtool support.
	* libc/errno/Makefile.am: Likewise.
	* libc/locale/Makefile.am: Likewise.
	* libc/machine/Makefile.am: Likewise.
	* libc/machine/configure.in: Likewise.
	* libc/machine/i386/Makefile.am: Likewise.
	* libc/machine/i386/configure.in: Likewise.
	* libc/misc/Makefile.am: Likewise.
	* libc/posix/Makefile.am: Likewise.
	* libc/reent/Makefile.am: Likewise.
	* libc/signal/Makefile.am: Likewise.
	* libc/stdio/Makefile.am: Likewise.
	* libc/stdlib/Makefile.am: Likewise.
	* libc/string/Makefile.am: Likewise.
	* libc/sys/Makefile.am: Likewise.
	* libc/sys/configure.in: Likewise.
	* libc/sys/linux/Makefile.am: Add libtool support.  Change
	awk reference to a variable reference.  Change signal.h
	reference to a variable reference.
	* libc/sys/linux/configure.in: Add libtool support.
	* libc/syscalls/Makefile.am: Likewise.
	* libc/time/Makefile.am: Likewise.
	* libc/unix/Makefile.am: Likewise.
	* libm/Makefile.am: Add libtool support.  Change math and
	mathfp references to variables.
	* libm/configure.in: Add libtool support.  Add
	LIBM_MACHINE_LIB variable.
	* libm/common/Makefile.am: Add libtool support.
	* libm/math/Makefile.am: Likewise.
	* libm/mathfp/Makefile.am: Likewise.
	Regenerate all Makefile.in, aclocal.m4, and configure.
2001-12-13 23:50:11 +00:00
Christopher Faylor 333d609843 * libc/posix/execvp.c: Remove obsolete CYGWIN32 considerations throughout.
* signal.h: Change comment to reflect __CYGWIN__ rather than __CYGWIN32__.
* popen.c (popen): Use __CYGWIN_ rather than __CYGWIN32__.
* system.c (_system_r): Ditto.
2001-10-22 16:40:26 +00:00
Jeff Johnston 5665b0e1d0 2001-10-01 Charles Wilson <cwilson@ece.gatech.edu>
* libc/include/stdlib.h: add declarations for
        _strtoull_r, _strtoll_r, strtoull, and strtoll.
        * libc/stdio/local.h: remove declarations of
        __strtoull_r and __strtoll_r.
        * libc/stdio/vfscanf.c(__svfscanf_r): call
        _strtoull_r instead of __strtoull_r. Ditto
        _strtoll_r vs. __strtoll_r.
        * libc/stdlib/Makefile.am: add new files to
        .c list and .def list
        * libc/stdlib/Makefile.in: regenerate
        * libc/stdlib/strtoll_r.c: rename __strtoll_r
        as _strtoll_r
        * libc/stdlib/strtoull_r.c: rename __strtoull_r
        as _strtoull_r
        * libc/stdlib/strtoull.c: new file
        * libc/stdlib/strtoll.c: new file
2001-10-01 18:05:11 +00:00
Jeff Johnston 7a2afbbb85 2001-09-13 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/Makefile.am: Add support to build strtoll_r.c
        and strtoull_r.c.
        * libc/stdlib/Makefile.in: Regenerated.
        * libc/stdlib/strtoll_r.c: New file.
        * libc/stdlib/strtoull_r.c: New file.
        * libc/stdio/local.h: Add prototypes for long long string
        conversion routines.
        * libc/stdio/vfscanf.c (__svfscanf_r): Add optional long long support
        tied to %L integer conversion specifier.
2001-09-13 21:12:33 +00:00
Jeff Johnston e826766445 2001-08-21 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/mallocr.c [!defined(MALLOC_ALIGNMENT)]: Add conditional
        for SIZE_SZ so that alignment ends up a minimum of 8.
2001-08-21 20:23:16 +00:00
Nick Clifton 2b6b730c98 Handle ARMs with big endian IEEE words but little endian IEEE bytes 2001-06-28 10:40:09 +00:00
Jonathan Larmour 43b44bc5ad * libc/stdlib/mbtowc_r.c (_mbtowc_r): Avoid dereferencing
NULL pointer.
2001-06-11 17:21:18 +00:00
Jeff Johnston 52cb9e6934 2001-04-20 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/stdio.h[!_REENT_ONLY]: Moved various functions together
        into one list.
        [!__STRICT_ANSI__]: Moved non-ANSI I/O functions in this list.
        (vfscanf, vscanf, vsscanf, _vfscanf_r, _vscanf_r, _vsscanf_r): New
        function prototypes.
        (_fscanf_r, _sscanf_r): Ditto.
        * libc/include/stdlib.h: Added _strtod_r prototype.
        * libc/stdio/Makefile.am: Add new v*scanf functions.
        * libc/stdio/Makefile.in: Regenerate.
        * libc/stdio/fscanf.c: Reorganized so HAVE_STDC only affects prototype
        and code is shared.  Added reentrant _fscanf_r which calls __svfscanf_r.        * libc/stdio/scanf.c: Changed to call __svfscanf_r.
        * libc/stdio/sscanf.c: Changed documentation to add reentrant routines.
        (sscanf): Changed to call __svfscanf_r with _REENT argument.
        (_sscanf_r): New routine.
        * libc/stdio/local.h: Removed __svfscanf prototype and replaced it
        with __svfscanf_r prototype.
        * libc/stdio/vfscanf.c (vfscanf, _vfscanf_r: New
        routines.
        (__svfscanf_r): Reentrant version of __svfscanf which takes reetrancy
        structure as argument as calls reentrant versions of helper functions
        (e.g. _strtol_r, _strtoul_r). Also replaced calls to atol and atof
        to _strtol_r and _strtod_r respectively.
        * libc/stdio/vfscanf.c: Also changed __svfscanf to call __svfscanf_r.
        * libc/stdlib/strtod.c (strtod): Changed to call _strtod_r with
        _REENT argument.
        * libc/stdio/vscanf.c: New file.
        * libc/stdio/vsscanf.c: Ditto.
2001-04-20 22:50:51 +00:00
Jeff Johnston ee37ede1d3 2001-02-22 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/machine/setjmp-dj.h: With DJ Delorie's permission,
        changed the copyright information to allow free modification of the
        file with no reference to "copying.dj".
        * libc/include/sys/stat-dj.h: Ditto.
        * libc/machine/i386/setjmp.S: Ditto.
        * libc/sys/h8300hms/sys/file.h: Ditto.
        * libc/sys/sysmec/access.c: Ditto.
        * libc/sys/sysnecv850/access.c: Ditto.
        * libc/stdio/mktemp.c: Fixed typo for the word copyright.
        * libc/stdlib/getenv_r.c: Ditto.
        * libc/stdlib/putenv_r.c: Ditto.
        * libc/stdlib/setenv_r.c: Ditto.
        * libc/stdlib/getenv.c: Removed DJ reference since any possible
        modifications will now be in the _r version of this file.
        * libc/stdlib/putenv.c: Ditto.
        * libc/stdlib/setenv.c: Ditto.
        * libc/sys/go32/copying.dj: Removed DJ's address which is no longer
        valid.  Added a reference to DJ's web page that contains his address.
        * libc/sys/go32/*.s: Removed references to DJ's old address.
        * libc/sys/go32/*.c: Ditto.
        * libc/sys/go32/*.h: Ditto.
        * libc/sys/go32/*.S: Ditto.
        * libc/sys/go32/sys/*.h: Ditto.
2001-02-22 22:12:43 +00:00
Jeff Johnston ab4745dcb2 2001-02-14 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* libc/include/stdlib.h: Add declarations of rand48 functions and
        their reentrant versions.
        * libc/include/sys/reent.h: Move macros from rand48.h. Add
        struct _rand48 for shared parameters of rand48 functions.
        (struct _reent): Add a variable _r48 of struct _rand48.
        (_REENT_INIT): Add _r48 initialization.
        * libc/stdlib/Makefile.am (lib_a_SOURCES): Add rand48 functions.
        (CHEWOUT_FILES): Add rand48.def.
        * libc/stdlib/Makefile.am: Add dependencies for rand48 functions.
        * libc/stdlib/Makefile.in: Regenerated.
        * libc/stdlib/drand48.c (drand48, _drand48_r): Derived from the
        NetBSD C library.
        * libc/stdlib/erand48.c (erand48, _erand48_r): Ditto.
        * libc/stdlib/jrand48.c (jrand48, _jrand48_r): Ditto.
        * libc/stdlib/lcong48.c (lcong48, _lcong48_r): Ditto.
        * libc/stdlib/lrand48.c (lrand48, _lrand48_r): Ditto.
        * libc/stdlib/mrand48.c (mrand48, _mrand48_r): Ditto.
        * libc/stdlib/nrand48.c (nrand48, _nrand48_r): Ditto.
        * libc/stdlib/seed48.c (seed48, _seed48_r): Ditto.
        * libc/stdlib/srand48.c (srand48, _srand48_r): Ditto.
        * libc/stdlib/rand48.c (__dorand48): Ditto.
        * libc/stdlib/rand48.h: Ditto, and modify declarations of global
        parameters into macros referring them in the reentrant structure.
2001-02-15 02:04:55 +00:00
Christopher Faylor 82ea92f3ea * libc/stdlib/mallocr.c: Undefine windows preprocessor variables when compiling
under Cygwin.
2001-01-30 04:04:59 +00:00
Jeff Johnston b6182a09dd 2000-12-13 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/ldtoa.c (_ldcheck): New routine
        that categorizes a long double as NaN, Infinity, or other.
        * libc/stdio/vfprintf.c [WANT_IO_LONG_DBL](_VFPRINTF_R): Removed
        isinfl and isnanl static routines which were i386-specific.  Changed
        calls to the two removed routines to a single _ldcheck call.
        * libc/stdio/vfieeefp.h (ldieee): Fixed missing semi-colons.
2000-12-14 00:25:06 +00:00
Jeff Johnston 2005ab6be7 2000-12-07 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/ldtoa.c: Removed include of alloca.h.
        Also removed \r's.
        (asctoeg): Replaced alloca call with stack array and malloc
        when storage exceeds reasonable limit.
        (e53toe): Fixed einfin calls missing ldp parameter.
        (eiisinf): Hide behind check for LDBL_MANT_DIG == 64.
2000-12-07 23:38:05 +00:00
Jeff Johnston 6bdac416e9 2000-12-06 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/Makefile.am: Added ldtoa.c to list of sources.
        * libc/stdlib/Makefile.in: Regenerated.
        * libc/stdio/floatio.h: Added suitable MAXEXP for long double.
        * libc/stdio/vfieeefp.h: Added long double bit structures.
        * libc/stdio/vfprintf.c[WANT_IO_LONG_DBL]: Added long double support.
        [WANT_IO_LONG_DBL](isinfl, isnanl): New static long double routines.
        (exponent): Changed expbuf to reasonable maximum instead of MAXEXP.
        * libc/stdio/vfscanf.c[WANT_IO_LONG_DBL]: Added long double support.
        * libc/stdlib/ldtoa.c: New file containing _ldtoa_r and
        _strtold routines used for conversions between character
        and long double.
2000-12-06 23:50:11 +00:00
Jeff Johnston f5e7c1244b 2000-12-04 Joel Sherrill <joel@OARcorp.com>
* libc/stdlib/system.c: Avoid compiling do_system() for RTEMS.
2000-12-04 18:29:29 +00:00
Michael Meissner 73dea7905c Only reference environ indirectly through a pointer 2000-11-22 18:26:10 +00:00
Christopher Faylor a385ae7508 * Makefile.am: Fix space vs. tab problem in install-data-local.
* Makefile.in: Regenerate.
* libc/include/_ansi.h (_EXFUN): Define specially for __CYGWIN__.
(_EXPARM): New macro for defining a function parameter.
* libc/include/stdlib.h: Use _EXPARM.
* libc/stdlib/mallocr.c: Don't build cfree for Cygwin.
2000-09-06 20:46:27 +00:00
Christopher Faylor c9ca4412d7 * libc/stdlib/system.c (do_system): Eliminate explicit declaration of environ
when compiling under cygwin since it is already declared in unistd.h.
2000-08-25 17:39:06 +00:00
Jeff Johnston 2d5862dee6 2000-08-23 Werner Almesberger <Werner.Almesberger@epfl.ch>
* libc/stdlib/mprec.c (ulp, b2d, d2b): changed a few expressions
        like  x << y-z  to the equivalent  x << (y-z).
        (d2b): changed if statements with assignment to perform the
        assignment prior to the if check.
        * libc/reent/reent.c: included stdlib.h for "_free_r" prototype.
        * libc/unix/getpass.c (getpass): moved "echo" assignment out of if.
        * libc/unix/ttyname.c: included string.h for "strcpy" prototype.
        * libc/unix/getcwd.c (ISDOT): added parentheses to clarify && and ||
        precedence.
        * libc/include/sys/unistd.h: added "vfork" prototype (for popen.c).
        Added "_execve" prototype (for execl.c, execle.c, execv.c, and
        execve.c).
        * libc/posix/popen.c (popen): added parentheses to clarify && and ||
        precedence.
        * libm/math/e_cosh.c (__ieee754_cosh): changed parentheses to
        clarify && and || precendence (and to remove pascalism).
        * libm/math/e_sinh.c (__ieee754_sinh): Ditto.
        * libm/math/s_infconst.c: added another pair of braces to all
        initializers for __infinity (need three: for __infinity[1] array,
        for union __dmath, and for i[2]).
2000-08-24 22:32:38 +00:00
Jeff Johnston 199359f062 2000-08-23 Werner Almesberger <Werner.Almesberger@epfl.ch>
* libc/stdlib/abort.c: changed description: uses "raise" instead of
        "getpid" and "kill"; added: uses "write" and "_exit".
        Also included unistd.h for "_exit" prototype.
        * libc/stdlib/system.c: included unistd.h for "execve" prototype,
        reent.h for "_fork_r" and "_wait_r" prototypes.
        (do_system): changed  extern char *environ[] to POSIX-friendly
        extern char **environ.
        * libc/stdlib/wctomb_r.c: included string.h for "strlen" and "strcmp"
        prototypes.
        * libc/stdlib/remove.c: included reent.h for "_unlink_r" prototype.
        * libc/reent/execr.c: included sys/wait.h for "wait" prototype.
        * libc/reent/fstatr.c: included sys/stat.h for "fstat" prototype.
        * libc/reent/openr.c: included fcntl.h for "open" prototype.
        * libc/reent/signalr.c: included signal.h for "kill" prototype,
        unistd.h for "getpid" prototype.
        * libc/reent/statr.c: included sys/stat.h for "stat" prototype.
        * libc/reent/timer.c: included sys/time.h for "gettimeofday" prototype.
        * libc/unix/getut.c (utmpname): removed local, incorrect "strdup"
        prototype.  Also included stdlib.h for "abort", string.h for
        "strdup" and "strncmp" prototypes.
        * libc/unix/getlogin.c: included string.h for "strncmp", "memset", and
        "strncpy", unistd.h for "read" and "close" prototypes.
        * libc/posix/execvp.c: included string.h for "strchr", "strlen", and
        "strcat" prototypes.
2000-08-24 18:51:09 +00:00
Jeff Johnston a334e5ef72 2000-08-23 Werner Almesberger <Werner.Almesberger@epfl.ch>
* libc/stdlib/envlock.c: changed documented "__env_lock" and
        "__env_unlock" prototype from "void *" or "char *" to
        "struct _reent *" to match real function.  Also added include
        of envlock.h.
        * libc/stdlib/mlock.c: changed documented "__malloc_lock" and
        "__malloc_unlock" prototype from "void *" or "char *" to
        "struct _reent *" to match real function.
        * libc/stdlib/envlock.h: added "__env_lock" and "__env_unlock"
        prototypes (for getenv_r.c and setenv_r.c).
2000-08-24 16:11:59 +00:00
Jeff Johnston a704d94a86 Tue Jun 20 14:30:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
* libc/include/sys/reent.h (_rand_next): Added __extension__
        qualifier as long long type is not strict ANSI.
        * libc/stdlib/rand.c (rand): Added __extension__ qualifier
        to long long constant.
2000-06-20 18:34:57 +00:00
Jeff Johnston 46a43a99c6 Fri Jun 9 14:28:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
* libc/include/sys/reent.h (_rand_next): Changed to
        unsigned long long and moved to end of _reent struct in _new union.
        (_REENT_INIT): Changed to move _rand_next initialization.
        * libc/stdlib/rand.c (rand): Changed to use unsigned long long
        linear congruential algorithm that is used by DJGPP.
2000-06-09 18:50:05 +00:00
Jeff Johnston 518882f3a2 Thu Jun 8 17:54:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
* libc/stdlib/rand_r.c: New algorithm that meets minimal
        standard.
2000-06-08 21:56:18 +00:00
Jeff Johnston c87be3e4d6 Mon Apr 17 12:46:00 2000 Marek Michalkiewicz <marekm@linux.org.pl>
* libc/signal/signal.c (_signal_r) : Removed unused local variable temp.        * libc/stdio/findfp.c (std): Added declaration of flags and file.
        * libc/stdio/mktemp.c (_gettemp, _mkstemp_r, mkstemp): Added int
        return type.
        * libc/stdio/putchar.c (putchar): Added return statement.
        * libc/stdio/refill.c (lflush): Added correct parentheses.
        * libc/stdio/vfprintf.c (_VFPRINTF_R): Ditto.
        * libc/stdio/vfscanf.c (__svfscanf): Changed sprintf call which
        prints long value to use l qualifier.
        * libc/stdlib/dtoa.c (_dtoa_r): Added parentheses to remove warning
        messages and initialized local values: ilim, ilim1, and spec_case.
        * libc/stdlib/ecvtbuf.c (print_e): Removed unused variable dp.
        * libc/stdlib/mbctype.h (_issjis1, _issjis2): Added parentheses.
        * libc/stdlib/mprec.c: Ditto.
        * libc/stdlib/setenv_r.c: Ditto.
        * libc/stdlib/strtod.c: Ditto.
        * libc/stdlib/strtol.c: Ditto.
        * libc/stdlib/strtoul.c: Ditto.
        * libm/common/sf_expm1.c: Added curly braces to if else clauses.
        * libm/common/sf_log1p.c: Ditto.
        * libm/common/sf_scalbn.c: Ditto.
        * libm/math/ef_log.c: Ditto.
2000-04-17 17:10:18 +00:00
Jeff Johnston b8ec20c809 Tue Mar 21 19:08:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
* libc/stdlib/envlock.c: Fixed comment typo.
2000-03-22 00:09:49 +00:00
Christopher Faylor 8a0efa53e4 import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00