[PATCH 2/6] MN10300: Fix size_t and ssize_t

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Howells
Date: Thursday, August 12, 2010 - 8:54 am

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>
---

 arch/mn10300/include/asm/posix_types.h |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)


diff --git a/arch/mn10300/include/asm/posix_types.h b/arch/mn10300/include/asm/posix_types.h
index 077567c..56ffbc1 100644
--- a/arch/mn10300/include/asm/posix_types.h
+++ b/arch/mn10300/include/asm/posix_types.h
@@ -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;
+#if __GNUC__ == 4
+typedef unsigned int	__kernel_size_t;
+typedef signed int	__kernel_ssize_t;
+#else
 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;

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/6] MN10300: Fix RTC routines, David Howells, (Thu Aug 12, 8:54 am)
[PATCH 2/6] MN10300: Fix size_t and ssize_t, David Howells, (Thu Aug 12, 8:54 am)
[PATCH 3/6] MN10300: Permit .GCC-command-line sections, David Howells, (Thu Aug 12, 8:54 am)