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.
This commit is contained in:
Jeff Johnston 2007-09-18 20:05:17 +00:00
parent 3908c98592
commit cebf33e402
4 changed files with 49 additions and 23 deletions

View File

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

View File

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

View File

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

View File

@ -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 */