This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH] SPU use 4 bytes for uid_t, gid_t and dev_t
- From: Patrick Mansfield <patmans at us dot ibm dot com>
- To: newlib at sourceware dot org, Jeff Johnston <jjohnstn at redhat dot com>
- Date: Wed, 5 Sep 2007 09:29:22 -0700
- Subject: [PATCH] SPU use 4 bytes for uid_t, gid_t and dev_t
For SPU, use 4 bytes for uid_t and gid_t.
Use 4 bytes for dev_t to match the linux kernel dev_t size, though glibc
uses 8 bytes, we want to keep our assist call ABI the same for now (in
jsre_stat and mknod), and only the low 32 bits of dev are used in
glibc.
newlib ChangeLog:
2007-09-05 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/sys/types.h: For SPU, use 4 byte uid_t and gid_t,
and 4 byte dev_t.
Index: src/newlib/libc/include/sys/types.h
===================================================================
--- src.orig/newlib/libc/include/sys/types.h
+++ src/newlib/libc/include/sys/types.h
@@ -161,6 +161,8 @@ typedef int32_t register_t;
#if defined(__rtems__)
/* device numbers are 32-bit major and and 32-bit minor */
typedef unsigned long long dev_t;
+#elif defined(__SPU__)
+typedef unsigned dev_t;
#else
#ifndef __CYGWIN__
typedef short dev_t;
@@ -170,9 +172,14 @@ typedef short dev_t;
#ifndef __CYGWIN__ /* which defines these types in it's own types.h. */
typedef long off_t;
+#ifdef __SPU__
+typedef unsigned int uid_t;
+typedef unsigned int gid_t;
+#else
typedef unsigned short uid_t;
typedef unsigned short gid_t;
#endif
+#endif
typedef int pid_t;
#ifndef __CYGWIN__