mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-15 02:09:19 +08:00
dee5139131
* configure.host(stdio64_dir): New setting that is used to enable building of new stdio64 directory. * libc/Makefile.am[HAVE_STDIO64_DIR]: Add support for large files. (stmp-stdio64,stdio64.texi): New targets to optionally add in stdio64 info to info files. * libc/Makefile.in: Regenerated. * libc/configure: Ditto. * libc/configure.in: Add configuration variables that are set when stdio64 is selected as subdir in configure.host. * libc/libc.texinfo: Add optional menu item for Stdio64, based on whether STDIO64 flag is set or not. * libc/sys.tex: Add optional stdio64 syscalls based on whether STDIO64 flag is set or not. * libc/include/reent.h[__LARGE64_FILES]: Add new stdio64 _r sycall routines. * libc/include/stdio.h[__LARGE64_FILES]: Add new stdio64 prototypes. (FILE): Typedef'd to __FILE instead of struct __sFILE directly. (__SL64): New file flag indicating file is opened via fopen64. * libc/include/sys/_types.h(_off64_t): Added. * libc/include/sys/config.h: For x86-linux, define __LARGE64_FILES. * libc/include/sys/reent.h(struct __sFILE64): New file structure for 64-bit offset large file support. (__FILE): New intermediate type either set to struct __sFILE64 or struct __sFILE, depending on whether __LARGE64_FILES is set or not. * libc/reent/Makefile.am[HAVE_STDIO64_DIR]: Add new files. * libc/reent/Makefile.in: Regenerated. * libc/reent/fstat64r.c: New file. * libc/reent/lseek64r.c: Ditto. * libc/reent/open64r.c: Ditto. * libc/reent/reent.tex: Optionally add stdio64 reentrant syscalls based on whether STDIO64 flag is set. * libc/stdio/stdio.tex: Add blank line. * libc/stdio64/Makefile.am: New file. * libc/stdio64/Makefile.in: Ditto. * libc/stdio64/fgetpos64.c: Ditto. * libc/stdio64/fopen64.: Ditto. * libc/stdio64/freopen64.c: Ditto. * libc/stdio64/fseeko64.c: Ditto. * libc/stdio64/fsetpos64.c: Ditto. * libc/stdio64/ftello64.c: Ditto. * libc/stdio64/local64.h: Ditto. * libc/stdio64/stdio64.c: Ditto. * libc/stdio64/stdio64.tex: Ditto. * libc/stdio64/tmpfile64.c: Ditto. * libc/sys/linux/io64.c: Add weak aliases for lseek64, fstat64, and open64.
157 lines
3.8 KiB
C
157 lines
3.8 KiB
C
#ifndef __SYS_CONFIG_H__
|
|
#define __SYS_CONFIG_H__
|
|
|
|
#include <machine/ieeefp.h> /* floating point macros */
|
|
|
|
/* exceptions first */
|
|
#if defined(__H8300__) || defined(__H8500__) || defined (__H8300H__) || defined(__W65__) || defined (__H8300S__)
|
|
#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(__H8300__) || defined(__H8500__) || defined(__W65__) || defined (__H8300H__) || defined (__H8300S__) || defined (__mn10200__) || defined (__AVR__)
|
|
|
|
#undef INT_MAX
|
|
#undef UINT_MAX
|
|
#define INT_MAX 32767
|
|
#define UINT_MAX 65535
|
|
#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
|
|
|
|
#ifdef ___AM29K__
|
|
#define _FLOAT_RET double
|
|
#endif
|
|
|
|
#ifdef __i386__
|
|
#ifndef __unix__
|
|
/* in other words, go32 */
|
|
#define _FLOAT_RET double
|
|
#endif
|
|
#ifdef __linux__
|
|
/* 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
|
|
#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
|
|
#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 SIZE_T_SMALLER_THAN_LONG
|
|
#define MALLOC_ALIGNMENT 8
|
|
#define _POINTER_INT short
|
|
#define __BUFSIZ__ 16
|
|
#define _REENT_SMALL
|
|
#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(__CYGWIN32__) || defined(__CYGWIN__)
|
|
#define __FILENAME_MAX__ (260 - 1 /* NUL */)
|
|
#define _READ_WRITE_RETURN_TYPE _ssize_t
|
|
#if defined(__INSIDE_CYGWIN__) || defined(_COMPILING_NEWLIB)
|
|
#define __IMPORT
|
|
#else
|
|
#define __IMPORT __declspec(dllimport)
|
|
#endif
|
|
#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
|
|
|
|
#endif /* __SYS_CONFIG_H__ */
|