From 175f6f670de99b6aa0e866df24a792444586ff0d Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sun, 18 Aug 2002 21:08:34 +0000 Subject: Directly use kernel types for uid_t, gid_t, and dev_t to avoid the need to translate these entities... -Erik --- libc/sysdeps/linux/alpha/bits/types.h | 15 ++++++++++++--- libc/sysdeps/linux/common/bits/types.h | 15 ++++++++++++--- libc/sysdeps/linux/mips/bits/types.h | 17 ++++++++++++----- libc/sysdeps/linux/powerpc/bits/types.h | 15 ++++++++++++--- libc/sysdeps/linux/sparc/bits/types.h | 15 ++++++++++++--- 5 files changed, 60 insertions(+), 17 deletions(-) (limited to 'libc') diff --git a/libc/sysdeps/linux/alpha/bits/types.h b/libc/sysdeps/linux/alpha/bits/types.h index 1b809e235..569e5a81a 100644 --- a/libc/sysdeps/linux/alpha/bits/types.h +++ b/libc/sysdeps/linux/alpha/bits/types.h @@ -28,6 +28,15 @@ #define __need_size_t #include +/* Sigh. We need to carefully wrap this one... */ +#ifndef __GLIBC__ +#define __GLIBC__ 2 +#include +#undef __GLIBC__ +#else +#include +#endif + /* Convenience types. */ typedef unsigned char __u_char; typedef unsigned short int __u_short; @@ -45,9 +54,9 @@ typedef signed long int __int64_t; typedef unsigned long int __uint64_t; typedef __quad_t *__qaddr_t; -typedef __uint64_t __dev_t; /* Type of device numbers. */ -typedef __uint32_t __uid_t; /* Type of user identifications. */ -typedef __uint32_t __gid_t; /* Type of group identifications. */ +typedef __kernel_dev_t __dev_t; /* Type of device numbers. */ +typedef __kernel_uid_t __uid_t; /* Type of user identifications. */ +typedef __kernel_gid_t __gid_t; /* Type of group identifications. */ typedef __uint32_t __ino_t; /* Type of file serial numbers. */ typedef __uint64_t __ino64_t; /* "" (LFS) */ typedef __uint32_t __mode_t; /* Type of file attribute bitmasks. */ diff --git a/libc/sysdeps/linux/common/bits/types.h b/libc/sysdeps/linux/common/bits/types.h index 839455392..88126cca3 100644 --- a/libc/sysdeps/linux/common/bits/types.h +++ b/libc/sysdeps/linux/common/bits/types.h @@ -28,6 +28,15 @@ #define __need_size_t #include +/* Sigh. We need to carefully wrap this one... */ +#ifndef __GLIBC__ +#define __GLIBC__ 2 +#include +#undef __GLIBC__ +#else +#include +#endif + /* Convenience types. */ typedef unsigned char __u_char; typedef unsigned short __u_short; @@ -58,9 +67,9 @@ __extension__ typedef unsigned long long int __uint64_t; #endif typedef __quad_t *__qaddr_t; -typedef __u_quad_t __dev_t; /* Type of device numbers. */ -typedef __u_int __uid_t; /* Type of user identifications. */ -typedef __u_int __gid_t; /* Type of group identifications. */ +typedef __kernel_dev_t __dev_t; /* Type of device numbers. */ +typedef __kernel_uid_t __uid_t; /* Type of user identifications. */ +typedef __kernel_gid_t __gid_t; /* Type of group identifications. */ typedef __u_long __ino_t; /* Type of file serial numbers. */ typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ typedef __u_int __nlink_t; /* Type of file link counts. */ diff --git a/libc/sysdeps/linux/mips/bits/types.h b/libc/sysdeps/linux/mips/bits/types.h index 5ace8a8a7..8a05d1857 100644 --- a/libc/sysdeps/linux/mips/bits/types.h +++ b/libc/sysdeps/linux/mips/bits/types.h @@ -28,6 +28,15 @@ #define __need_size_t #include +/* Sigh. We need to carefully wrap this one... */ +#ifndef __GLIBC__ +#define __GLIBC__ 2 +#include +#undef __GLIBC__ +#else +#include +#endif + /* Convenience types. */ typedef unsigned char __u_char; typedef unsigned short __u_short; @@ -59,11 +68,9 @@ __extension__ typedef unsigned long long int __uint64_t; typedef __quad_t *__qaddr_t; /* changed to be more compatible with kernel */ -/*typedef __u_quad_t __dev_t;*/ /* Type of device numbers. */ -typedef __u_int __dev_t; /* Type of device numbers. */ - -typedef __u_int __uid_t; /* Type of user identifications. */ -typedef __u_int __gid_t; /* Type of group identifications. */ +typedef __kernel_dev_t __dev_t; /* Type of device numbers. */ +typedef __kernel_uid_t __uid_t; /* Type of user identifications. */ +typedef __kernel_gid_t __gid_t; /* Type of group identifications. */ typedef __u_long __ino_t; /* Type of file serial numbers. */ typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ typedef __u_int __nlink_t; /* Type of file link counts. */ diff --git a/libc/sysdeps/linux/powerpc/bits/types.h b/libc/sysdeps/linux/powerpc/bits/types.h index 74358469b..144ffb32a 100644 --- a/libc/sysdeps/linux/powerpc/bits/types.h +++ b/libc/sysdeps/linux/powerpc/bits/types.h @@ -28,6 +28,15 @@ #define __need_size_t #include +/* Sigh. We need to carefully wrap this one... */ +#ifndef __GLIBC__ +#define __GLIBC__ 2 +#include +#undef __GLIBC__ +#else +#include +#endif + /* Convenience types. */ typedef unsigned char __u_char; typedef unsigned short __u_short; @@ -60,9 +69,9 @@ typedef __quad_t *__qaddr_t; /* These types are modified from glibc to be * more compatible with the Linux kernel. */ -typedef __u_int __dev_t; /* Type of device numbers. */ -typedef __u_int __uid_t; /* Type of user identifications. */ -typedef __u_int __gid_t; /* Type of group identifications. */ +typedef __kernel_dev_t __dev_t; /* Type of device numbers. */ +typedef __kernel_uid_t __uid_t; /* Type of user identifications. */ +typedef __kernel_gid_t __gid_t; /* Type of group identifications. */ typedef __u_int __ino_t; /* Type of file serial numbers. */ typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ typedef __u_short __nlink_t; /* Type of file link counts. */ diff --git a/libc/sysdeps/linux/sparc/bits/types.h b/libc/sysdeps/linux/sparc/bits/types.h index 0d357a930..1530931b6 100644 --- a/libc/sysdeps/linux/sparc/bits/types.h +++ b/libc/sysdeps/linux/sparc/bits/types.h @@ -29,6 +29,15 @@ #include #include +/* Sigh. We need to carefully wrap this one... */ +#ifndef __GLIBC__ +#define __GLIBC__ 2 +#include +#undef __GLIBC__ +#else +#include +#endif + /* Convenience types. */ typedef unsigned char __u_char; typedef unsigned short int __u_short; @@ -69,9 +78,9 @@ __extension__ typedef unsigned long long int __uint64_t; #endif typedef __quad_t *__qaddr_t; -typedef __u_quad_t __dev_t; /* Type of device numbers. */ -typedef __u_int __uid_t; /* Type of user identifications. */ -typedef __u_int __gid_t; /* Type of group identifications. */ +typedef __kernel_dev_t __dev_t; /* Type of device numbers. */ +typedef __kernel_uid_t __uid_t; /* Type of user identifications. */ +typedef __kernel_gid_t __gid_t; /* Type of group identifications. */ typedef __u_long __ino_t; /* Type of file serial numbers. */ typedef __u_quad_t __ino64_t; /* Type of file serial numbers. */ typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ -- cgit v1.2.3