Corinna Vinschen
7eb805f68d
* libc/sys/rtems/sys/queue.h: Delete file.
...
* libc/include/sys/cdefs.h (__containerof): New define.
(__DEQUALIFY): Likewise.
* libc/include/sys/queue.h (TRACEBUF_INITIALIZER): Likewise.
(TRACEBUF): Likewise.
(LIST_FOREACH_SAFE): Likewise.
(LIST_PREV): Likewise.
(LIST_SWAP): Likewise.
(QMD_LIST_CHECK_HEAD): Likewise.
(QMD_LIST_CHECK_NEXT): Likewise.
(QMD_LIST_CHECK_PREV): Likewise.
(QMD_SAVELINK): Likewise.
(QMD_TAILQ_CHECK_HEAD): Likewise.
(QMD_TAILQ_CHECK_NEXT): Likewise.
(QMD_TAILQ_CHECK_PREV): Likewise.
(QMD_TAILQ_CHECK_TAIL): Likewise.
(QMD_TRACE_ELEM): Likewise.
(QMD_TRACE_HEAD): Likewise.
(SLIST_FOREACH_PREVPTR): Likewise.
(SLIST_FOREACH_SAFE): Likewise.
(SLIST_REMOVE_AFTER): Likewise.
(SLIST_SWAP): Likewise.
(STAILQ_FOREACH_SAFE): Likewise.
(STAILQ_REMOVE_AFTER): Likewise.
(STAILQ_SWAP): Likewise.
(TAILQ_FOREACH_REVERSE_SAFE): Likewise.
(TAILQ_FOREACH_SAFE): Likewise.
(TAILQ_SWAP): Likewise.
(TRASHIT): Likewise.
(SLIST_REMOVE): Use SLIST_REMOVE_AFTER().
(STAILQ_LAST): Use __containerof().
(STAILQ_REMOVE): Use STAILQ_REMOVE_AFTER().
2013-04-16 10:25:16 +00:00
Corinna Vinschen
99e6ee04d6
Revert to original patch
2013-04-11 13:01:08 +00:00
Corinna Vinschen
9b7759ae75
* libc/include/stdlib.h (strtof, strtoll, strtoull, strtold): Also
...
prototype if C++11 or later.
2013-04-11 10:23:05 +00:00
Corinna Vinschen
2d8f1ea62a
* libc/include/machine/setjmp.h (sigjmp_buf): Fix definition of
...
sigjmp_buf size if _JBTYPE is defined.
2013-02-28 16:42:21 +00:00
Corinna Vinschen
c2e3ff288d
* libc/include/malloc.h (struct mallinfo): Convert type of all members
...
to size_t to match all targets.
2013-02-26 14:25:13 +00:00
Corinna Vinschen
7080b36417
* libc/include/sys/_types.h (_ssize_t): Define as signed equivalent of
...
size_t with GCC.
2013-02-21 12:27:11 +00:00
Joel Sherrill
6c3f590cd9
2013-01-22 Joel Sherrill <joel.sherrill@oarcorp.com>
...
* libc/include/pthread.h: Add PTHREAD_RWLOCK_INITIALIZER.
Fix typo on PTHREAD_COJND_INITIALIZER.
2013-01-22 21:20:08 +00:00
Corinna Vinschen
38305196bf
* libc/include/string.h: Fix preprocessor expressions using
...
_XOPEN_SOURCE.
2013-01-12 10:55:09 +00:00
Jeff Johnston
17ecab12a8
2012-12-18 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/math.h: Remove the log2f macro.
2012-12-18 22:41:53 +00:00
Jeff Johnston
b060af2264
2012-12-18 Craig Howland <howland@LGSInnovations.com>
...
* libc/include/math.h: Add recognition of values 1 and 2 for
FLT_EVAL_METHOD.
2012-12-18 21:20:51 +00:00
Corinna Vinschen
0772f3f1c1
* libc/include/sys/reent.h (__sFILE): Change type of _offset
...
from int to _off_t.
* libc/stdio/ftell.c: Use _ftello_r().
* libc/stdio/ftello.c: Copy implementation from previous
_ftell_r().
* libc/stdio/fseek.c: Use _fseeko_r().
* libc/stdio/fseeko.c: Copy implementation from previous
_fseek_r().
2012-11-29 16:28:30 +00:00
Corinna Vinschen
7b2d80eb87
* libc/include/inttypes.h: Add and use __INTTYPES_EXP().
2012-11-26 16:26:06 +00:00
Christopher Faylor
86fd769f37
* libc/include/sys/time.h: Avoid guarding other than timeval declaration with
...
_TIMEVAL_DEFINED. Move timeval related macros under _TIMEVAL_DEFINED control.
2012-11-12 15:57:35 +00:00
Corinna Vinschen
de1e3bb2c9
* libc/include/locale.h (NULL): Fetch definition via stddef.h.
...
* libc/include/stdio.h (NULL): Ditto.
* libc/include/stdlib.h (NULL): Ditto.
* libc/include/string.h (NULL): Ditto.
* libc/include/wchar.h (NULL): Ditto.
* libc/include/rpc/types.h (NULL): Ditto.
* libc/include/time.h (NULL): Ditto. Include stddef.h earlier.
2012-11-01 11:51:12 +00:00
Corinna Vinschen
f9b3628010
* libc/include/sys/signal.h (sigset_t): Don't define when building
...
for Cygwin.
2012-10-26 09:23:46 +00:00
Corinna Vinschen
6f7ae529ad
* libc/include/string.h (strdup, strndup): Declare if not
...
__STRICT_ANSI__ or _XOPEN_SOURCE is defined appropriately.
2012-10-22 15:16:48 +00:00
Corinna Vinschen
e054398980
* libc/include/stdlib.h (strtof, strtoll, strtoull, strtold):Prototype
...
if not __STRICT_ANSI__ or stdc version C99 or greater.
2012-10-22 15:15:21 +00:00
Corinna Vinschen
25742157d7
* libc/include/assert.h (static_assert): Define.
2012-10-16 19:00:30 +00:00
Corinna Vinschen
5eceb3958e
* libc/include/sys/features.h (__GNUC_PREREQ): Define. Use
...
throughout in place of explicit GNUC version checks.
* libc/include/_ansi.h (_NOINLINE): Define.
(_NOINLINE_STATIC): Define.
* libc/stdio/vfprintf.c (__sbprintf): Define _NOINLINE_STATIC.
2012-10-16 18:45:24 +00:00
Jeff Johnston
c3fe5bf771
2012-09-26 Ian Bolton <ian.bolton@arm.com>
...
Jim MacArthur <jim.macarthur@arm.com>
Marcus Shawcroft <marcus.shawcroft@arm.com>
Nigel Stephens <nigel.stephens@arm.com>
Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Richard Earnshaw <rearnsha@arm.com>
Sofiane Naci <sofiane.naci@arm.com>
Tejas Belagod <tejas.belagod@arm.com>
Yufeng Zhang <yufeng.zhang@arm.com>
* configure.host: Add AArch64.
* libc/include/machine/ieeefp.h: Add AArch64.
* libc/include/machine/setjmp.h: Add AArch64.
* libc/include/machine/time.h: Add AArch64.
* libc/include/sys/config.h: Add AArch64.
* libc/machine/aarch64/Makefile.am: New file.
* libc/machine/aarch64/Makefile.in: Generated.
* libc/machine/aarch64/aclocal.m4: Generated.
* libc/machine/aarch64/configure: Generated.
* libc/machine/aarch64/configure.in: New file.
* libc/machine/aarch64/setjmp.S: New file.
* libc/machine/configure.in: Add AArch64.
* libc/machine/configure: Re-generated.
* libm/machine/aarch64/Makefile.am: New file.
* libm/machine/aarch64/Makefile.in: Generated.
* libm/machine/aarch64/aclocal.m4: Generated.
* libm/machine/aarch64/configure: Generated.
* libm/machine/aarch64/configure.in: New file.
* libm/machine/aarch64/s_ceil.c: New file.
* libm/machine/aarch64/s_floor.c: New file.
* libm/machine/aarch64/s_fma.c: New file.
* libm/machine/aarch64/s_fmax.c: New file.
* libm/machine/aarch64/s_fmin.c: New file.
* libm/machine/aarch64/s_llrint.c: New file.
* libm/machine/aarch64/s_llround.c: New file.
* libm/machine/aarch64/s_lrint.c: New file.
* libm/machine/aarch64/s_lround.c: New file.
* libm/machine/aarch64/s_nearbyint.c: New file.
* libm/machine/aarch64/s_rint.c: New file.
* libm/machine/aarch64/s_round.c: New file.
* libm/machine/aarch64/s_trunc.c: New file.
* libm/machine/aarch64/sf_ceil.c: New file.
* libm/machine/aarch64/sf_floor.c: New file.
* libm/machine/aarch64/sf_fma.c: New file.
* libm/machine/aarch64/sf_fmax.c: New file.
* libm/machine/aarch64/sf_fmin.c: New file.
* libm/machine/aarch64/sf_llrint.c: New file.
* libm/machine/aarch64/sf_llround.c: New file.
* libm/machine/aarch64/sf_lrint.c: New file.
* libm/machine/aarch64/sf_lround.c: New file.
* libm/machine/aarch64/sf_nearbyint.c: New file.
* libm/machine/aarch64/sf_rint.c: New file.
* libm/machine/aarch64/sf_round.c: New file.
* libm/machine/aarch64/sf_trunc.c: New file.
* libm/machine/configure.in: Add AArch64.
* libm/machine/configure: Re-generated.
2012-09-26 20:06:50 +00:00
Anthony Green
af32eb5e28
bi-endian support for moxie.
2012-09-13 23:57:33 +00:00
Corinna Vinschen
1f232abc89
Throughout, run newlib with -Wall -Werror option and fix bugs and
...
compiler warnings found this way.
* libc/stdio/freopen.c (_freopen_r): Fix bug setting _flags.
* libc/include/stdio.h (_rename): Define when building newlib.
* libc/include/sys/signal.h (_kill): Ditto.
* libc/include/sys/stat.h (_mkdir): Ditto.
* libc/include/sys/time.h (_gettimeofday): Ditto.
* libc/include/sys/times.h (_times): Ditto.
* libc/include/sys/wait.h (_wait): Ditto.
* libc/locale/lmessages.c (empty): Don't define for Cygwin.
* libc/locale/lmonetary.c (cnv): Ditto.
* libc/locale/nl_langinfo.c (nl_langinfo): Ditto for variable s.
* libc/posix/collate.c: Throughout cast to avoid compiler warning.
* libc/posix/engine.c (matcher): Initialize dp to avoid compiler
warning.
* libc/posix/glob.c: Disable on Cygwin. Explain why.
* libc/posix/regcomp.c: Fix "uninitialized" compiler warnings.
(dissect): Deliberately silence gcc compiler warning. Add comment to
explain why.
* libc/posix/wordexp.c (wordexp): Remove num_bytes variable since result
is never used.
* libc/posix/popen.c (popen): Ditto for variable last.
* libc/reent/mkdirr.c: Include sys/stat.h.
* libc/reent/renamer.c: Include stdio.h.
* libc/search/hash.c: Throughout use underscored variants of the stat
function family.
(init_hash): Add missing definition for the __USE_INTERNAL_STAT64 case.
* libc/search/hash_bigkey.c (__big_insert): Add parenthesis to avoid
compiler warning.
* libc/search/hash_page.c (overflow_page): Initalize freep to NULL to
avoid compiler warning.
* libc/stdio/asiprintf.c (_asiprintf_r): Cast unsigned char * to char *
to avoid compiler warning.
(asiprintf): Ditto.
* libc/stdio/asprintf.c (_asprintf_r): Ditto.
(asprintf): Ditto.
* libc/stdio/vasiprintf.c (_vasiprintf_r): Ditto.
* libc/stdio/vasprintf.c (_vasprintf_r): Ditto.
* libc/stdio/mktemp.c (_gettemp): Cast to unsigned char in call to
isdigit to avoid compiler warning.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Initialize variables used for
grouping to avoid compiler warning. Only define and set nseps and
nrepeats if they are really used.
* libc/stdio/vfwprintf.c (_VFWPRINTF_R): Ditto. Only define state if
it is really used.
* libc/stdio/vfscanf.c (u_char): Revert to be defined as unsigned char.
(__SVFSCANF_R): Cast fmt in call to __mbtowc.
* libc/stdlib/mbtowc_r.c (JIS_state_table): Disable when building
Cygwin.
(JIS_action_table): Ditto.
* libc/stdlib/wctomb_r.c (__utf8_wctomb): Add parenthesis to avoid
compiler warning.
* libc/string/strcasestr.c: Deliberately silence gcc compiler warning.
Add comment to explain why.
* libc/time/strptime.c (strptime): Cast to unsigned char in calls to
isspace to avoid compiler warning.
* libm/math/e_atan2.c (__ieee754_atan2): Add parenthesis to avoid
compiler warning.
* libm/math/e_exp.c (__ieee754_exp): Initialize k to 0 to avoid
compiler warning. Drop setting it to 0 later.
* libm/math/ef_exp.c (__ieee754_expf): Ditto.
* libm/math/e_pow.c (__ieee754_pow): Add braces to avoid compiler
warning.
* libm/math/ef_pow.c (__ieee754_powf): Ditto.
* libm/math/er_lgamma.c (__ieee754_lgamma_r): Initialize nadj to 0 to
avoid compiler warning.
* libm/math/erf_lgamma.c (__ieee754_lgammaf_r): Ditto.
* libm/math/e_rem_pio2.c (__ieee754_rem_pio2): Ditto for variable z.
* libm/common/sf_round.c (roundf): Remove signbit variable since result
is never used.
2012-08-08 11:04:18 +00:00
Corinna Vinschen
0246baaea2
Allow building of Cygwin using Mingw64 SDK headers:
...
* libc/include/sys/time.h: Drop _WINSOCK_H guard. Just use
_TIMEVAL_DEFINED instead.
* libc/include/sys/types.h: Check for _WINSOCKAPI_ along with
_WINSOCK_H.
* libc/include/sys/unistd.h: Ditto.
2012-07-06 10:41:21 +00:00
Christopher Faylor
f804f416f3
* libc/include/sys/types.h: Don't use the same preprocessor guard for time_t,
...
timespec, and itimerspec. Add a separate guard specifically for timespec and
always unconditionally define itimerspec.
2012-06-26 16:03:12 +00:00
Corinna Vinschen
507b172d8d
* libc/include/string.h (memrchr): Declare.
...
* libc/string/Makefile.am (ELIX_4_SOURCES): Add memrchr.c.
(CHEWOUT_FILES): Add memrchr.def.
* libc/string/Makefile.in: Regenerate.
* libc/string/memrchr.c: New file.
2012-05-10 08:34:08 +00:00
Jeff Johnston
eab1d3e125
2012-03-09 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/machine/setjmp-dj.h: Modify license to include
modification in clause as permitted by DJ Delorie.
* libc/machine/arm/access.c: Ditto.
* libc/machine/i386/setjmp.S: Ditto.
* libc/sys/h8300hms/sys/file.h: Ditto.
* libc/sys/linux/machine/i386/setjmp.S: Ditto.
* libc/sys/sysmec/access.c: Ditto.
* libc/sys/sysnecv850/access.c: Ditto.
2012-03-09 20:26:39 +00:00
Jeff Johnston
9edde1d2c4
2012-02-21 Jeremy Bennett <jeremy.bennett@embecosm.com>
...
Alan Lehotsky <apl@alum.mit.edu>
Joern Rennecke <joern.rennecke@embecosm.com>
* configure.host: Add Epiphany support.
* libc/include/machine/ieeefp.h: Likewise.
* libc/include/machine/setjmp.h: Likewise.
* libc/machine/configure.in, libc/sys/configure.in: Likewise.
* libc/machine/configure, libc/sys/configure: Regenerate.
* libc/machine/epiphany, libc/sys/epiphany: New directories.
* NEWS: Mention addition of Epiphany.
2012-02-21 22:34:31 +00:00
Eric Blake
833630b859
* libc/include/_ansi.h (_ELIDABLE_INLINE): Fix C99 mode.
2012-02-09 19:58:33 +00:00
Corinna Vinschen
dd9ee39045
* libc/include/inttypes.h: Redefine pointer type macros.
2012-02-07 16:42:20 +00:00
Yaakov Selkowitz
2af8babd93
* libc/include/tgmath.h: New header.
2012-01-12 11:19:31 +00:00
Yaakov Selkowitz
5ecc040cff
* libc/include/sys/unistd.h [__CYGWIN__] (get_current_dir_name):
...
Declare.
2012-01-09 22:49:20 +00:00
Yaakov Selkowitz
3182cdfaf0
* libc/include/complex.h: Fix "/*" within comment warning.
2012-01-09 22:46:34 +00:00
Corinna Vinschen
4b4391b74d
* libc/include/process.h: Remove Cygwin-only header.
2012-01-09 17:06:20 +00:00
DJ Delorie
d1fc77322f
[libgloss]
...
* configure.in: Add rl78.
* configure: Regenerate.
* rl78: New directory
[newlib]
* configure.host: Add rl78.
* libc/include/machine/ieeefp.h: Add rl78 support.
* libc/include/machine/setjmp.h: Add rl78 support.
* libc/machine/configure.in: Add rl78.
* libc/machine/rl78: New directory.
2011-11-29 06:33:49 +00:00
Corinna Vinschen
e8fdf15a75
* libc/include/process.h: Remove exec family function declarations.
...
Add comment.
* libc/include/sys/unistd.h (execlpe): Declare for Cygwin.
2011-08-19 14:29:34 +00:00
Joel Sherrill
529aa781b6
2011-08-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
...
* libc/include/sys/types.h: XML and RTEMS define
_UNIX98_THREAD_MUTEX_ATTRIBUTES and can use the standard
definitions. This avoids redefinition warnings.
2011-08-01 17:22:18 +00:00
Yaakov Selkowitz
792c8bcff2
* libc/include/time.h [_POSIX_CLOCK_SELECTION] (clock_nanosleep):
...
Declare.
* libc/include/sys/features.h [__CYGWIN__] (_POSIX_CLOCK_SELECTION):
Define.
2011-07-20 19:41:15 +00:00
Yaakov Selkowitz
00900ab098
* libc/include/sys/unistd.h (_CS_XBS5_WIDTH_RESTRICTED_ENVS): Define.
...
(_CS_V6_ENV): Fix definition.
2011-07-20 01:14:50 +00:00
Jeff Johnston
38e356f0e4
2011-06-09 Yaakov Selkowitz <yselkowitz@...>
...
* libc/include/string.h (strdupa): New macro function.
(strndupa): New macro function.
2011-06-10 18:30:38 +00:00
Eric Blake
4805b60ccf
strerror: allow user hook to comply with POSIX rules
...
* libc/string/strerror.c (strerror): Split body into...
(_strerror_r): ...new reentrant function.
* libc/string/u_strerr.c (_user_strerror): Update signature.
* libc/include/stdio.h (_strerror_r): New prototype.
* libc/posix/collate.c (__collate_err): Adjust callers.
* libc/stdio/perror.c (_perror_r): Likewise.
* libc/string/strerror_r.c (strerror_r): Likewise.
* libc/string/xpg_strerror_r.c (__xpg_strerror_r): Likewise.
2011-05-25 18:41:10 +00:00
Yaakov Selkowitz
831826db94
* libc/include/stdio_ext.h: New header.
...
* libc/stdio/fpurge.c [!__rtems__] (__fpurge): New function.
2011-05-19 07:21:42 +00:00
Yaakov Selkowitz
64a5e8a9a3
* libc/include/time.h (CLOCK_PROCESS_CPUTIME_ID): Rename from
...
CLOCK_PROCESS_CPUTIME.
(CLOCK_THREAD_CPUTIME_ID): Rename from CLOCK_THREAD_CPUTIME.
* libc/include/sys/features.h [__CYGWIN__] (_POSIX_CPUTIME): Define.
(_POSIX_THREAD_CPUTIME): Define.
2011-05-16 22:35:10 +00:00
Corinna Vinschen
aaded2f90e
* libc/include/sys/features.h (_POSIX_THREAD_ATTR_STACKADDR): Define
...
to 200112L for Cygwin.
2011-05-15 18:50:52 +00:00
Yaakov Selkowitz
307b0a5d4b
* libc/include/signal.h (psignal): Declare.
...
* libc/sys/linux/psignal.c: Move from here...
* libc/signal/psignal.c: ... to here. Document.
* libc/sys/linux/Makefile.am (GENERAL_SOURCES): Move psignal.c from here...
* libc/signal/Makefile.am (LIB_SOURCES): ... to here.
(CHEWOUT_FILES): Add psignal.def.
* libc/sys/linux/Makefile.in: Regenerate.
* libc/signal/Makefile.in: Ditto.
* libc/signal/signal.tex: Add references to psignal.
2011-05-04 11:26:22 +00:00
Yaakov Selkowitz
5f555b0bd3
* libc/include/sys/features.h [__CYGWIN__] (_POSIX_SPIN_LOCKS): Define.
...
* libc/include/sys/types.h: Cygwin provides its own pthread_spinlock_t
typedef.
2011-05-02 16:05:06 +00:00
Corinna Vinschen
060e5c9785
* libc/include/sys/signal.h (_sig_func_ptr): Define with int parameter
...
per POSIX. Explain in comment.
2011-04-19 08:02:59 +00:00
Corinna Vinschen
43ff4129ce
* libc/include/string.h (strchrnul): Declare.
...
* libc/string/strchrnul.c: New file.
* libc/string/Makefile.am (ELIX_2_SOURCES): Add strchrnul.c.
* libc/string/Makefile.in: Regenerate.
2011-03-28 14:51:28 +00:00
Corinna Vinschen
4b43b20be8
* libc/include/string.h: Include sys/cdefs.h.
2011-03-03 11:11:41 +00:00
Corinna Vinschen
977cd4175e
* libc/include/sys/cdefs.h (__CONCAT1): Define.
...
(__CONCAT): Define.
(__STRING): Define.
(__XSTRING): Define.
(__ASMNAME): Define.
* libc/include/string.h (strerror_r): Use __ASMNAME to take target
specific label prefixes into account.
2011-03-03 10:37:09 +00:00
Eric Blake
7c10a76dec
strerror_r: provide POSIX implementation
...
* libc/include/string.h (strerror_r): Update declaration.
* libc/string/strerror.c (strerror): Update documentation.
* libc/string/strerror_r.c (strerror_r): Always return
NUL-terminated string; don't overwrite too-short buf.
* libc/string/xpg_strerror_r.c (__xpg_strerror_r): Implement POSIX
variant.
* libc/string/Makefile.am (GENERAL_SOURCES): Build new file.
* libc/string/Makefile.in: Regenerate.
2011-02-10 16:48:18 +00:00