diff options
author | David Schleef <ds@schleef.org> | 2001-05-22 14:36:19 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2001-05-22 14:36:19 +0000 |
commit | d2c9f24fe0a6e73247c827d54b8c2189b61c4ea2 (patch) | |
tree | 3e351d506328f995a6fc84cb574f4c38535ba6c4 | |
parent | 665ce29c84a830259683fdb58c76da7efc00f890 (diff) |
Header cleanups to fix compilation. Mostly a hack, pending figuring
out the best way to do some things.
-rw-r--r-- | libc/sysdeps/linux/mips/bits/errno.h | 2 | ||||
-rw-r--r-- | libc/sysdeps/linux/mips/bits/ipc.h | 2 | ||||
-rw-r--r-- | libc/sysdeps/linux/mips/bits/local_lim.h | 3 | ||||
-rw-r--r-- | libc/sysdeps/linux/mips/bits/shm.h | 4 | ||||
-rw-r--r-- | libc/sysdeps/linux/mips/bits/socket.h | 6 | ||||
-rw-r--r-- | libc/sysdeps/linux/mips/bits/types.h | 19 |
6 files changed, 30 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/mips/bits/errno.h b/libc/sysdeps/linux/mips/bits/errno.h index c45829a18..e0c1dc5c6 100644 --- a/libc/sysdeps/linux/mips/bits/errno.h +++ b/libc/sysdeps/linux/mips/bits/errno.h @@ -32,7 +32,7 @@ extern int errno; /* Function to get address of global `errno' variable. */ -extern int *__errno_location (void) __THROW __attribute__ ((__const__)); +extern int *__errno_location (void); # if defined _LIBC /* We wouldn't need a special macro anymore but it is history. */ diff --git a/libc/sysdeps/linux/mips/bits/ipc.h b/libc/sysdeps/linux/mips/bits/ipc.h index 8364dca56..a15b5fc8e 100644 --- a/libc/sysdeps/linux/mips/bits/ipc.h +++ b/libc/sysdeps/linux/mips/bits/ipc.h @@ -56,7 +56,7 @@ __BEGIN_DECLS /* The actual system call: all functions are multiplexed by this. */ extern int __ipc (int __call, int __first, int __second, int __third, - void *__ptr) __THROW; + void *__ptr); __END_DECLS diff --git a/libc/sysdeps/linux/mips/bits/local_lim.h b/libc/sysdeps/linux/mips/bits/local_lim.h index 0a7c83706..2a6782c49 100644 --- a/libc/sysdeps/linux/mips/bits/local_lim.h +++ b/libc/sysdeps/linux/mips/bits/local_lim.h @@ -28,9 +28,12 @@ #ifndef LINK_MAX # define __undef_LINK_MAX #endif +/* uClibc likes to have a definition of OPEN_MAX */ +#if 0 #ifndef OPEN_MAX # define __undef_OPEN_MAX #endif +#endif /* The kernel sources contain a file with all the needed information. */ #include <linux/limits.h> diff --git a/libc/sysdeps/linux/mips/bits/shm.h b/libc/sysdeps/linux/mips/bits/shm.h index 31c65a91a..2cc99bf30 100644 --- a/libc/sysdeps/linux/mips/bits/shm.h +++ b/libc/sysdeps/linux/mips/bits/shm.h @@ -48,8 +48,8 @@ struct shmid_ds long int shm_lpid; /* pid of last shmop */ unsigned short int shm_nattch; /* number of current attaches */ unsigned short int __shm_npages; /* size of segment (pages) */ - unsigned long int *__unbounded __shm_pages; /* array of ptrs to frames -> SHMMAX */ - struct vm_area_struct *__unbounded __attaches; /* descriptors for attaches */ + unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */ + struct vm_area_struct *__attaches; /* descriptors for attaches */ }; #ifdef __USE_MISC diff --git a/libc/sysdeps/linux/mips/bits/socket.h b/libc/sysdeps/linux/mips/bits/socket.h index 2d6ded905..f256a9b3e 100644 --- a/libc/sysdeps/linux/mips/bits/socket.h +++ b/libc/sysdeps/linux/mips/bits/socket.h @@ -227,8 +227,10 @@ struct cmsghdr of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ +#if 0 __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ /* XXX Perhaps this should be removed. */ +#endif }; /* Ancillary data object manipulation macros. */ @@ -248,13 +250,13 @@ struct cmsghdr #define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, - struct cmsghdr *__cmsg) __THROW; + struct cmsghdr *__cmsg); #ifdef __USE_EXTERN_INLINES # ifndef _EXTERN_INLINE # define _EXTERN_INLINE extern __inline # endif _EXTERN_INLINE struct cmsghdr * -__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW +__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) { if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) /* The kernel header does this so there may be a reason. */ diff --git a/libc/sysdeps/linux/mips/bits/types.h b/libc/sysdeps/linux/mips/bits/types.h index c3b93e3ac..1e6634b99 100644 --- a/libc/sysdeps/linux/mips/bits/types.h +++ b/libc/sysdeps/linux/mips/bits/types.h @@ -136,6 +136,25 @@ typedef int __intptr_t; /* Duplicate info from sys/socket.h. */ typedef unsigned int __socklen_t; +/* --- */ +/* Added by ds */ +/* I don't understand why these weren't here... */ +#define __NFDBITS (8 * sizeof(__fd_mask)) +#define __FDELT(d) ((d) / __NFDBITS) +#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) + +typedef unsigned long __fd_mask; +typedef struct + { +#ifdef __USE_XOPEN + __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; +#define __FDS_BITS(set) ((set)->fds_bits) +#else + __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; +#define __FDS_BITS(set) ((set)->__fds_bits) +#endif + } __fd_set; +/* --- */ /* Now add the thread types. */ #if defined __USE_POSIX199506 || defined __USE_UNIX98 |