about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/bits
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits')
-rw-r--r--sysdeps/unix/sysv/linux/bits/fcntl.h12
-rw-r--r--sysdeps/unix/sysv/linux/bits/time.h11
-rw-r--r--sysdeps/unix/sysv/linux/bits/types.h11
3 files changed, 23 insertions, 11 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/fcntl.h b/sysdeps/unix/sysv/linux/bits/fcntl.h
index a2bbf29e03..0c94c6b9a5 100644
--- a/sysdeps/unix/sysv/linux/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/bits/fcntl.h
@@ -96,12 +96,14 @@
 #define F_EXLCK		4	/* or 3 */
 #define F_SHLCK		8	/* or 4 */
 
-/* operations for bsd flock(), also used by the kernel implementation */
-#define LOCK_SH		1	/* shared lock */
-#define LOCK_EX		2	/* exclusive lock */
-#define LOCK_NB		4	/* or'd with one of the above to prevent
+#ifdef __USE_BSD
+/* Operations for bsd flock(), also used by the kernel implementation */
+# define LOCK_SH	1	/* shared lock */
+# define LOCK_EX	2	/* exclusive lock */
+# define LOCK_NB	4	/* or'd with one of the above to prevent
 				   blocking */
-#define LOCK_UN		8	/* remove lock */
+# define LOCK_UN	8	/* remove lock */
+#endif
 
 struct flock
   {
diff --git a/sysdeps/unix/sysv/linux/bits/time.h b/sysdeps/unix/sysv/linux/bits/time.h
index 3c1b27a1bb..274d616777 100644
--- a/sysdeps/unix/sysv/linux/bits/time.h
+++ b/sysdeps/unix/sysv/linux/bits/time.h
@@ -42,9 +42,11 @@
 # endif	/* bits/time.h */
 #endif
 
-#ifndef _STRUCT_TIMEVAL
-# define _STRUCT_TIMEVAL	1
-# include <bits/types.h>
+#ifdef __need_timeval 
+# undef __need_timeval
+# ifndef _STRUCT_TIMEVAL
+#  define _STRUCT_TIMEVAL	1
+#  include <bits/types.h>
 
 /* A time value that is accurate to the nearest
    microsecond but also has a range of years.  */
@@ -53,4 +55,5 @@ struct timeval
     __time_t tv_sec;		/* Seconds.  */
     __time_t tv_usec;		/* Microseconds.  */
   };
-#endif	/* struct timeval */
+# endif	/* struct timeval */
+#endif	/* need timeval */ 
diff --git a/sysdeps/unix/sysv/linux/bits/types.h b/sysdeps/unix/sysv/linux/bits/types.h
index 06206f3b55..1543ff7c34 100644
--- a/sysdeps/unix/sysv/linux/bits/types.h
+++ b/sysdeps/unix/sysv/linux/bits/types.h
@@ -99,8 +99,13 @@ typedef unsigned long int __fd_mask;
 /* fd_set for select and pselect.  */
 typedef struct
   {
-    /* XPG4.2 requires this member name.  */
+    /* XPG4.2 requires this member name.  Otherwise avoid the name
+       from the global namespace.  */
+#ifdef __USE_XOPEN
     __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
+#else
+    __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
+#endif
   } __fd_set;
 
 
@@ -139,6 +144,8 @@ typedef int __intptr_t;
 
 
 /* Now add the thread types.  */
-#include <bits/pthreadtypes.h>
+#if defined __USE_POSIX199506 || defined __USE_UNIX98
+# include <bits/pthreadtypes.h>
+#endif
 
 #endif /* bits/types.h */