2000-02-18 03:39:52 +08:00
|
|
|
#ifndef __SYS_CONFIG_H__
|
|
|
|
#define __SYS_CONFIG_H__
|
|
|
|
|
|
|
|
/* exceptions first */
|
|
|
|
/* ??? Why is much of this stuff duplicated with machine/ieeefp.h? */
|
|
|
|
#if defined(__H8300__) || defined(__H8500__) || defined (__H8300H__) || defined(__W65__) || defined (__H8300S__)
|
|
|
|
#define _FLOAT_ARG float
|
|
|
|
#define __SMALL_BITFIELDS
|
|
|
|
#define _DOUBLE_IS_32BITS
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
/* ??? 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
|
|
|
|
|
|
|
|
#ifdef __W65__
|
|
|
|
#define _DOUBLE_IS_32BITS
|
|
|
|
#define __SMALL_BITFIELDS
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#undef INT_MAX
|
|
|
|
#undef UINT_MAX
|
|
|
|
#define INT_MAX 32767
|
|
|
|
#define UINT_MAX 65535
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* 16 bit integer machines */
|
2000-06-28 03:51:33 +08:00
|
|
|
#if defined(__Z8001__) || defined(__Z8002__) || defined(__H8300__) || defined(__H8500__) || defined(__W65__) || defined (__H8300H__) || defined (__H8300S__) || defined (__mn10200__) || defined (__AVR__)
|
2000-02-18 03:39:52 +08:00
|
|
|
|
|
|
|
#undef INT_MAX
|
|
|
|
#undef UINT_MAX
|
|
|
|
#define INT_MAX 32767
|
|
|
|
#define UINT_MAX 65535
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__D10V__)
|
|
|
|
#undef INT_MAX
|
|
|
|
#undef UINT_MAX
|
|
|
|
#define INT_MAX __INT_MAX__
|
|
|
|
#define UINT_MAX (__INT_MAX__ * 2U + 1)
|
2002-01-08 03:33:23 +08:00
|
|
|
#if __DOUBLE__ == 32
|
2000-02-18 03:39:52 +08:00
|
|
|
#define _DOUBLE_IS_32BITS
|
2002-01-08 03:33:23 +08:00
|
|
|
#endif
|
2000-02-18 03:39:52 +08:00
|
|
|
#define _POINTER_INT short
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef ___AM29K__
|
|
|
|
#define _FLOAT_RET double
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __i386__
|
|
|
|
#ifndef __unix__
|
|
|
|
/* in other words, go32 */
|
|
|
|
#define _FLOAT_RET double
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __M32R__
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __m68k__
|
|
|
|
/* This is defined in machine/ieeefp.h; need to check is it redundant here? */
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __mn10300__
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __mn10200__
|
|
|
|
#define _DOUBLE_IS_32BITS
|
|
|
|
#define __SMALL_BITFIELDS
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
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
|
|
|
#ifdef __MMIX__
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
2000-06-28 03:51:33 +08:00
|
|
|
#ifdef __AVR__
|
|
|
|
#define _DOUBLE_IS_32BITS
|
|
|
|
#define __SMALL_BITFIELDS
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#define _POINTER_INT short
|
|
|
|
#endif
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
#ifdef __TIC80__
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __v850
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__sda__))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __D30V__
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* For the PowerPC eabi, force the _impure_ptr to be in .sdata */
|
|
|
|
#if defined(__PPC__) && defined(_CALL_SYSV)
|
|
|
|
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __sparc__
|
|
|
|
#ifdef __LITTLE_ENDIAN_DATA__
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#else
|
|
|
|
#define __IEEE_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2001-12-23 06:47:58 +08:00
|
|
|
#ifdef __xstormy16__
|
|
|
|
#define __IEEE_LITTLE_ENDIAN
|
|
|
|
#define __SMALL_BITFIELDS
|
|
|
|
#undef INT_MAX
|
|
|
|
#undef UINT_MAX
|
|
|
|
#define INT_MAX __INT_MAX__
|
|
|
|
#define UINT_MAX (__INT_MAX__ * 2U + 1)
|
|
|
|
#define SIZE_T_SMALLER_THAN_LONG
|
|
|
|
#define MALLOC_ALIGNMENT 8
|
|
|
|
#define _POINTER_INT short
|
|
|
|
#define __BUFSIZ__ 16
|
|
|
|
#endif
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
#if INT_MAX == 32767
|
|
|
|
typedef long int __int32_t;
|
|
|
|
typedef unsigned long int __uint32_t;
|
|
|
|
#else
|
|
|
|
typedef int __int32_t;
|
|
|
|
typedef unsigned int __uint32_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _POINTER_INT
|
|
|
|
#define _POINTER_INT long
|
|
|
|
#endif
|
|
|
|
|
2000-06-09 09:13:36 +08:00
|
|
|
#undef __RAND_MAX
|
|
|
|
#if INT_MAX == 32767
|
|
|
|
#define __RAND_MAX 32767
|
|
|
|
#else
|
|
|
|
#define __RAND_MAX 0x7fffffff
|
|
|
|
#endif
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2000-08-02 04:51:51 +08:00
|
|
|
|
|
|
|
#if defined(__CYGWIN32__) || defined(__CYGWIN__)
|
2001-02-01 04:11:48 +08:00
|
|
|
#define __FILENAME_MAX__ (260 - 1 /* NUL */)
|
2001-08-30 03:47:43 +08:00
|
|
|
#define _READ_WRITE_RETURN_TYPE _ssize_t
|
2000-08-02 04:51:51 +08:00
|
|
|
#if defined(__INSIDE_CYGWIN__) || defined(_COMPILING_NEWLIB)
|
|
|
|
#define __IMPORT
|
|
|
|
#else
|
|
|
|
#define __IMPORT __declspec(dllimport)
|
|
|
|
#endif
|
|
|
|
#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
|
2001-02-01 04:11:48 +08:00
|
|
|
#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
|
2000-08-02 04:51:51 +08:00
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
#endif /* __SYS_CONFIG_H__ */
|