Browse Source

Header cleanups to fix compilation. Mostly a hack, pending figuring
out the best way to do some things.

David Schleef 23 years ago
parent
commit
d2c9f24fe0

+ 1 - 1
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.  */

+ 1 - 1
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
 

+ 3 - 0
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>

+ 2 - 2
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

+ 4 - 2
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.  */

+ 19 - 0
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