aboutsummaryrefslogtreecommitdiff
path: root/bits
diff options
context:
space:
mode:
Diffstat (limited to 'bits')
-rw-r--r--bits/byteswap.h7
-rw-r--r--bits/confname.h4
-rw-r--r--bits/dirent.h6
-rw-r--r--bits/dlfcn.h7
-rw-r--r--bits/endian.h4
-rw-r--r--bits/fenv.h2
-rw-r--r--bits/huge_val.h4
-rw-r--r--bits/in.h15
-rw-r--r--bits/ioctl-types.h25
-rw-r--r--bits/ioctls.h4
-rw-r--r--bits/ipc.h30
-rw-r--r--bits/msq.h6
-rw-r--r--bits/poll.h3
-rw-r--r--bits/resource.h7
-rw-r--r--bits/sched.h4
-rw-r--r--bits/sem.h9
-rw-r--r--bits/setjmp.h4
-rw-r--r--bits/shm.h29
-rw-r--r--bits/sigaction.h4
-rw-r--r--bits/sigcontext.h4
-rw-r--r--bits/socket.h9
-rw-r--r--bits/stat.h36
-rw-r--r--bits/statfs.h12
-rw-r--r--bits/termios.h78
-rw-r--r--bits/time.h18
-rw-r--r--bits/uio.h2
-rw-r--r--bits/utmp.h8
-rw-r--r--bits/utsname.h22
-rw-r--r--bits/waitflags.h2
-rw-r--r--bits/waitstatus.h34
30 files changed, 200 insertions, 199 deletions
diff --git a/bits/byteswap.h b/bits/byteswap.h
index 9404cc452e..04a5efe9f0 100644
--- a/bits/byteswap.h
+++ b/bits/byteswap.h
@@ -17,8 +17,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _BITS_BYTESWAP_H
-#define _BITS_BYTESWAP_H 1
+#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
+# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
+#endif
/* Swap bytes in 16 bit value. */
#define __bswap_16(x) \
@@ -39,5 +40,3 @@
__r.__l[1] = __bswap_32 (__v.__l[0]); \
__r.__ll; })
#endif
-
-#endif /* bits/byteswap.h */
diff --git a/bits/confname.h b/bits/confname.h
index 40228e11ed..4653887468 100644
--- a/bits/confname.h
+++ b/bits/confname.h
@@ -17,6 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _UNISTD_H
+# error "Never use <bits/confname.h> directly; include <unistd.h> instead."
+#endif
+
/* Values for the NAME argument to `pathconf' and `fpathconf'. */
enum
{
diff --git a/bits/dirent.h b/bits/dirent.h
index 2f7dca78aa..366cdf8ce2 100644
--- a/bits/dirent.h
+++ b/bits/dirent.h
@@ -1,5 +1,5 @@
/* Directory entry structure `struct dirent'. Stub version.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997 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
@@ -17,6 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _DIRENT_H
+# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
+#endif
+
struct dirent
{
char d_name[1]; /* Variable length. */
diff --git a/bits/dlfcn.h b/bits/dlfcn.h
index 79604fe8ff..7c33694018 100644
--- a/bits/dlfcn.h
+++ b/bits/dlfcn.h
@@ -17,8 +17,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _BITS_DLFCN_H
-#define _BITS_DLFCN_H 1
+#ifndef _DLFCN_H
+# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
+#endif
/* The MODE argument to `dlopen' contains one of the following: */
#define RTLD_LAZY 0x001 /* Lazy function call binding. */
@@ -29,5 +30,3 @@
the symbols of the loaded object and its dependencies are made
visible as if the object were linked directly into the program. */
#define RTLD_GLOBAL 0x100
-
-#endif /* bits/dlfcn.h */
diff --git a/bits/endian.h b/bits/endian.h
index 597f079a0f..45afd4ae47 100644
--- a/bits/endian.h
+++ b/bits/endian.h
@@ -6,4 +6,8 @@
So if cross-compiling to a machine with a different byte order,
the bits/endian.h file for that machine must exist. */
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
#error Machine byte order unknown.
diff --git a/bits/fenv.h b/bits/fenv.h
index f45deb07c1..c42540fa61 100644
--- a/bits/fenv.h
+++ b/bits/fenv.h
@@ -17,7 +17,7 @@
Boston, MA 02111-1307, USA. */
#ifndef _FENV_H
-#error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
#endif
diff --git a/bits/huge_val.h b/bits/huge_val.h
index 8f137d1734..0c30c86f33 100644
--- a/bits/huge_val.h
+++ b/bits/huge_val.h
@@ -1,6 +1,6 @@
/* Stub `HUGE_VAL' constant.
Used by <stdlib.h> and <math.h> functions for overflow.
- Copyright (C) 1992, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1996, 1997 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
@@ -19,7 +19,7 @@
Boston, MA 02111-1307, USA. */
#ifndef _MATH_H
-#error "Never use <bits/huge_val.h> directly; include <math.h> instead."
+# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
#endif
diff --git a/bits/in.h b/bits/in.h
index 7241bd24c3..83d7ae6b10 100644
--- a/bits/in.h
+++ b/bits/in.h
@@ -18,8 +18,9 @@
/* Generic version. */
-#ifndef _NETINET_INBITS_H
-#define _NETINET_INBITS_H 1
+#ifndef _NETINET_IN_H
+# error "Never use <bits/in.h> directly; include <netinet/in.h> instead."
+#endif
/* Link numbers. */
#define IMPLINK_IP 155
@@ -55,10 +56,10 @@ struct ip_opts
/* Structure used for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. */
struct ip_mreq
-{
- struct in_addr imr_multiaddr; /* IP multicast address of group */
- struct in_addr imr_interface; /* local IP address of interface */
-};
+ {
+ struct in_addr imr_multiaddr; /* IP multicast address of group */
+ struct in_addr imr_interface; /* local IP address of interface */
+ };
/* IPV6 socket options. */
#define IPV6_ADDRFORM 1
@@ -80,5 +81,3 @@ struct ip_mreq
#define IPV6_MULTICAST_LOOP 19
#define IPV6_ADD_MEMBERSHIP 20
#define IPV6_DROP_MEMBERSHIP 21
-
-#endif /* netinet/inbits.h */
diff --git a/bits/ioctl-types.h b/bits/ioctl-types.h
index 1d5c8a002f..26283a0f10 100644
--- a/bits/ioctl-types.h
+++ b/bits/ioctl-types.h
@@ -1,5 +1,5 @@
/* Structure types for pre-termios terminal ioctls. Generic Unix version.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997 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
@@ -17,15 +17,11 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/*
- * Never include this file directly; use <sys/ioctl.h> instead.
- */
-
-#ifndef _BITS_IOCTL_TYPES_H
-#define _BITS_IOCTL_TYPES_H 1
-
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
+#endif
-#if defined(TIOCGETC) || defined(TIOCSETC)
+#if defined TIOCGETC || defined TIOCSETC
/* Type of ARG for TIOCGETC and TIOCSETC requests. */
struct tchars
{
@@ -41,7 +37,7 @@ struct tchars
_IOT (_IOTS (char), 6, 0, 0, 0, 0)
#endif
-#if defined(TIOCGLTC) || defined(TIOCSLTC)
+#if defined TIOCGLTC || defined TIOCSLTC
/* Type of ARG for TIOCGLTC and TIOCSLTC requests. */
struct ltchars
{
@@ -70,7 +66,7 @@ struct sgttyb
#define _IOT_sgttyb /* Hurd ioctl type field. */ \
_IOT (_IOTS (char), 6, _IOTS (short int), 1, 0, 0)
-#if defined(TIOCGWINSZ) || defined(TIOCSWINSZ)
+#if defined TIOCGWINSZ || defined TIOCSWINSZ
/* Type of ARG for TIOCGWINSZ and TIOCSWINSZ requests. */
struct winsize
{
@@ -86,13 +82,13 @@ struct winsize
_IOT (_IOTS (unsigned short int), 4, 0, 0, 0, 0)
#endif
-#if defined (TIOCGSIZE) || defined (TIOCSSIZE)
+#if defined TIOCGSIZE || defined TIOCSSIZE
/* The BSD-style ioctl constructor macros use `sizeof', which can't be used
in a preprocessor conditional. Since the commands are always unique
regardless of the size bits, we can safely define away `sizeof' for the
purpose of the conditional. */
# define sizeof(type) 0
-# if defined (TIOCGWINSZ) && TIOCGSIZE == TIOCGWINSZ
+# if defined TIOCGWINSZ && TIOCGSIZE == TIOCGWINSZ
/* Many systems that have TIOCGWINSZ define TIOCGSIZE for source
compatibility with Sun; they define `struct ttysize' to have identical
layout as `struct winsize' and #define TIOCGSIZE to be TIOCGWINSZ
@@ -116,6 +112,3 @@ struct ttysize
# endif
# undef sizeof /* See above. */
#endif
-
-
-#endif /* bits/ioctl-types.h */
diff --git a/bits/ioctls.h b/bits/ioctls.h
index 3b6178bfae..d3ecad9515 100644
--- a/bits/ioctls.h
+++ b/bits/ioctls.h
@@ -1 +1,5 @@
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
+#endif
+
/* This space intentionally left blank. */
diff --git a/bits/ipc.h b/bits/ipc.h
index a5ecbd90b7..58f419be1d 100644
--- a/bits/ipc.h
+++ b/bits/ipc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -17,10 +17,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _SYS_IPC_BUF_H
-
-#define _SYS_IPC_BUF_H 1
-#include <features.h>
+#ifndef _SYS_IPC_H
+# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
+#endif
#include <sys/types.h>
@@ -34,23 +33,16 @@
#define IPC_SET 1 /* set `ipc_perm' options */
#define IPC_STAT 2 /* get `ipc_perm' options */
-
-__BEGIN_DECLS
-
/* Special key values. */
#define IPC_PRIVATE ((key_t) 0) /* private key */
/* Data structure used to pass permission information to IPC operations. */
struct ipc_perm
-{
- __uid_t uid; /* owner's user ID */
- __gid_t gid; /* owner's group ID */
- __uid_t cuid; /* creator's user ID */
- __gid_t cgid; /* creator's group ID */
- __mode_t mode; /* read/write permission */
-};
-
-__END_DECLS
-
-#endif /* _SYS_IPC_BUF_H */
+ {
+ __uid_t uid; /* owner's user ID */
+ __gid_t gid; /* owner's group ID */
+ __uid_t cuid; /* creator's user ID */
+ __gid_t cgid; /* creator's group ID */
+ __mode_t mode; /* read/write permission */
+ };
diff --git a/bits/msq.h b/bits/msq.h
index 37daa9bf8c..a263869a0e 100644
--- a/bits/msq.h
+++ b/bits/msq.h
@@ -1,6 +1,5 @@
/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -21,14 +20,11 @@
#error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
-
-#include <features.h>
#include <sys/types.h>
/* Define options for message queue functions. */
#define MSG_NOERROR 010000 /* no error if message is too big */
-__BEGIN_DECLS
/* Structure of record for one message inside the kernel.
The type `struct __msg' is opaque. */
@@ -43,5 +39,3 @@ struct msqid_ds
__pid_t msg_lspid; /* pid of last msgsnd() */
__pid_t msg_lrpid; /* pid of last msgrcv() */
};
-
-__END_DECLS
diff --git a/bits/poll.h b/bits/poll.h
index 55ec70e363..68f611a428 100644
--- a/bits/poll.h
+++ b/bits/poll.h
@@ -16,6 +16,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SYS_POLL_H
+# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#endif
/* Event types that can be polled for. These bits may be set in `events'
to indicate the interesting event types; they will appear in `revents'
diff --git a/bits/resource.h b/bits/resource.h
index 46cf9a7af5..d0ebeb56c8 100644
--- a/bits/resource.h
+++ b/bits/resource.h
@@ -17,6 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SYS_RESOURCE_H
+# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
+#endif
+
/* These are the values for 4.4 BSD and GNU. Earlier BSD systems have a
subset of these kinds of resource limit. In systems where `getrlimit'
and `setrlimit' are not system calls, these are the values used by the C
@@ -107,7 +111,8 @@ enum __rusage_who
#define RUSAGE_CHILDREN RUSAGE_CHILDREN
};
-#include <sys/time.h> /* For `struct timeval'. */
+#define __need_timeval
+#include <bits/time.h> /* For `struct timeval'. */
/* Structure which says how much of each resource has been used. */
struct rusage
diff --git a/bits/sched.h b/bits/sched.h
index bb5da5676f..0c246c8f9a 100644
--- a/bits/sched.h
+++ b/bits/sched.h
@@ -1,6 +1,6 @@
/* Definitions of constants and data structure for POSIX 1003.1b-1993
scheduling interface.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997 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
@@ -19,7 +19,7 @@
Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _SCHED_H
-#error "Never use <bits/sched.h> directly; include <sched.h> instead."
+# error "Never include <bits/sched.h> directly; use <sched.h> instead."
#endif
diff --git a/bits/sem.h b/bits/sem.h
index 1d3e41bd56..8b9f97c62a 100644
--- a/bits/sem.h
+++ b/bits/sem.h
@@ -1,6 +1,5 @@
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -18,11 +17,9 @@
Boston, MA 02111-1307, USA. */
#ifndef _SYS_SEM_H
-#error "Never use <bits/sem.h> directly; include <sys/sem.h> instead."
+# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
#endif
-
-#include <features.h>
#include <sys/types.h>
/* Flags for `semop'. */
@@ -38,8 +35,6 @@
#define SETALL 17 /* set all semval's */
-__BEGIN_DECLS
-
/* Data structure describing a set of semaphores. */
struct semid_ds
{
@@ -57,5 +52,3 @@ union semun
unsigned short int *array; /* array for GETALL & SETALL */
struct seminfo *__buf; /* buffer for IPC_INFO */
};
-
-__END_DECLS
diff --git a/bits/setjmp.h b/bits/setjmp.h
index 6620e5ab15..9150d8d764 100644
--- a/bits/setjmp.h
+++ b/bits/setjmp.h
@@ -1,3 +1,7 @@
/* Define the machine-dependent type `jmp_buf'. Stub version. */
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
typedef int __jmp_buf[1];
diff --git a/bits/shm.h b/bits/shm.h
index b41d0c1e86..8c97999626 100644
--- a/bits/shm.h
+++ b/bits/shm.h
@@ -1,6 +1,5 @@
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -18,11 +17,9 @@
Boston, MA 02111-1307, USA. */
#ifndef _SYS_SHM_H
-#error "Never use <bits/shm.h> directly; include <sys/shm.h> instead."
+# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
#endif
-
-#include <features.h>
#include <sys/types.h>
/* Flags for `shmat'. */
@@ -35,19 +32,15 @@
#define SHM_UN