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 */
|
|
|
|
|
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 */
|
2002-12-17 06:35:32 +08:00
|
|
|
#if defined(__Z8001__) || defined(__Z8002__) || defined(__H8500__) || defined(__W65__) || 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
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
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
|
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
|
|
|
#ifdef __linux__
|
|
|
|
/* 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
|
|
|
|
#define _HAVE_SYSTYPES
|
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
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
#ifdef __v850
|
|
|
|
#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
|
|
|
|
|
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
|
|
|
|
|
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
|
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
|
|
|
|
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
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
#endif /* __SYS_CONFIG_H__ */
|