Commit Graph

687 Commits

Author SHA1 Message Date
Corinna Vinschen 1875ee55d3 Port newlib to x86_64-pc-cygwin.
* libc/include/sys/features.h: Redefine compilation environment
	definitions for Cygwin to cover 64 bit Cygwin.
	* libc/ctype/ctype_.c (_ctype_): Fix definition for 64 bit Cygwin.
	* libc/include/machine/setjmp.h: Change definition of _JBLEN to allow
	different values for 32 bit and 64 bit Cygwin.
	* libc/include/reent.h (stat64): Define as stat under Cygwin, instead
	of as __stat64.  Undef stat64 if not building Newlib.
	* libc/include/sys/stat.h (stat64): Define as stat under Cygwin.
2013-04-23 09:42:25 +00:00
Corinna Vinschen 9770af188f * libc/include/sys/cdefs.h: Align with latest FreeBSD file header.
* libc/include/sys/features.h (__GNUC_PREREQ__): Define.
2013-04-22 10:28:05 +00:00
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
Corinna Vinschen 7cc6d7cfc6 * libc/include/sys/features.h: Define __STDC_ISO_10646__ for Cygwin.
* libc/include/wchar.h: Include features.h.
2011-01-27 11:55:01 +00:00
Corinna Vinschen d6d9c269e4 * libc/include/sys/types.h (ulong): Add typedef. 2011-01-15 09:26:16 +00:00
Corinna Vinschen 7971c2a29c * libc/include/linux/sys/signal.h (sig_t): Move from here...
* libc/include/signal.h (sig_t): ...to here.
2011-01-12 11:49:28 +00:00
Corinna Vinschen 84ca64afa6 * libc/include/string.h: Make strsignal() available unconditionally. 2011-01-10 10:59:42 +00:00
Christopher Faylor 589e430baa cygwin:
* cygwin.din: Export program_invocation_name and
	program_invocation_short_name.
	* dcrt0.cc: Set program_invocation*name to correct values, based on
	argv[0].
	* globals.cc (program_invocation_name): Define.
	(program_invocation_short_name): Ditto
newlib:
	* libc/include/sys/errno.h (program_invocation_name): Declare.
	(program_invocation_short_name): Ditto.
2010-12-26 21:11:38 +00:00
Corinna Vinschen f8afe40f49 * include/sys/types.h: Add #if defined(__rtems__) around
pthread_attr_t.guardsize.

	* include/pthread.h: Add pthread_attr_setstack, pthread_attr_getstack,
	pthread_attr_getguardsize, pthread_attr_setguardsize.
	* include/sys/types.h (pthread_attr_t): Add guardsize.
2010-12-08 14:44:06 +00:00
Corinna Vinschen a406e79b02 * libc/include/strings.h: Don't include locale.h. 2010-12-08 10:28:40 +00:00
Eric Blake 1dfc6c9535 strings.h: avoid namespace pollution
* libc/include/strings.h: Don't declare removed functions when
requesting POSIX 2008 compliance.
2010-12-08 02:47:14 +00:00
Jeff Johnston 1d1dde068c 2010-12-07 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/include/strings.h: New (split-out from string.h).
2010-12-07 17:31:26 +00:00
Corinna Vinschen fd4515030c * libc/include/math.h: Missing from previous checkin. 2010-12-03 16:08:48 +00:00
Jeff Johnston 874a87f8cd 2010-12-02 Jayant Sonar jayant.sonar@kpitcummins.com
Kaushik Phatak  kaushik.phatak@kpitcummins.com

        * configure.host: Add CR16 support.
        * libc/include/machine/ieeefp.h: Ditto.
        * libc/include/machine/setjmp.h: Ditto.
        * libc/include/sys/config.h: Ditto.
        * libc/machine/configure.in: Ditto
        * libc/machine/configure: Regenerated
        * libc/machine/cr16/aclocal.m4: New.
        * libc/machine/cr16/configure.in: New
        * libc/machine/cr16/configure: New
        * libc/machine/cr16/getenv.c: New
        * libc/machine/cr16/Makefile.am: New
        * libc/machine/cr16/Makefile.in: New
        * libc/machine/cr16/setjmp.S: New
        * libc/machine/cr16/sys/asm.h: New
        * libc/machine/cr16/sys/libh.h: New
        * libc/machine/cr16/sys/syscall.h: New
2010-12-02 19:30:47 +00:00
Corinna Vinschen f43dea8084 * libc/include/sys/types.h: Add _mode_t for __rtems__.
* libc/sys/rtems/machine/_types.h: Provide _mode_t, _fpos_t, _off_t.
	Add _ssize_t for 64bit sparc.
	Let arm, i386, m68k, mips, PPC, sparc use 64bit _off_t, _fpos_t.
2010-11-16 17:29:39 +00:00
Jeff Johnston 9f2ecfff1c 2010-10-14 Craig Howland <howland@LGSInnovations.com>
* libc/include/math.h:  Delete cabs() and cabs() prototypes
        (c.f. 2010-10-08 change by Corinna).
2010-10-14 20:14:33 +00:00
Jeff Johnston 1571d0a51f 2010-10-08 Bernd Schmidt <bernds@codesourcery.com>
Joseph Myers  <joseph@codesourcery.com>

        * configure.host: Handle tic6x targets.
        * libc/include/machine/ieeefp.h: Define endianness for C6X.
        * libc/include/machine/setjmp.h: Add __TMS320C6X__ case.
        * libc/machine/configure.in: Handle tic6x targets.
        * libc/machine/configure: Regenerate.
        * libc/machine/tic6x/Makefile.am, libc/machine/tic6x/configure.in,
        libc/machine/tic6x/setjmp.S: New.
        * libc/machine/tic6x/Makefile.in, libc/machine/tic6x/aclocal.m4,
        libc/machine/tic6x/configure: New (generated).
2010-10-09 02:33:30 +00:00
Corinna Vinschen 339814ba6f * libc/include/sys/unistd.h: Declare getsid, setegid, seteuid for RTEMS. 2010-10-08 15:28:49 +00:00
Corinna Vinschen 5af2a793bc * libc/include/complex.h: New complex header.
* libm/common/fdlibm.h: Added ifdef _COMPLEX_H.
	* libm/complex/*: New complex functions imported from NetBSD.
	* libm/Makefile.am: Added complex subdir.
	* libm/Makefile.in: Regenerate.
	* libm/configure.in: Added complex subdir.
	* libm/configure: Regenerate.
2010-10-08 10:35:14 +00:00
Yaakov Selkowitz 7aba919b5e * libc/include/sys/dir.h: New BSD-compatibility header. 2010-08-11 18:14:54 +00:00
Corinna Vinschen f717289618 * libc/include/sys/features.h: Define _POSIX_MONOTONIC_CLOCK for Cygwin. 2010-08-09 08:29:22 +00:00
Corinna Vinschen f627504e6b * libc/include/sys/stat.h: Move all POSIX-defined symbolic constants
out of `#ifndef _POSIX_SOURCE' guard.
2010-08-06 18:26:21 +00:00
Eric Blake 8092f46770 Add mkostemp and mkostemps.
* libc/stdio/mktemp.c (_gettemp): Add parameter, all callers
changed.
(mkostemp, _mkostemp_r, mkostemps, _mkostemps_r): New interfaces,
for ELIX level 4.
* libc/include/stdlib.h (mktemp): Avoid namespace issues.
(mkostemp, mkostemps): Declare.
2010-07-19 18:21:11 +00:00
Corinna Vinschen 3f45333072 * libc/include/signal.h (sighandler_t): Only define if _POSIX_SOURCE
is undefined.
2010-07-13 11:18:55 +00:00
Corinna Vinschen 723bf6ef39 * libc/include/signal.h (sighandler_t): Add typedef. 2010-07-01 08:50:17 +00:00
Corinna Vinschen ca56076ae2 2010-06-29 Antony King <antony.king@sr.com>
* libc/ctype/ctype_.c (__ctype_ptr): Reinstate definition (guarded by
	_NEED_OLD_CTYPE_PTR_DEFINITION) for backwards compatibility with newlib
	1.16.0 and earlier.

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

	* libc/include/sys/stat.h: Add ACCESSPERMS, ALLPERMS, and DEFFILEMODE.
2010-07-01 08:45:52 +00:00
Jeff Johnston ce3b386964 2010-06-18 Pavel Pisa <ppisa4lists@pikron.com>
* libc/include/machine/ieeefp.h[__arm__][!__VFP_FP__]: Set to
        __IEEE_BIG_ENDIAN and set __IEEE_BYTES_LITTLE_ENDIAN appropriately
        based on __ARMEL flag.
        * libc/include/machine/endian.h: To set byte order to LITTLE_ENDIAN,
        check for __IEEE_LITTLE_ENDIAN or __IEEE_BYTES_LITTLE_ENDIAN.
2010-06-18 16:26:25 +00:00
Kazu Hirata 492efa069b * libc/include/sys/reent.h (_reent): Adjust _REENT_SMALL to be
binary compatible with normal layout.
	(_REENT_INIT): Adjust to match struct layout.
2010-06-09 15:15:35 +00:00
Jeff Johnston b5efabb284 2010-06-08 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/wordexp.h: Add __cplusplus wrapper.
2010-06-08 21:47:57 +00:00
Corinna Vinschen be129c26e2 * libc/include/langinfo.h: Fix #endif positioning. 2010-04-30 14:58:28 +00:00
Corinna Vinschen d47d5b850b Extend locale support to maintain wide char values of native strings
if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
	* libc/include/langinfo.h (enum __nl_item): New type.  Define all
	native values accessible through nl_langinfo.  Define previously
	existing POSIX-compatible values as macros as well.
	* libc/include/stdlib.h (__mb_cur_max): Drop declaration.
	(__locale_mb_cur_max): Declare.
	(MB_CUR_MAX): Re-define calling __locale_mb_cur_max.
	* libc/locale/Makefile.am (ELIX_SOURCES): Add lctype.c.
	* libc/locale/Makefile.in: Regenerate.
	* libc/locale/lctype.c: New file to define and load LC_CTYPE category.
	* libc/locale/lctype.h: New file, matching header.
	* libc/locale/lmessages.c (_C_messages_locale): Add default values for
	wide char members.
	(__messages_load_locale): Add _C_messages_locale in call to
	__set_lc_messages_from_win.
	* libc/locale/lmessages.h (struct lc_messages_T): Add wide char members.
	* libc/locale/lmonetary.c (_C_monetary_locale):  Add default values for
	wide char members.
	(__monetary_load_locale): Add _C_monetary_locale in call to
	__set_lc_monetary_from_win.
	* libc/locale/lmonetary.h (struct lc_monetary_T): Add wide char members.
	Add numerical values for international currency formatting per
	POSIX-1.2008, if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
	* libc/locale/lnumeric.c (_C_numeric_locale): Add default values for
	wide char members.
	(__numeric_load_locale): Add _C_numeric_locale in call to
	__set_lc_numeric_from_win.
	* libc/locale/lnumeric.h (struct lc_numeric_T): Add wide char members.
	* libc/locale/locale.c (loadlocale): Return doing nothing if category
	locale didn't change.  Convert category if chain to switch statement.
	Call __ctype_load_locale in LC_CTYPE case.
	(__locale_charset): Add (but disable for now) returning codeset from
	__get_current_ctype_locale.
	(__locale_mb_cur_max): Add (but disable for now) returning mb_cur_max
	from __get_current_ctype_locale.
	(__locale_msgcharset): Add returning codeset from
	__get_current_messages_locale.
	(_localeconv_r): Accommodate int_XXX values.
	* libc/locale/nl_langinfo.c (nl_ext): New array to define what is to
	be returned for non-POSIX values.
	(nl_Langinfo): Return correct codeset for each locale category.  Return
	extended values if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
	* libc/locale/timelocal.c (_C_time_locale): Add default values for
	wide char members.
	(__time_load_locale): Add _C_time_locale in call to
	__set_lc_time_from_win.
	* libc/locale/timelocal.h (struct lc_time_T): Add wide char members.
	* libc/stdio/vfwprintf.c (_VFWPRINTF_R): Use wide char decimal point
	and thousands_sep if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
	* libc/time/strftime.c: Rework to accommodate availability of wide char
	strings in LC_TIME category if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
2010-04-28 09:59:37 +00:00
Jeff Johnston c1bfa897da 2010-04-01 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/sched.h: Include prototypes for
        sched_* methods.
        * libc/include/sys/sched.h: Update to POSIX
        1003.1b-2008.  Rework constants to allow sharing
        between RTEMS and Cygwin.
2010-04-01 18:33:37 +00:00
Corinna Vinschen 5e74a46f2f * libc/include/sys/features.h: Allow for _XOPEN_SOURCE to have an
empty definition.  Also add support for values of 500 or less.
2010-03-17 17:13:00 +00:00
Jeff Johnston 6fc25b2d1e 2010-03-02 Craig Howland <howland@LGSInnovations.com>
* libc/include/sys/features.h:  Add POSIX.1-permitted definition of
        _POSIX_C_SOURCE if not already defined and _XOPEN_SOURCE has an
        appropriate value.  Specifically, check for POSIX.1-2008 & 2001 values.
        * libc/include/sys/config.h:  Add #include <sys/features.h> so that all
        includes get the new check added to it.
2010-03-02 19:28:39 +00:00
Corinna Vinschen 180044b386 * libc/xdr/README: Correct grammatical errors.
* libc/include/rpc/types.h: Add public types used
	by RPC implementations.
	* libc/include/rpc/xdr.h: Add defines used by RPC
	implementations.
	* libc/xdr/Makefile.am: Eliminate automake warning.
	* libc/xdr/Makefile.in: Regenerate.
2010-03-02 14:29:36 +00:00
Corinna Vinschen 3d7c4998ac Add eXtensible Data Record (XDR) support
* configure.host: Build libc/xdr only on cygwin.
	* Makefile.am: Install xdr headers.
	* libc/configure.in: Support new libc/xdr subdirectory.
	* libc/Makefile.am: Support new libc/xdr subdirectory.
	* libc/include/rpc/types.h: New.
	* libc/include/rpc/xdr.h: New.
	* libc/xdr/README: New.
	* libc/xdr/Makefile.am: New.
	* libc/xdr/dummy.c: New.
	* libc/xdr/xdr.c: New.
	* libc/xdr/xdr_array.c: New.
	* libc/xdr/xdr_float.c: New.
	* libc/xdr/xdr_float_vax.c: New.
	* libc/xdr/xdr_mem.c: New.
	* libc/xdr/xdr_private.c: New.
	* libc/xdr/xdr_private.h: New.
	* libc/xdr/xdr_rec.c: New.
	* libc/xdr/xdr_reference.c: New.
	* libc/xdr/xdr_sizeof.c: New.
	* libc/xdr/xdr_stdio.c: New.

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

	* libc/include/stdio.h: Remove __CYGWIN_USE_BIG_TYPES__ condition.
2010-02-26 09:41:44 +00:00
Corinna Vinschen 830686ec0b * libc/locale/locale.c: Throughout, extensively comment on the
reason for using __CYGWIN__.
	(lconv): Remove _CONST entirely.
	(loadlocale): Guard calls to function loading locale-specific
	category data with __HAVE_LOCALE_INFO__ rather than __CYGWIN__.
	* libc/sys/config.h (__HAVE_LOCALE_INFO__): Define for Cygwin.
2010-02-25 16:10:42 +00:00
Jeff Johnston 84f66e46b9 2010-02-23 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/types.h: Fix __XMK__ sectioning and remove
        redundant code section for __XMK__.
2010-02-23 23:13:20 +00:00
Corinna Vinschen 6eaf061dc4 * libc/include/langinfo.h (_NL_TIME_DATE_FMT): Define new nl_item
value for LC_TIME entry date_fmt.
	(_DATE_FMT): Define "official" GNU name same as _NL_TIME_DATE_FMT.
	* libc/locale/nl_langinfo.c (nl_langinfo): Add case for _DATE_FMT.
2010-02-22 10:53:04 +00:00
Jeff Johnston 45c8c6469a 2010-02-11 Craig Howland <howland@LGSInnovations.com>
* libc/include/machine/ieeefp.h:  isfinite macro modified to run faster
        by only calling fpclassify once instead of possibly twice.
2010-02-11 21:03:51 +00:00
Corinna Vinschen 37671b5114 * libc/include/sys/_default_fcntl.h (O_CLOEXEC): Define as _FNOINHERIT.
(F_DUPFD_CLOEXEC): Define for Cygwin.
	* libc/include/sys/unistd.h (dup3): Define for Cygwin.
	(pipe2): Ditto.
2010-01-14 18:49:13 +00:00
Jeff Johnston d8a439359a 2010-01-11 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* libc/include/math.h (log2, log2f): Disable macro versions for C++,
        as they are incompatible with OpenMP/C++ headers.

2
2010-01-11 22:55:47 +00:00
Eric Blake b2e79f9800 Fix getsubopt declaration.
* libc/include/sys/unistd.h (suboptarg, getsubopt): Move...
* libc/include/stdlib.h: ...here, to match POSIX for getsubopt.
2009-12-22 13:07:24 +00:00
Jeff Johnston a97a996ff7 2009-12-17 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/_syslist.h: Add _mkdir transform.
2009-12-17 21:08:04 +00:00
Jeff Johnston 8b917fbcdd 2009-12-17 Jerker Back <jerker.back@gmail.com>
* libc/include/_ansi.h: Add new _EXFNPTR macro for using with
        function pointer arguments.
        * libc/iconv/lib/conv.h: Use _EXFNPTR rather than _EXPARM macro.
        * libc/iconv/lib/ucsconv.h: Ditto.
        * libc/include/stdlib.h: Use new _EXFNPTR macro for function pointers.
        * libc/include/sys/reent.h: Ditto.
        * libc/include/sys/unistd.h: Ditto.
        * libc/search/bsearch.c: Ditto.
        * libc/stdio/fseek.c: Ditto.
        * libc/stdio64/fseeko64.c: Ditto.
        * libc/stdlib/atexit.c: Ditto.
        * libc/stdlib/on_exit.c: Ditto.
2009-12-17 19:43:43 +00:00
Jeff Johnston 6fe2eb4c80 2009-12-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/include/machine/ieeefp.h: Rework __IEEE_*_ENDIAN handling.
        * libc/machine/arm/machine/endian.h: Remove (Conflicts with
        libc/include/machine/endian.h)
2009-12-17 19:26:38 +00:00
Jeff Johnston 9ad56b2726 2009-12-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/include/machine/setjmp.h: Set up _JBLEN #ifdef __m68k__.
2009-12-17 19:24:22 +00:00
Jeff Johnston f10d348770 2009-12-17 Ralf Corsepius <ralf.corsepius@rtems.org>
* libc/include/pthread.h: Add pthread_atfork, pthread_rwlock_unlock
        * libc/include/sys/stat.h: Use struct timespec st_*tim,
        blksize_t st_blksize, blkcnt_t st_blocks.
        Add st_*time compatibility macros.
2009-12-17 19:22:23 +00:00
Jeff Johnston a13e3a7bf2 2009-12-16 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/errno.h: Move EHOSTDOWN, EPFNOSUPPORT,
        and ETOOMANYREFS into general list as they are referenced
        by OpenGroup and needed by RTEMS.
2009-12-16 19:33:10 +00:00
Jeff Johnston 655e435357 2009-12-10 Conny Marco Menebrocker <c-m-m@gmx.de>
* configure.host: Add xc16x support.
        * libc/include/machine/ieeefp.h: Ditto.
        * libc/include/sys/config.h: Ditto.
        * libc/machine/configure.in: Ditto.
        * libc/machine/Makefile.in: Regenerated.
        * libc/machine/aclocal.m4: Ditto.
        * libc/machine/configure: Ditto.
        * libc/machine/xc16x/Makefile.am: New file.
        * libc/machine/xc16x/Makefile.in: Ditto.
        * libc/machine/xc16x/aclocal.m4: Ditto.
        * libc/machine/xc16x/configure: Ditto.
        * libc/machine/xc16x/configure.in: Ditto.
        * libc/machine/xc16x/putchar.c: Ditto.
        * libc/machine/xc16x/puts.c: Ditto.
        * libc/machine/xc16x/setjmp.S: Ditto.
2009-12-10 17:12:11 +00:00