Commit Graph

445 Commits

Author SHA1 Message Date
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 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
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 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
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
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
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 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 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 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
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
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 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 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
Jeff Johnston 7f9b49e427 2007-11-15 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/_default_fcntl.h: New header file that
        is the default version of sys/fcntl.h.
        * libc/include/sys/fcntl.h: Changed to simply include
        sys/_default_fcntl.h.
        * libc/sys/arm/sys/fcntl.h: New file that includes
        sys/_default_fcntl.h and defines O_BINARY.
2007-12-19 18:49:17 +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 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
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 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 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 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
Jeff Johnston e65aa07ac6 Fix typo in ChangeLog and math.h. 2007-09-06 19:55:34 +00:00
Jeff Johnston 6494ee837c 2007-09-06 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h (_M_LOG2E): New log2 of e macro.
        (log2): Use _M_LOG2E instead of M_LOG2E.
        (log2f): Ditto.
        (M_LOG2E): Define to be _M_LOG2E.
2007-09-06 19:51:46 +00:00
Jeff Johnston 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 90c6084b56 2007-08-03 Ralf Corsepius <ralf.corsepius@rtems.org>
* libc/include/tar.h: New.
2007-08-03 21:03:40 +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 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
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
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 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 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