mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-28 10:00:23 +08:00
7d592bb178
Kazunori Asayama <asayama@sm.sony.co.jp> * configure.host: Enable SPU specific stdio directory. * libc/machine/spu/Makefile.am: Add objects. * libc/machine/spu/Makefile.in: Regenerated. * libc/machine/spu/c99ppe.h: Add macros and function declarations to initialize SPU specific stdio stuffs. * libc/machine/spu/stdio.c: Add functions to manage Cell SPU specific FILE structures. * libc/machine/spu/perror.c: Add initialization routine of stdio stuffs. * libc/machine/spu/printf.c: Ditto. * libc/machine/spu/putchar.c: Ditto. * libc/machine/spu/puts.c: Ditto. * libc/machine/spu/vprintf.c: Ditto. * libc/machine/spu/clearerr.c: New file. Add a stdio function implementation. * libc/machine/spu/feof.c: Ditto. * libc/machine/spu/ferror.c: Ditto. * libc/machine/spu/fileno.c: Ditto. * libc/machine/spu/fopen.c: Ditto. * libc/machine/spu/fclose.c: Ditto. * libc/machine/spu/freopen.c: Ditto. * libc/machine/spu/fflush.c: Ditto. * libc/machine/spu/fseek.c: Ditto. * libc/machine/spu/ftell.c: Ditto. * libc/machine/spu/rewind.c: Ditto. * libc/machine/spu/fgetpos.c: Ditto. * libc/machine/spu/fsetpos.c: Ditto. * libc/machine/spu/fread.c: Ditto. * libc/machine/spu/fwrite.c: Ditto. * libc/machine/spu/getc.c: Ditto. * libc/machine/spu/getchar.c: Ditto. * libc/machine/spu/gets.c: Ditto. * libc/machine/spu/fgetc.c: Ditto. * libc/machine/spu/fgets.c: Ditto. * libc/machine/spu/ungetc.c: Ditto. * libc/machine/spu/putc.c: Ditto. * libc/machine/spu/fputc.c: Ditto. * libc/machine/spu/fputs.c: Ditto. * libc/machine/spu/vfprintf.c: Ditto. * libc/machine/spu/vfscanf.c: Ditto. * libc/machine/spu/fprintf.c: Ditto. * libc/machine/spu/fscanf.c: Ditto. * libc/machine/spu/scanf.c: Ditto. * libc/machine/spu/vscanf.c: Ditto. * libc/machine/spu/setbuf.c: Ditto. * libc/machine/spu/setvbuf.c: Ditto. * libc/machine/spu/tmpfile.c: Ditto. 2007-02-01 Jeff Johnston <jjohnstn@redhat.com> * libc/include/sys/config.h[__SPU__]: Define __CUSTOM_FILE_IO__. * libc/include/stdio.h[!__CUSTOM_FILE_IO__]: Add flag check around stdio macros that manipulate fields in the normal file structure. * libc/include/sys/reent.h[__CUSTOM_FILE_IO__]: Include <sys/custom_file.h> to define custom FILE structure. * libc/include/sys/custom_file.h: New default header file that generates error if not overridden when __CUSTOM_FILE_IO__ set. * libc/machine/spu/sys/custom_file.h: New file.
206 lines
4.7 KiB
C
206 lines
4.7 KiB
C
#ifndef __SYS_CONFIG_H__
|
|
#define __SYS_CONFIG_H__
|
|
|
|
#include <machine/ieeefp.h> /* floating point macros */
|
|
|
|
/* exceptions first */
|
|
#if defined(__H8500__) || defined(__W65__)
|
|
#define __SMALL_BITFIELDS
|
|
/* ??? 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 */
|
|
#if defined(__Z8001__) || defined(__Z8002__) || defined(__H8500__) || defined(__W65__) || defined (__mn10200__) || defined (__AVR__)
|
|
|
|
#undef INT_MAX
|
|
#undef UINT_MAX
|
|
#define INT_MAX 32767
|
|
#define UINT_MAX 65535
|
|
#endif
|
|
|
|
#if defined (__H8300__) || defined (__H8300H__) || defined(__H8300S__) || defined (__H8300SX__)
|
|
#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
|
|
|
|
#ifdef __W65__
|
|
#define __SMALL_BITFIELDS
|
|
#endif
|
|
|
|
#if defined(__D10V__)
|
|
#define __SMALL_BITFIELDS
|
|
#undef INT_MAX
|
|
#undef UINT_MAX
|
|
#define INT_MAX __INT_MAX__
|
|
#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__
|
|
#define UINT_MAX (__INT_MAX__ * 2U + 1)
|
|
#define _POINTER_INT short
|
|
#endif
|
|
|
|
#ifdef ___AM29K__
|
|
#define _FLOAT_RET double
|
|
#endif
|
|
|
|
#ifdef __i386__
|
|
#ifndef __unix__
|
|
/* in other words, go32 */
|
|
#define _FLOAT_RET double
|
|
#endif
|
|
#if defined(__linux__) || defined(__RDOS__)
|
|
/* we want the reentrancy structure to be returned by a function */
|
|
#define __DYNAMIC_REENT__
|
|
#define HAVE_GETDATE
|
|
#define _HAVE_SYSTYPES
|
|
#define _READ_WRITE_RETURN_TYPE _ssize_t
|
|
#define __LARGE64_FILES 1
|
|
/* we use some glibc header files so turn on glibc large file feature */
|
|
#define _LARGEFILE64_SOURCE 1
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef __mn10200__
|
|
#define __SMALL_BITFIELDS
|
|
#endif
|
|
|
|
#ifdef __AVR__
|
|
#define __SMALL_BITFIELDS
|
|
#define _POINTER_INT short
|
|
#endif
|
|
|
|
#ifdef __v850
|
|
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__sda__))
|
|
#endif
|
|
|
|
/* For the PowerPC eabi, force the _impure_ptr to be in .sdata */
|
|
#if defined(__PPC__)
|
|
#if defined(_CALL_SYSV)
|
|
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
|
|
#endif
|
|
#ifdef __SPE__
|
|
#define _LONG_DOUBLE double
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef __mips__
|
|
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
|
|
#endif
|
|
|
|
#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
|
|
#define _REENT_SMALL
|
|
#endif
|
|
#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__ */
|
|
|
|
#ifdef __thumb2__
|
|
/* Thumb-2 based ARMv7M devices are really small. */
|
|
#define _REENT_SMALL
|
|
#endif
|
|
|
|
#ifdef __SPU__
|
|
#define MALLOC_ALIGNMENT 16
|
|
#define __CUSTOM_FILE_IO__
|
|
#endif
|
|
|
|
/* 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. */
|
|
|
|
#ifndef _POINTER_INT
|
|
#define _POINTER_INT long
|
|
#endif
|
|
|
|
#ifdef __frv__
|
|
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
|
|
#endif
|
|
#undef __RAND_MAX
|
|
#if __INT_MAX__ == 32767
|
|
#define __RAND_MAX 32767
|
|
#else
|
|
#define __RAND_MAX 0x7fffffff
|
|
#endif
|
|
|
|
#if defined(__CYGWIN__)
|
|
#include <cygwin/config.h>
|
|
#endif
|
|
|
|
#if defined(__rtems__)
|
|
#define __FILENAME_MAX__ 255
|
|
#define _READ_WRITE_RETURN_TYPE _ssize_t
|
|
#endif
|
|
|
|
#ifndef __IMPORT
|
|
#define __IMPORT
|
|
#endif
|
|
|
|
/* 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
|
|
|
|
#ifndef __WCHAR_MAX__
|
|
#if __INT_MAX__ == 32767 || defined (_WIN32)
|
|
#define __WCHAR_MAX__ 0xffffu
|
|
#endif
|
|
#endif
|
|
|
|
#endif /* __SYS_CONFIG_H__ */
|