2000-02-18 03:39:52 +08:00
|
|
|
#ifndef __SYS_CONFIG_H__
|
|
|
|
#define __SYS_CONFIG_H__
|
|
|
|
|
2002-07-16 05:35:44 +08:00
|
|
|
#include <machine/ieeefp.h> /* floating point macros */
|
2010-03-03 03:28:39 +08:00
|
|
|
#include <sys/features.h> /* POSIX defs */
|
2002-07-16 05:35:44 +08:00
|
|
|
|
2012-09-27 04:06:50 +08:00
|
|
|
#ifdef __aarch64__
|
|
|
|
#define MALLOC_ALIGNMENT 16
|
|
|
|
#endif
|
|
|
|
|
2019-01-15 23:36:50 +08:00
|
|
|
#ifdef __AMDGCN__
|
|
|
|
#define __DYNAMIC_REENT__
|
|
|
|
#endif
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
/* exceptions first */
|
2002-12-17 06:35:32 +08:00
|
|
|
#if defined(__H8500__) || defined(__W65__)
|
2002-07-16 06:25:52 +08:00
|
|
|
#define __SMALL_BITFIELDS
|
2000-02-18 03:39:52 +08:00
|
|
|
/* ??? This conditional is true for the h8500 and the w65, defining H8300
|
|
|
|
in those cases probably isn't the right thing to do. */
|
|
|
|
#define H8300 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* 16 bit integer machines */
|
2020-09-02 22:50:07 +08:00
|
|
|
#if defined(__Z8001__) || defined(__Z8002__) || defined(__H8500__) || defined(__W65__) || defined (__mn10200__) || defined (__AVR__) || defined (__MSP430__)
|
2000-02-18 03:39:52 +08:00
|
|
|
|
|
|
|
#undef INT_MAX
|
|
|
|
#undef UINT_MAX
|
|
|
|
#define INT_MAX 32767
|
|
|
|
#define UINT_MAX 65535
|
|
|
|
#endif
|
|
|
|
|
2004-06-23 05:54:52 +08:00
|
|
|
#if defined (__H8300__) || defined (__H8300H__) || defined(__H8300S__) || defined (__H8300SX__)
|
2002-12-17 06:35:32 +08:00
|
|
|
#define __SMALL_BITFIELDS
|
|
|
|
#define H8300 1
|
|
|
|
#undef INT_MAX
|
|
|
|
#undef UINT_MAX
|
|
|
|
#define INT_MAX __INT_MAX__
|
|
|
|
#define UINT_MAX (__INT_MAX__ * 2U + 1)
|
|
|
|
#endif
|
|
|
|
|
2010-12-03 03:30:47 +08:00
|
|
|
#if (defined(__CR16__) || defined(__CR16C__) ||defined(__CR16CP__))
|
|
|
|
#ifndef __INT32__
|
|
|
|
#define __SMALL_BITFIELDS
|
|
|
|
#undef INT_MAX
|
|
|
|
#undef UINT_MAX
|
|
|
|
#define INT_MAX 32767
|
|
|
|
#define UINT_MAX (__INT_MAX__ * 2U + 1)
|
|
|
|
#else /* INT32 */
|
|
|
|
#undef INT_MAX
|
|
|
|
#undef UINT_MAX
|
|
|
|
#define INT_MAX 2147483647
|
|
|
|
#define UINT_MAX (__INT_MAX__ * 2U + 1)
|
|
|
|
#endif /* INT32 */
|
|
|
|
|
|
|
|
#endif /* CR16C */
|
|
|
|
|
2009-12-11 01:12:11 +08:00
|
|
|
#if defined (__xc16x__) || defined (__xc16xL__) || defined (__xc16xS__)
|
|
|
|
#define __SMALL_BITFIELDS
|
|
|
|
#endif
|
|
|
|
|
2002-07-16 05:35:44 +08:00
|
|
|
#ifdef __W65__
|
|
|
|
#define __SMALL_BITFIELDS
|
|
|
|
#endif
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
#if defined(__D10V__)
|
2002-07-16 05:35:44 +08:00
|
|
|
#define __SMALL_BITFIELDS
|
2000-02-18 03:39:52 +08:00
|
|
|
#undef INT_MAX
|
|
|
|
#undef UINT_MAX
|
|
|
|
#define INT_MAX __INT_MAX__
|
2002-07-24 23:44:24 +08:00
|
|
|
#define UINT_MAX (__INT_MAX__ * 2U + 1)
|
|
|
|
#define _POINTER_INT short
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__mc68hc11__) || defined(__mc68hc12__) || defined(__mc68hc1x__)
|
|
|
|
#undef INT_MAX
|
|
|
|
#undef UINT_MAX
|
|
|
|
#define INT_MAX __INT_MAX__
|
2000-02-18 03:39:52 +08:00
|
|
|
#define UINT_MAX (__INT_MAX__ * 2U + 1)
|
|
|
|
#define _POINTER_INT short
|
2002-07-03 02:18:58 +08:00
|
|
|
#endif
|
|
|
|
|
2017-07-27 16:44:22 +08:00
|
|
|
#if defined(__m68k__) || defined(__mc68000__) || defined(__riscv)
|
2014-08-19 00:43:42 +08:00
|
|
|
#define _READ_WRITE_RETURN_TYPE _ssize_t
|
|
|
|
#endif
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
#ifdef ___AM29K__
|
|
|
|
#define _FLOAT_RET double
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __i386__
|
|
|
|
#ifndef __unix__
|
|
|
|
/* in other words, go32 */
|
|
|
|
#define _FLOAT_RET double
|
|
|
|
#endif
|
2006-01-31 Leif Ekblad <leif@rdos.net>
* configure.host: RDOS support added
* libc/include/sys/config.h: Ditto.
* libc/sys/rdos/Makefile.am, libc/sys/rdos/Makefile.in: New files.
* libc/sys/rdos/aclocal.m4, libc/sys/rdos/chown.c: Ditto.
* libc/sys/rdos/close.c, libc/sys/rdos/config.h: Ditto.
* libc/sys/rdos/configure, libc/sys/rdos/configure.in: Ditto.
* libc/sys/rdos/crt0.S, libc/sys/rdos/execve.c: Ditto.
* libc/sys/rdos/fork.c, libc/sys/rdos/fstat.c: Ditto.
* libc/sys/rdos/getenv.c, libc/sys/rdos/getpid.c: Ditto.
* libc/sys/rdos/gettod.c, libc/sys/rdos/isatty.c: Ditto.
* libc/sys/rdos/kill.c, libc/sys/rdos/link.c: Ditto.
* libc/sys/rdos/lseek.c, libc/sys/rdos/open.c: Ditto.
* libc/sys/rdos/rdos.S, libc/sys/rdos/rdos.h: Ditto.
* libc/sys/rdos/rdoshelp.c, libc/sys/rdos/read.c: Ditto.
* libc/sys/rdos/readlink.c, libc/sys/rdos/sbrk.c: Ditto.
* libc/sys/rdos/stat.c, libc/sys/rdos/symlink.c: Ditto.
* libc/sys/rdos/times.c, libc/sys/rdos/unlink.c: Ditto.
* libc/sys/rdos/user.def, libc/sys/rdos/wait.c: Ditto.
* libc/sys/rdos/write.c: Ditto.
2006-02-01 03:33:56 +08:00
|
|
|
#if defined(__linux__) || defined(__RDOS__)
|
2002-05-17 Jeff Johnston <jjohnstn@redhat.com>
* Makefile.am: Copy and install headers from sys/machine/include
directory. Also pass $toollibdir to lower-level directories.
* Makefile.in: Regenerated.
* libc/include/stdio.h[!_REENT_ONLY]: Change stdin, stdout, and
stderr to use _REENT macro instead of _impure_ptr directly.
* libc/include/sys/config.h[__i386__][__linux__]: Define
__DYNAMIC_REENT__.
* libc/include/sys/reent.h[!_REENT_ONLY]: Change _REENT macro to be
call to __getreent() function if !__SINGLE_THREAD__ and
__DYNAMIC_REENT__ is set.
* libc/reent/Makefile.am: Add support for getreent.c.
* libc/reent/Makefile.in: Regenerated.
* libc/string/strerror.c: Add check if EOPNOTSUPP and ENOTSUP are same.
* libc/sys/linux/Makefile.am: Add support for new files.
* libc/sys/linux/configure.in: Add $EXTRA_DIRS variable.
* libc/sys/linux/Makefile.in: Regenerated.
* libc/sys/linux/configure: Ditto.
* libc/sys/linux/io.c: Add poll syscall. Also weak-alias
__close, __read, __write, __poll, __open, __lseek, __fcntl from
their __libc_ counterparts.
* libc/sys/linux/io64.c: Add __libc_ prefix to lseek64 and open64
and weak-alias to regular names.
* libc/sys/linux/pread64.c: Rename to __libc_pread64 and weak-alias
to pread64 and __pread64.
* libc/sys/linux/process.c: Weak_alias __libc_getpid to __getpid.
* libc/sys/linux/pwrite64.c: Rename to __libc_pwrite64 and
weak-alias to pwrite64.
* libc/sys/linux/sched.c: Weak-alias __libc_sched_getparam,
__libc_sched_getscheduler, __libc_sched_get_priority_max,
__libc_sched_get_priority_min, and __libc_sched_setschedule to
name with __ instead of __libc_.
* libc/sys/linux/siglongjmp.c: Include <machine/weakalias.h>.
Rename siglongjmp to __libc_siglongjmp and weak-alias to siglongjmp.
Call __libc_longjmp instead of longjmp, from __libc_siglongjmp.
* libc/sys/linux/signal.c: Rename raise to __libc_raise and weak-alias
to raise.
* libc/sys/linux/socket.c: Weak-alias __libc_connect to __connect and
__libc_send to __send.
* libc/sys/linux/time.c: Weak-alias __libc_gettimeofday to
__gettimeofday.
* libc/sys/linux/wait.c: Rename wait to __libc_wait and weak-alias
it to wait. Rename wait3 to __libc_wait3 and weak-alias it to wait3.
* libc/sys/linux/include/setjmp.h: Use __jmp_buf in sigjmp_buf
type and typedef __jmp_buf to jmp_buf.
* libc/sys/linux/machine/i386/Makefile.am: Add syscalls.c and
setjmp.S.
* libc/sys/linux/machine/i386/Makefile.in: Regenerated.
* libc/sys/linux/machine/i386/crt0.c: Add support to clear .bss
section.
* libc/sys/linux/machine/i386/socketcall.h: Change to use __libc_
prefix for function macros and then use weak_alias() to regular names.
* libc/sys/linux/machine/i386/syscall.h: Ditto.
* libc/sys/linux/sys/errno.h: Define EOPNOTSUP to be ENOTSUP.
* libc/sys/linux/sys/stdio.h: Define _flockfile and _funlockfile
to be flockfile() and funlockfile() respectively.
* libc/sys/linux/sys/types.h
* libc/reent/getreent.c: New file.
* libc/sys/linux/flockfile.c: Ditto.
* libc/sys/linux/funlockfile.c: Ditto.
* libc/sys/linux/getreent.c: Ditto.
* libc/sys/linux/pread.c: Ditto.
* libc/sys/linux/pwrite.c: Ditto.
* libc/sys/linux/raise.c: Ditto.
* libc/sys/linux/system.c: Ditto.
* libc/sys/linux/tcdrain.c: Ditto.
* libc/sys/linux/machine/i386/i386mach.h: Ditto.
* libc/sys/linux/machine/i386/setjmp.S: Ditto.
* libc/sys/linux/machine/i386/syscalls.c: Ditto.
* libc/sys/linux/machine/i386/weakalias.h: Ditto.
* libc/sys/linux/machine/i386/include/setjmp.h: Ditto.
2002-05-18 07:39:39 +08:00
|
|
|
/* we want the reentrancy structure to be returned by a function */
|
|
|
|
#define __DYNAMIC_REENT__
|
2002-06-21 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h: Add <sys/types.h> to get _uint32_t definition.
* libc/include/machine/types.h: Skip __off_t, __pid_t, and
__loff_t definitions if special _HAVE_SYSTYPES macro defined.
* libc/include/sys/config.h: Removed _uint*, _int* definitions.
* libc/include/sys/param.h: Remove i386 case which is handled
by default case.
(BIG_ENDIAN, LITTLE_ENDIAN): Protect
definitions in case they are already defined.
(BYTE_ORDER): Add default case using _IEEE_BIG_ENDIAN and
_IEEE_LITTLE_ENDIAN flags.
* libc/include/sys/reent.h: Change __uint32_t references to
use _ULong instead.
(_REENT_GETDATE_REENT_P): New macro.
* libc/include/sys/types.h (__int16_t, __uint16_t): Added.
(__int32_t, __uint32_t, __int64_t, __uint64_t): Ditto.
* libc/search/hash.h: Add default setting of BYTE_ORDER,
LITTLE_ENDIAN, and BIG_ENDIAN, if not already defined.
* libc/sys/linux/sys/types.h: Include <sys/_types.h>. Define
ssize_t based on _ssize_t. Remove __socklen_t, __uintptr_t,
pid_t, off_t, loff_t, caddr_t, and daddr_t type
definitions which are done by subsequent glibc headers.
Add macro definitions to prevent subsequent header files from
defining pid_t, off_t, ssize_t, and key_t. Move uintptr_t and
intptr_t to after glibc definitions of types they are based on.
2002-06-22 02:15:56 +08:00
|
|
|
#define HAVE_GETDATE
|
2002-06-22 02:40:50 +08:00
|
|
|
#define _READ_WRITE_RETURN_TYPE _ssize_t
|
2002-07-18 07:25:44 +08:00
|
|
|
#define __LARGE64_FILES 1
|
2002-07-20 07:21:43 +08:00
|
|
|
/* we use some glibc header files so turn on glibc large file feature */
|
|
|
|
#define _LARGEFILE64_SOURCE 1
|
2002-05-17 Jeff Johnston <jjohnstn@redhat.com>
* Makefile.am: Copy and install headers from sys/machine/include
directory. Also pass $toollibdir to lower-level directories.
* Makefile.in: Regenerated.
* libc/include/stdio.h[!_REENT_ONLY]: Change stdin, stdout, and
stderr to use _REENT macro instead of _impure_ptr directly.
* libc/include/sys/config.h[__i386__][__linux__]: Define
__DYNAMIC_REENT__.
* libc/include/sys/reent.h[!_REENT_ONLY]: Change _REENT macro to be
call to __getreent() function if !__SINGLE_THREAD__ and
__DYNAMIC_REENT__ is set.
* libc/reent/Makefile.am: Add support for getreent.c.
* libc/reent/Makefile.in: Regenerated.
* libc/string/strerror.c: Add check if EOPNOTSUPP and ENOTSUP are same.
* libc/sys/linux/Makefile.am: Add support for new files.
* libc/sys/linux/configure.in: Add $EXTRA_DIRS variable.
* libc/sys/linux/Makefile.in: Regenerated.
* libc/sys/linux/configure: Ditto.
* libc/sys/linux/io.c: Add poll syscall. Also weak-alias
__close, __read, __write, __poll, __open, __lseek, __fcntl from
their __libc_ counterparts.
* libc/sys/linux/io64.c: Add __libc_ prefix to lseek64 and open64
and weak-alias to regular names.
* libc/sys/linux/pread64.c: Rename to __libc_pread64 and weak-alias
to pread64 and __pread64.
* libc/sys/linux/process.c: Weak_alias __libc_getpid to __getpid.
* libc/sys/linux/pwrite64.c: Rename to __libc_pwrite64 and
weak-alias to pwrite64.
* libc/sys/linux/sched.c: Weak-alias __libc_sched_getparam,
__libc_sched_getscheduler, __libc_sched_get_priority_max,
__libc_sched_get_priority_min, and __libc_sched_setschedule to
name with __ instead of __libc_.
* libc/sys/linux/siglongjmp.c: Include <machine/weakalias.h>.
Rename siglongjmp to __libc_siglongjmp and weak-alias to siglongjmp.
Call __libc_longjmp instead of longjmp, from __libc_siglongjmp.
* libc/sys/linux/signal.c: Rename raise to __libc_raise and weak-alias
to raise.
* libc/sys/linux/socket.c: Weak-alias __libc_connect to __connect and
__libc_send to __send.
* libc/sys/linux/time.c: Weak-alias __libc_gettimeofday to
__gettimeofday.
* libc/sys/linux/wait.c: Rename wait to __libc_wait and weak-alias
it to wait. Rename wait3 to __libc_wait3 and weak-alias it to wait3.
* libc/sys/linux/include/setjmp.h: Use __jmp_buf in sigjmp_buf
type and typedef __jmp_buf to jmp_buf.
* libc/sys/linux/machine/i386/Makefile.am: Add syscalls.c and
setjmp.S.
* libc/sys/linux/machine/i386/Makefile.in: Regenerated.
* libc/sys/linux/machine/i386/crt0.c: Add support to clear .bss
section.
* libc/sys/linux/machine/i386/socketcall.h: Change to use __libc_
prefix for function macros and then use weak_alias() to regular names.
* libc/sys/linux/machine/i386/syscall.h: Ditto.
* libc/sys/linux/sys/errno.h: Define EOPNOTSUP to be ENOTSUP.
* libc/sys/linux/sys/stdio.h: Define _flockfile and _funlockfile
to be flockfile() and funlockfile() respectively.
* libc/sys/linux/sys/types.h
* libc/reent/getreent.c: New file.
* libc/sys/linux/flockfile.c: Ditto.
* libc/sys/linux/funlockfile.c: Ditto.
* libc/sys/linux/getreent.c: Ditto.
* libc/sys/linux/pread.c: Ditto.
* libc/sys/linux/pwrite.c: Ditto.
* libc/sys/linux/raise.c: Ditto.
* libc/sys/linux/system.c: Ditto.
* libc/sys/linux/tcdrain.c: Ditto.
* libc/sys/linux/machine/i386/i386mach.h: Ditto.
* libc/sys/linux/machine/i386/setjmp.S: Ditto.
* libc/sys/linux/machine/i386/syscalls.c: Ditto.
* libc/sys/linux/machine/i386/weakalias.h: Ditto.
* libc/sys/linux/machine/i386/include/setjmp.h: Ditto.
2002-05-18 07:39:39 +08:00
|
|
|
#endif
|
2000-02-18 03:39:52 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __mn10200__
|
|
|
|
#define __SMALL_BITFIELDS
|
2001-11-12 Hans-Peter Nilsson <hp@bitrange.com>
* libc/include/machine/ieeefp.h: Add support for mmix target.
* libc/include/machine/setjmp.h: Ditto.
* configure.host: Ditto.
* libc/sys/mmixware/Makefile.am, libc/sys/mmixware/_exit.c,
libc/sys/mmixware/access.c, libc/sys/mmixware/aclocal.m4,
libc/sys/mmixware/chmod.c, libc/sys/mmixware/chown.c,
libc/sys/mmixware/close.c, libc/sys/mmixware/configure.in,
libc/sys/mmixware/creat.c, libc/sys/mmixware/crt0.c,
libc/sys/mmixware/execv.c, libc/sys/mmixware/execve.c,
libc/sys/mmixware/fork.c, libc/sys/mmixware/fstat.c,
libc/sys/mmixware/getpid.c, libc/sys/mmixware/gettime.c,
libc/sys/mmixware/isatty.c, libc/sys/mmixware/kill.c,
libc/sys/mmixware/lseek.c, libc/sys/mmixware/open.c,
libc/sys/mmixware/pipe.c, libc/sys/mmixware/read.c,
libc/sys/mmixware/sbrk.c, libc/sys/mmixware/setjmp.S,
libc/sys/mmixware/stat.c, libc/sys/mmixware/sys/syscall.h,
libc/sys/mmixware/time.c, libc/sys/mmixware/times.c,
libc/sys/mmixware/unlink.c, libc/sys/mmixware/utime.c,
libc/sys/mmixware/wait.c, libc/sys/mmixware/write.c: New files.
* libc/sys/mmixware/configure, libc/sys/mmixware/Makefile.in,
libc/sys/mmixware/aclocal.m4: Generate.
2001-11-13 05:04:41 +08:00
|
|
|
#endif
|
|
|
|
|
2000-06-28 03:51:33 +08:00
|
|
|
#ifdef __AVR__
|
|
|
|
#define __SMALL_BITFIELDS
|
|
|
|
#define _POINTER_INT short
|
|
|
|
#endif
|
|
|
|
|
2018-11-07 21:59:19 +08:00
|
|
|
#if defined(__v850) && !defined(__rtems__)
|
2000-02-18 03:39:52 +08:00
|
|
|
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__sda__))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* For the PowerPC eabi, force the _impure_ptr to be in .sdata */
|
2002-07-03 02:18:58 +08:00
|
|
|
#if defined(__PPC__)
|
|
|
|
#if defined(_CALL_SYSV)
|
2000-02-18 03:39:52 +08:00
|
|
|
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
|
|
|
|
#endif
|
2002-08-17 14:10:33 +08:00
|
|
|
#ifdef __SPE__
|
|
|
|
#define _LONG_DOUBLE double
|
|
|
|
#endif
|
2000-02-18 03:39:52 +08:00
|
|
|
#endif
|
|
|
|
|
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-29 00:42:21 +08:00
|
|
|
/* Configure small REENT structure for Xilinx MicroBlaze platforms */
|
2021-07-22 02:00:34 +08:00
|
|
|
#if defined (__MICROBLAZE__) && !defined(__rtems__)
|
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-29 00:42:21 +08:00
|
|
|
#ifndef _REENT_SMALL
|
|
|
|
#define _REENT_SMALL
|
|
|
|
#endif
|
|
|
|
/* Xilinx XMK uses Unix98 mutex */
|
|
|
|
#ifdef __XMK__
|
|
|
|
#define _UNIX98_THREAD_MUTEX_ATTRIBUTES
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2008-11-20 05:05:31 +08:00
|
|
|
#if defined(__mips__) && !defined(__rtems__)
|
2006-08-01 23:54:04 +08:00
|
|
|
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
|
|
|
|
#endif
|
|
|
|
|
2001-12-23 06:47:58 +08:00
|
|
|
#ifdef __xstormy16__
|
|
|
|
#define __SMALL_BITFIELDS
|
|
|
|
#undef INT_MAX
|
|
|
|
#undef UINT_MAX
|
|
|
|
#define INT_MAX __INT_MAX__
|
|
|
|
#define UINT_MAX (__INT_MAX__ * 2U + 1)
|
|
|
|
#define MALLOC_ALIGNMENT 8
|
|
|
|
#define _POINTER_INT short
|
|
|
|
#define __BUFSIZ__ 16
|
2002-02-03 17:24:18 +08:00
|
|
|
#define _REENT_SMALL
|
2001-12-23 06:47:58 +08:00
|
|
|
#endif
|
2013-05-14 05:39:51 +08:00
|
|
|
|
|
|
|
#if defined __MSP430__
|
|
|
|
#ifndef _REENT_SMALL
|
|
|
|
#define _REENT_SMALL
|
|
|
|
#endif
|
|
|
|
|
2017-07-11 01:19:00 +08:00
|
|
|
#define __BUFSIZ__ 256
|
2013-05-14 05:39:51 +08:00
|
|
|
#define __SMALL_BITFIELDS
|
|
|
|
|
|
|
|
#ifdef __MSP430X_LARGE__
|
2020-09-02 22:50:07 +08:00
|
|
|
#define _POINTER_INT __int20
|
2013-05-14 05:39:51 +08:00
|
|
|
#else
|
|
|
|
#define _POINTER_INT int
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2005-08-11 04:35:13 +08:00
|
|
|
#ifdef __m32c__
|
|
|
|
#define __SMALL_BITFIELDS
|
|
|
|
#undef INT_MAX
|
|
|
|
#undef UINT_MAX
|
|
|
|
#define INT_MAX __INT_MAX__
|
|
|
|
#define UINT_MAX (__INT_MAX__ * 2U + 1)
|
|
|
|
#define MALLOC_ALIGNMENT 8
|
|
|
|
#if defined(__r8c_cpu__) || defined(__m16c_cpu__)
|
|
|
|
#define _POINTER_INT short
|
|
|
|
#else
|
|
|
|
#define _POINTER_INT long
|
|
|
|
#endif
|
|
|
|
#define __BUFSIZ__ 16
|
|
|
|
#define _REENT_SMALL
|
|
|
|
#endif /* __m32c__ */
|
|
|
|
|
2006-08-17 05:39:43 +08:00
|
|
|
#ifdef __SPU__
|
|
|
|
#define MALLOC_ALIGNMENT 16
|
2007-02-02 00:33:05 +08:00
|
|
|
#define __CUSTOM_FILE_IO__
|
2006-08-17 05:39:43 +08:00
|
|
|
#endif
|
|
|
|
|
2015-01-14 17:25:16 +08:00
|
|
|
#if defined(__or1k__) || defined(__or1knd__)
|
|
|
|
#define __DYNAMIC_REENT__
|
|
|
|
#endif
|
|
|
|
|
2002-04-20 07:52:48 +08:00
|
|
|
/* This block should be kept in sync with GCC's limits.h. The point
|
|
|
|
of having these definitions here is to not include limits.h, which
|
|
|
|
would pollute the user namespace, while still using types of the
|
|
|
|
the correct widths when deciding how to define __int32_t and
|
|
|
|
__int64_t. */
|
|
|
|
#ifndef __INT_MAX__
|
|
|
|
# ifdef INT_MAX
|
|
|
|
# define __INT_MAX__ INT_MAX
|
|
|
|
# else
|
|
|
|
# define __INT_MAX__ 2147483647
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __LONG_MAX__
|
|
|
|
# ifdef LONG_MAX
|
|
|
|
# define __LONG_MAX__ LONG_MAX
|
|
|
|
# else
|
|
|
|
# if defined (__alpha__) || (defined (__sparc__) && defined(__arch64__)) \
|
|
|
|
|| defined (__sparcv9)
|
|
|
|
# define __LONG_MAX__ 9223372036854775807L
|
|
|
|
# else
|
|
|
|
# define __LONG_MAX__ 2147483647L
|
|
|
|
# endif /* __alpha__ || sparc64 */
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
/* End of block that should be kept in sync with GCC's limits.h. */
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
#ifndef _POINTER_INT
|
|
|
|
#define _POINTER_INT long
|
|
|
|
#endif
|
|
|
|
|
2002-06-19 05:20:28 +08:00
|
|
|
#ifdef __frv__
|
|
|
|
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
|
|
|
|
#endif
|
2000-06-09 09:13:36 +08:00
|
|
|
#undef __RAND_MAX
|
2002-04-20 07:52:48 +08:00
|
|
|
#if __INT_MAX__ == 32767
|
2000-06-09 09:13:36 +08:00
|
|
|
#define __RAND_MAX 32767
|
|
|
|
#else
|
|
|
|
#define __RAND_MAX 0x7fffffff
|
|
|
|
#endif
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2003-05-13 17:46:48 +08:00
|
|
|
#if defined(__CYGWIN__)
|
2003-05-10 05:38:31 +08:00
|
|
|
#include <cygwin/config.h>
|
2000-08-02 04:51:51 +08:00
|
|
|
#endif
|
|
|
|
|
2001-02-01 04:11:48 +08:00
|
|
|
#if defined(__rtems__)
|
|
|
|
#define __FILENAME_MAX__ 255
|
2001-08-30 03:47:43 +08:00
|
|
|
#define _READ_WRITE_RETURN_TYPE _ssize_t
|
2013-07-09 21:14:31 +08:00
|
|
|
#define __DYNAMIC_REENT__
|
2013-05-09 07:13:51 +08:00
|
|
|
#define _REENT_GLOBAL_ATEXIT
|
2017-06-29 14:17:04 +08:00
|
|
|
#define _REENT_GLOBAL_STDIO_STREAMS
|
2001-02-01 04:11:48 +08:00
|
|
|
#endif
|
|
|
|
|
2009-03-31 17:31:38 +08:00
|
|
|
#ifndef __EXPORT
|
|
|
|
#define __EXPORT
|
|
|
|
#endif
|
|
|
|
|
2000-08-02 04:51:51 +08:00
|
|
|
#ifndef __IMPORT
|
|
|
|
#define __IMPORT
|
|
|
|
#endif
|
|
|
|
|
2001-03-06 09:04:43 +08:00
|
|
|
/* Define return type of read/write routines. In POSIX, the return type
|
|
|
|
for read()/write() is "ssize_t" but legacy newlib code has been using
|
|
|
|
"int" for some time. If not specified, "int" is defaulted. */
|
|
|
|
#ifndef _READ_WRITE_RETURN_TYPE
|
|
|
|
#define _READ_WRITE_RETURN_TYPE int
|
|
|
|
#endif
|
2013-10-23 18:04:43 +08:00
|
|
|
/* Define `count' parameter of read/write routines. In POSIX, the `count'
|
|
|
|
parameter is "size_t" but legacy newlib code has been using "int" for some
|
|
|
|
time. If not specified, "int" is defaulted. */
|
|
|
|
#ifndef _READ_WRITE_BUFSIZE_TYPE
|
|
|
|
#define _READ_WRITE_BUFSIZE_TYPE int
|
|
|
|
#endif
|
2000-08-02 04:51:51 +08:00
|
|
|
|
2002-09-21 01:11:29 +08:00
|
|
|
#ifndef __WCHAR_MAX__
|
2003-05-10 05:38:31 +08:00
|
|
|
#if __INT_MAX__ == 32767 || defined (_WIN32)
|
2002-09-05 02:16:55 +08:00
|
|
|
#define __WCHAR_MAX__ 0xffffu
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2007-03-16 05:32:13 +08:00
|
|
|
/* See if small reent asked for at configuration time and
|
|
|
|
is not chosen by the platform by default. */
|
|
|
|
#ifdef _WANT_REENT_SMALL
|
|
|
|
#ifndef _REENT_SMALL
|
|
|
|
#define _REENT_SMALL
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2017-06-29 13:28:08 +08:00
|
|
|
#ifdef _WANT_REENT_GLOBAL_STDIO_STREAMS
|
|
|
|
#ifndef _REENT_GLOBAL_STDIO_STREAMS
|
|
|
|
#define _REENT_GLOBAL_STDIO_STREAMS
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2017-09-07 14:24:22 +08:00
|
|
|
#ifdef _WANT_USE_LONG_TIME_T
|
|
|
|
#ifndef _USE_LONG_TIME_T
|
|
|
|
#define _USE_LONG_TIME_T
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2021-12-01 05:11:32 +08:00
|
|
|
#ifdef _WANT_USE_GDTOA
|
|
|
|
#ifndef _USE_GDTOA
|
|
|
|
#define _USE_GDTOA
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2009-03-24 18:13:27 +08:00
|
|
|
/* If _MB_EXTENDED_CHARSETS_ALL is set, we want all of the extended
|
|
|
|
charsets. The extended charsets add a few functions and a couple
|
|
|
|
of tables of a few K each. */
|
|
|
|
#ifdef _MB_EXTENDED_CHARSETS_ALL
|
|
|
|
#define _MB_EXTENDED_CHARSETS_ISO 1
|
|
|
|
#define _MB_EXTENDED_CHARSETS_WINDOWS 1
|
|
|
|
#endif
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
#endif /* __SYS_CONFIG_H__ */
|