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