MN10300: Fix size_t and ssize_t
authorDavid Howells <dhowells@redhat.com>
Thu, 12 Aug 2010 15:54:41 +0000 (16:54 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Aug 2010 16:51:35 +0000 (09:51 -0700)
With the newer compilers, size_t and ssize_t are expected to be (un)signed int
rather than (un)signed long.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/mn10300/include/asm/posix_types.h

index 077567c37798c2a66d9e39d59273bdec7ea38212..56ffbc1587986d5a7dd9ded3e5541a41d4c989a9 100644 (file)
@@ -25,8 +25,13 @@ typedef int          __kernel_pid_t;
 typedef unsigned short __kernel_ipc_pid_t;
 typedef unsigned short __kernel_uid_t;
 typedef unsigned short __kernel_gid_t;
 typedef unsigned short __kernel_ipc_pid_t;
 typedef unsigned short __kernel_uid_t;
 typedef unsigned short __kernel_gid_t;
+#if __GNUC__ == 4
+typedef unsigned int   __kernel_size_t;
+typedef signed int     __kernel_ssize_t;
+#else
 typedef unsigned long  __kernel_size_t;
 typedef unsigned long  __kernel_size_t;
-typedef long           __kernel_ssize_t;
+typedef signed long    __kernel_ssize_t;
+#endif
 typedef int            __kernel_ptrdiff_t;
 typedef long           __kernel_time_t;
 typedef long           __kernel_suseconds_t;
 typedef int            __kernel_ptrdiff_t;
 typedef long           __kernel_time_t;
 typedef long           __kernel_suseconds_t;