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
path: root/newlib
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2007-09-19 00:05:17 +0400
committerJeff Johnston <jjohnstn@redhat.com>2007-09-19 00:05:17 +0400
commitcebf33e402b40e7be33fbb7ae50e97713685a0ad (patch)
tree80058df61c530ed3f314b44aa4d3c794665ff341 /newlib
parent3908c985922d653fa47775dfbf5d2d29ff7c4fa0 (diff)
2007-09-18 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/sys/types.h: Use __dev_t, __uid_t, and __gid_t to typedef dev_t, gid_t, and uid_t. * libc/include/sys/_types.h: Move previous dev_t, uid_t and gid_t types.h code to here, but typedef __dev_t, __uid_t, and __gid_t instead. Change to lower case for all __foo_t_defined names. * libc/machine/spu/machine/_types.h: Add SPU specific __dev_t, __uid_t, and __gid_t making them all four bytes. Change to lower case for all __foo_t_defined names.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog11
-rw-r--r--newlib/libc/include/sys/_types.h32
-rw-r--r--newlib/libc/include/sys/types.h17
-rw-r--r--newlib/libc/machine/spu/machine/_types.h12
4 files changed, 49 insertions, 23 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index a8251b891..e46b44ce1 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,14 @@
+2007-09-18 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/include/sys/types.h: Use __dev_t, __uid_t, and __gid_t to
+ typedef dev_t, gid_t, and uid_t.
+ * libc/include/sys/_types.h: Move previous dev_t, uid_t and gid_t
+ types.h code to here, but typedef __dev_t, __uid_t, and __gid_t instead.
+ Change to lower case for all __foo_t_defined names.
+ * libc/machine/spu/machine/_types.h: Add SPU specific __dev_t,
+ __uid_t, and __gid_t making them all four bytes. Change to lower case
+ for all __foo_t_defined names.
+
2007-09-18 Jeff Johnston <jjohnstn@redhat.com>
* libc/reent/renamer.c: New file.
diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index 5a5dc1938..25252ed83 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -12,11 +12,27 @@
#include <machine/_types.h>
#include <sys/lock.h>
-#ifndef __OFF_T_DEFINED
+#ifndef __off_t_defined
typedef long _off_t;
#endif
-#ifndef __OFF64_T_DEFINED
+#if defined(__rtems__)
+/* device numbers are 32-bit major and and 32-bit minor */
+typedef unsigned long long __dev_t;
+#else
+#ifndef __dev_t_defined
+typedef short __dev_t;
+#endif
+#endif
+
+#ifndef __uid_t_defined
+typedef unsigned short __uid_t;
+#endif
+#ifndef __gid_t_defined
+typedef unsigned short __gid_t;
+#endif
+
+#ifndef __off64_t_defined
__extension__ typedef long long _off64_t;
#endif
@@ -24,18 +40,18 @@ __extension__ typedef long long _off64_t;
* We need fpos_t for the following, but it doesn't have a leading "_",
* so we use _fpos_t instead.
*/
-#ifndef __FPOS_T_DEFINED
+#ifndef __fpos_t_defined
typedef long _fpos_t; /* XXX must match off_t in <sys/types.h> */
/* (and must be `long' for now) */
#endif
#ifdef __LARGE64_FILES
-#ifndef __FPOS64_T_DEFINED
+#ifndef __fpos64_t_defined
typedef _off64_t _fpos64_t;
#endif
#endif
-#ifndef __SSIZE_T_DEFINED
+#ifndef __ssize_t_defined
#if defined(__INT_MAX__) && __INT_MAX__ == 2147483647
typedef int _ssize_t;
#else
@@ -46,7 +62,7 @@ typedef long _ssize_t;
#define __need_wint_t
#include <stddef.h>
-#ifndef __MBSTATE_T_DEFINED
+#ifndef __mbstate_t_defined
/* Conversion state information. */
typedef struct
{
@@ -59,11 +75,11 @@ typedef struct
} _mbstate_t;
#endif
-#ifndef __FLOCK_T_DEFINED
+#ifndef __flock_t_defined
typedef _LOCK_RECURSIVE_T _flock_t;
#endif
-#ifndef __ICONV_T_DEFINED
+#ifndef __iconv_t_defined
/* Iconv descriptor type */
typedef void *_iconv_t;
#endif
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index c8b5d9453..1813bdda8 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -158,20 +158,11 @@ typedef int32_t register_t;
* how the file was compiled (e.g. -mint16 vs -mint32, etc.).
*/
-#if defined(__rtems__)
-/* device numbers are 32-bit major and and 32-bit minor */
-typedef unsigned long long dev_t;
-#else
-#ifndef __CYGWIN__
-typedef short dev_t;
-#endif
-#endif
-
#ifndef __CYGWIN__ /* which defines these types in it's own types.h. */
-typedef long off_t;
-
-typedef unsigned short uid_t;
-typedef unsigned short gid_t;
+typedef _off_t off_t;
+typedef __dev_t dev_t;
+typedef __uid_t uid_t;
+typedef __gid_t gid_t;
#endif
typedef int pid_t;
diff --git a/newlib/libc/machine/spu/machine/_types.h b/newlib/libc/machine/spu/machine/_types.h
index a3950f5fd..d58c617a8 100644
--- a/newlib/libc/machine/spu/machine/_types.h
+++ b/newlib/libc/machine/spu/machine/_types.h
@@ -39,14 +39,22 @@
/*
* fpos_t large enough for either 32 or 64 bit ppc glibc fpos_t.
*/
-#define __FPOS_T_DEFINED
+#define __fpos_t_defined
typedef struct {
char __pos[16];
} _fpos_t;
#ifdef __LARGE64_FILES
-#define __FPOS64_T_DEFINED
+#define __fpos64_t_defined
typedef _fpos_t _fpos64_t;
#endif
+#define __dev_t_defined
+typedef int __dev_t;
+
+#define __uid_t_defined
+typedef unsigned int __uid_t;
+#define __gid_t_defined
+typedef unsigned int __gid_t;
+
#endif /* _MACHINE__TYPES_H */