Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2002-08-20 05:40:39 +0400
committerJeff Johnston <jjohnstn@redhat.com>2002-08-20 05:40:39 +0400
commit64b5e8f2bb484a768505192ff9aa8ea07bf8fad8 (patch)
tree9b587f294a82f21b1c0e3cdb347f2cda41405fb7 /newlib/libc/include
parent9a5498d08b68be7f349b698fc413da83dc78532c (diff)
2002-08-19 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/types.h: Support __need_inttypes macro that only sets the __intxx and __uintxx types. * libc/machine/powerpc/Makefile.am: Add stdlib to include directories to get mprec.h. * libc/machine/powerpc/Makefile.in: Regenerated. * libc/machine/powerpc/vfprintf.c: Fix state variable type. * libc/machine/powerpc/vfscanf.c: Fix state variable type. Remove redundant fixed-point conversion prototypes. * libc/machine/powerpc/machine/stdlib.h[__SPE__]: Include <sys/types.h> after setting __need_inttypes.
Diffstat (limited to 'newlib/libc/include')
-rw-r--r--newlib/libc/include/sys/types.h49
1 files changed, 30 insertions, 19 deletions
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index c562a23b4..78b3f552b 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -16,9 +16,34 @@
*/
#ifndef _SYS_TYPES_H
-#define _SYS_TYPES_H
#include <_ansi.h>
+
+#ifndef __INTTYPES_DEFINED__
+#define __INTTYPES_DEFINED__
+typedef short int __int16_t;
+typedef unsigned short int __uint16_t;
+
+#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
+
+#if __LONG_MAX__ > 2147483647 || !defined(__GNUC__)
+typedef long int __int64_t;
+typedef unsigned long int __uint64_t;
+#else
+__extension__ typedef long long __int64_t;
+__extension__ typedef unsigned long long __uint64_t;
+#endif
+#endif /* ! __INTTYPES_DEFINED */
+
+#ifndef __need_inttypes
+
+#define _SYS_TYPES_H
#include <sys/_types.h>
#if defined (_WIN32) || defined (__CYGWIN__)
@@ -100,24 +125,6 @@ typedef unsigned short ino_t;
#endif
#endif
-typedef short int __int16_t;
-typedef unsigned short int __uint16_t;
-
-#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
-
-#if __LONG_MAX__ > 2147483647 || !defined(__GNUC__)
-typedef long int __int64_t;
-typedef unsigned long int __uint64_t;
-#else
-__extension__ typedef long long __int64_t;
-__extension__ typedef unsigned long long __uint64_t;
-#endif
#ifdef __MS_types__
typedef unsigned long vm_offset_t;
@@ -360,4 +367,8 @@ typedef struct {
#endif /* defined(__rtems__) */
+#endif /* !__need_inttypes */
+
+#undef __need_inttypes
+
#endif /* _SYS_TYPES_H */