aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/gnu
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-01-06 22:07:28 +0000
committerUlrich Drepper <drepper@redhat.com>1997-01-06 22:07:28 +0000
commitdf4ef2ab9c0899b2670067cd97e58f7eb2913e00 (patch)
tree4cb343b5ba9ccdc9c0b96144412567b6a4eda0ee /sysdeps/unix/sysv/linux/gnu
parent6f9e7002f38ae778b3ff2f586a3e5766382228e9 (diff)
downloadglibc-df4ef2ab9c0899b2670067cd97e58f7eb2913e00.tar
glibc-df4ef2ab9c0899b2670067cd97e58f7eb2913e00.tar.gz
glibc-df4ef2ab9c0899b2670067cd97e58f7eb2913e00.tar.bz2
glibc-df4ef2ab9c0899b2670067cd97e58f7eb2913e00.zip
update from main archive 960105cvs/libc-970107cvs/libc-970106
Diffstat (limited to 'sysdeps/unix/sysv/linux/gnu')
-rw-r--r--sysdeps/unix/sysv/linux/gnu/types.h78
1 files changed, 45 insertions, 33 deletions
diff --git a/sysdeps/unix/sysv/linux/gnu/types.h b/sysdeps/unix/sysv/linux/gnu/types.h
index 3212a85d96..872fc4e557 100644
--- a/sysdeps/unix/sysv/linux/gnu/types.h
+++ b/sysdeps/unix/sysv/linux/gnu/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,9 +21,6 @@
#include <features.h>
-/* Get actual type definitions for architecture from kernel headers. */
-#include <linux/types.h>
-
/* Convenience types. */
typedef unsigned char __u_char;
typedef unsigned short __u_short;
@@ -32,46 +29,61 @@ typedef unsigned long __u_long;
#ifdef __GNUC__
typedef unsigned long long int __u_quad_t;
typedef long long int __quad_t;
-typedef __quad_t *__qaddr_t;
#else
typedef struct
-{
- long val[2];
-} __quad_t;
+ {
+ long int __val[2];
+ } __quad_t;
typedef struct
-{
- __u_long val[2];
-} __u_quad_t;
+ {
+ __u_long __val[2];
+ } __u_quad_t;
#endif
+typedef __quad_t *__qaddr_t;
-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 __kernel_ino_t __ino_t; /* Type of file serial numbers. */
-typedef __kernel_mode_t __mode_t; /* Type of file attribute bitmasks. */
-typedef __kernel_nlink_t __nlink_t; /* Type of file link counts. */
-typedef __kernel_off_t __off_t; /* Type of file sizes and offsets. */
-typedef __kernel_loff_t __loff_t; /* Type of file sizes and offsets. */
-typedef __kernel_pid_t __pid_t; /* Type of process identifications. */
-typedef __kernel_ssize_t __ssize_t; /* Type of a byte count, or error. */
-typedef __kernel_fsid_t __fsid_t; /* Type of file system IDs. */
+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 __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. */
+typedef long int __off_t; /* Type of file sizes and offsets. */
+typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
+typedef int __pid_t; /* Type of process identifications. */
+typedef int __ssize_t; /* Type of a byte count, or error. */
+
+typedef struct
+ {
+ int __val[2];
+ } __fsid_t; /* Type of file system IDs. */
/* Everythin' else. */
-typedef __kernel_daddr_t __daddr_t; /* The type of a disk address. */
-typedef __kernel_caddr_t __caddr_t;
-typedef __kernel_time_t __time_t;
+typedef int __daddr_t; /* The type of a disk address. */
+typedef char *__caddr_t;
+typedef long int __time_t;
typedef long int __swblk_t; /* Type of a swap block maybe? */
-/* fd_set for select. */
-typedef __kernel_fd_set __fd_set;
-typedef __kernel_clock_t __clock_t;
+typedef long int __clock_t;
+
+/* One element in the file descriptor mask array. */
+typedef unsigned long int __fd_mask;
+
+/* Number of descriptors that can fit in an `fd_set'. */
+#define __FD_SETSIZE 1024
+
+/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
+#define __NFDBITS (8 * sizeof (__fd_mask))
+#define __FDELT(d) ((d) / __NFDBITS)
+#define __FDMASK(d) (1 << ((d) % __NFDBITS))
+
+/* fd_set for select and pselect. */
+typedef struct
+ {
+ /* XPG4.2 requires this member name. */
+ __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
+ } __fd_set;
-/* Linus doesn't want __kernel_fd_mask in <linux/posix_types.h> since
- XPG4 seems to require `unsigned long'. */
-typedef unsigned long __fd_mask;
-#ifdef __USE_SVID
typedef int __key_t;
-#endif
#endif /* gnu/types.h */