* libc/include/sys/types.h: Add _mode_t for __rtems__.

* libc/sys/rtems/machine/_types.h: Provide _mode_t, _fpos_t, _off_t.
	Add _ssize_t for 64bit sparc.
	Let arm, i386, m68k, mips, PPC, sparc use 64bit _off_t, _fpos_t.
This commit is contained in:
Corinna Vinschen 2010-11-16 17:29:39 +00:00
parent 4a20b7de18
commit f43dea8084
3 changed files with 35 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2010-11-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/include/sys/types.h: Add _mode_t for __rtems__.
* libc/sys/rtems/machine/_types.h: Provide _mode_t, _fpos_t, _off_t.
Add _ssize_t for 64bit sparc.
Let arm, i386, m68k, mips, PPC, sparc use 64bit _off_t, _fpos_t.
2010-11-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.host: Add -D_COMPILING_NEWLIB to newlib_cflags.

View File

@ -171,12 +171,16 @@ typedef signed char pid_t;
typedef int pid_t;
#endif
#if defined(__rtems__)
typedef _mode_t mode_t;
#endif
#ifndef __CYGWIN__
typedef long key_t;
#endif
typedef _ssize_t ssize_t;
#ifndef __CYGWIN__
#if !defined(__CYGWIN__) && !defined(__rtems__)
#ifdef __MS_types__
typedef char * addr_t;
typedef int mode_t;

View File

@ -20,6 +20,9 @@ typedef signed int _ssize_t;
typedef long signed int _ssize_t;
#endif
#define __ssize_t_defined 1
#elif defined(__sparc__) && defined(__LP64__)
typedef long signed int _ssize_t;
#define __ssize_t_defined 1
#elif defined(__AVR__) || defined(__lm32__) || defined(__m32c__) || defined(__mips__) || defined(__moxie__) || defined(__PPC__) || defined(__sparc__) || defined(__sh__)
typedef signed int _ssize_t;
#define __ssize_t_defined 1
@ -31,4 +34,24 @@ typedef signed int _ssize_t;
typedef __int32_t blksize_t;
typedef __int32_t blkcnt_t;
#if defined(__arm__) || defined(__i386__) || defined(__m68k__) || defined(__mips__) || defined(__PPC__) || defined(__sparc__)
/* Use 64bit types */
typedef __int64_t _off_t;
#define __off_t_defined 1
typedef __int64_t _fpos_t;
#define __fpos_t_defined 1
#else
/* Use 32bit types */
typedef __int32_t _off_t;
#define __off_t_defined 1
typedef __int32_t _fpos_t;
#define __fpos_t_defined 1
#endif
typedef __uint32_t _mode_t;
#define __mode_t_defined 1
#endif