diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-11-26 04:23:08 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-11-26 04:23:08 +0000 |
commit | f4017d205738b913f1002433cde5d4b4e93fbd81 (patch) | |
tree | 078a2f6aab0f3faf7355b41e12d8a06be81663a2 /sysdeps/unix/sysv/linux/bits | |
parent | e34b0f2902588bbbfaf55829692e32c3c7134b74 (diff) | |
download | glibc-f4017d205738b913f1002433cde5d4b4e93fbd81.tar.gz glibc-f4017d205738b913f1002433cde5d4b4e93fbd81.tar.xz glibc-f4017d205738b913f1002433cde5d4b4e93fbd81.zip |
Update. cvs/libc-ud-971125
1997-11-26 04:28 Ulrich Drepper <drepper@cygnus.com> * eld/dl-profile.c (_dl_start_profile): Avoid FP calculation when computing s_scale. Patch by a sun <asun@zoology.washington.edu>. * iconv/gconv_close.c: Correct freeing of descriptor data. * iconv/gconv_simple.c: Return correct error values for illegal or incomplete characters. * Makefile (iconvdata/%): Special goal to simplify iconvdata development. * iconvdata/Makefile: New file. * iconvdata/configure: Likewise. * iconvdata/extra-module.mk: Likewise. * iconvdata/gconv-modules: Likewise. * iconvdata/iso6937.c: Likewise. * iconvdata/iso8859-1.c: Likewise. * iconvdata/iso8859-10.c: Likewise. * iconvdata/iso8859-10.h: Likewise. * iconvdata/iso8859-2.c: Likewise. * iconvdata/iso8859-2.h: Likewise. * iconvdata/iso8859-3.c: Likewise. * iconvdata/iso8859-3.h: Likewise. * iconvdata/iso8859-4.c: Likewise. * iconvdata/iso8859-4.h: Likewise. * iconvdata/iso8859-5.c: Likewise. * iconvdata/iso8859-5.h: Likewise. * iconvdata/iso8859-6.c: Likewise. * iconvdata/iso8859-6.h: Likewise. * iconvdata/iso8859-7.c: Likewise. * iconvdata/iso8859-7.h: Likewise. * iconvdata/iso8859-8.c: Likewise. * iconvdata/iso8859-8.h: Likewise. * iconvdata/iso8859-9.c: Likewise. * iconvdata/iso8859-9.h: Likewise. * iconvdata/iso8859-generic.c: Likewise. * iconvdata/t61.c: Likewise. * string/Makefile (routines): Add strcasestr. * string/string.h: Add prototype for strcasestr. * sysdeps/generic/strcasestr.c: New file. * wcsmbs/mbrtowc.c: Simplify special case a bit. * wcsmbs/wcrtomb.c: Likewise. * wcsmbs/mbsnrtowcs.c: Correctly handle incomplete characters. * wcsmbs/wcsnrtombs.c: Likewise. * wcsmbs/mbsrtowcs.c: Make sure SRC argument is correct when partial character is read. * wcsmbs/wcsrtombs.c: Likewise. * wcsmbs/wmemrtombs.c: Likewise. * wcsmbs/wmemrtowcs.c: Likewise. * io/ftw.h: Include <sys/stat.h> instead of <bits/stat.h>. * login/pty.h: Include <sys/ioctl.h> instead og <bits/ioctl-types.h>. * sysdeps/i386/__longjmp.S: Define _SETJMP_H. * sysdeps/i386/elf/setjmp.S: Likewise. * sysdeps/unix/sysv/linux/kernel_termios.h: Do include <bits/termios.h>. * sysdeps/posix/mk-stdiolim.c: Output file with comment. * sysdeps/unix/sysv/linux/stdio_lim.h.in: Add comment. * sysdeps/unix/sysv/linux/sys/mman.h: Pretty print. * sysvipc/sys/ipc.h: Likewise. * sysvipc/sys/msg.h: Likewise. * sysvipc/sys/sem.h: Likewise. * sysvipc/sys/shm.h: Likewise. * sysdeps/alpha/bits/endian.h: Issue error message if the header is used directly. * sysdeps/alpha/bits/setjmp.h: Likewise. * sysdeps/alpha/fpu/bits/fenv.h: Likewise. * sysdeps/arm/bits/endian.h: Likewise. * sysdeps/arm/bits/setjmp.h: Likewise. * sysdeps/generic/bits/byteswap.h: Likewise. * sysdeps/generic/bits/confname.h: Likewise. * sysdeps/generic/bits/dirent.h: Likewise. * sysdeps/generic/bits/dlfcn.h: Likewise. * sysdeps/generic/bits/endian.h: Likewise. * sysdeps/generic/bits/fenv.h: Likewise. * sysdeps/generic/bits/huge_val.h: Likewise. * sysdeps/generic/bits/in.h: Likewise. * sysdeps/generic/bits/ioctl-types.h: Likewise. * sysdeps/generic/bits/ioctls.h: Likewise. * sysdeps/generic/bits/ipc.h: Likewise. * sysdeps/generic/bits/msq.h: Likewise. * sysdeps/generic/bits/poll.h: Likewise. * sysdeps/generic/bits/resource.h: Likewise. * sysdeps/generic/bits/sched.h: Likewise. * sysdeps/generic/bits/sem.h: Likewise. * sysdeps/generic/bits/setjmp.h: Likewise. * sysdeps/generic/bits/shm.h: Likewise. * sysdeps/generic/bits/sigaction.h: Likewise. * sysdeps/generic/bits/sigcontext.h: Likewise. * sysdeps/generic/bits/socket.h: Likewise. * sysdeps/generic/bits/stat.h: Likewise. * sysdeps/generic/bits/statfs.h: Likewise. * sysdeps/generic/bits/stdio_lim.h: Likewise. * sysdeps/generic/bits/termios.h: Likewise. * sysdeps/generic/bits/time.h: Likewise. * sysdeps/generic/bits/uio.h: Likewise. * sysdeps/generic/bits/utmp.h: Likewise. * sysdeps/generic/bits/utmpx.h: Likewise. * sysdeps/generic/bits/utsname.h: Likewise. * sysdeps/generic/bits/waitflags.h: Likewise. * sysdeps/generic/bits/waitstatus.h: Likewise. * sysdeps/gnu/bits/utmp.h: Likewise. * sysdeps/gnu/bits/utmpx.h: Likewise. * sysdeps/i386/bits/byteswap.h: Likewise. * sysdeps/i386/bits/endian.h: Likewise. * sysdeps/i386/bits/huge_val.h: Likewise. * sysdeps/i386/bits/setjmp.h: Likewise. * sysdeps/i386/fpu/bits/fenv.h: Likewise. * sysdeps/ieee754/bits/huge_val.h: Likewise. * sysdeps/m68k/bits/byteswap.h: Likewise. * sysdeps/m68k/bits/endian.h: Likewise. * sysdeps/m68k/bits/setjmp.h: Likewise. * sysdeps/m68k/fpu/bits/fenv.h: Likewise. * sysdeps/mach/hurd/alpha/bits/sigcontext.h: Likewise. * sysdeps/mach/hurd/bits/ioctls.h: Likewise. * sysdeps/mach/hurd/bits/stat.h: Likewise. * sysdeps/mach/hurd/hppa/bits/sigcontext.h: Likewise. * sysdeps/mach/hurd/i386/bits/sigcontext.h: Likewise. * sysdeps/mach/hurd/mips/bits/sigcontext.h: Likewise. * sysdeps/mips/bits/dlfcn.h: Likewise. * sysdeps/mips/bits/endian.h: Likewise. * sysdeps/mips/bits/setjmp.h: Likewise. * sysdeps/mips/dec/bits/endian.h: Likewise. * sysdeps/mips/mips64/bits/setjmp.h: Likewise. * sysdeps/mips/mipsel/bits/endian.h: Likewise. * sysdeps/mips/p40/bits/endian.h: Likewise. * sysdeps/powerpc/bits/endian.h: Likewise. * sysdeps/powerpc/bits/fenv.h: Likewise. * sysdeps/powerpc/bits/setjmp.h: Likewise. * sysdeps/sparc/sparc32/bits/endian.h: Likewise. * sysdeps/sparc/sparc32/bits/setjmp.h: Likewise. * sysdeps/sparc/sparc32/fpu/bits/fenv.h: Likewise. * sysdeps/sparc/sparc64/bits/endian.h: Likewise. * sysdeps/sparc/sparc64/fpu/bits/fenv.h: Likewise. * sysdeps/unix/bsd/bits/dirent.h: Likewise. * sysdeps/unix/bsd/bits/stat.h: Likewise. * sysdeps/unix/bsd/bits/waitflags.h: Likewise. * sysdeps/unix/bsd/bsd4.4/bits/dirent.h: Likewise. * sysdeps/unix/bsd/osf/alpha/bits/stat.h: Likewise. * sysdeps/unix/bsd/osf/bits/sigaction.h: Likewise. * sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h: Likewise. * sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h: Likewise. * sysdeps/unix/bsd/sun/sunos4/bits/resource.h: Likewise. * sysdeps/unix/bsd/sun/sunos4/bits/termios.h: Likewise. * sysdeps/unix/bsd/sun/sunos4/bits/utsname.h: Likewise. * sysdeps/unix/bsd/ultrix4/bits/utsname.h: Likewise. * sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h: Likewise. * sysdeps/unix/common/bits/dirent.h: Likewise. * sysdeps/unix/sysv/bits/dirent.h: Likewise. * sysdeps/unix/sysv/bits/stat.h: Likewise. * sysdeps/unix/sysv/bits/utmp.h: Likewise. * sysdeps/unix/sysv/bits/utsname.h: Likewise. * sysdeps/unix/sysv/irix4/bits/confname.h: Likewise. * sysdeps/unix/sysv/irix4/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/ioctls.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/time.h: Likewise. * sysdeps/unix/sysv/linux/bits/dirent.h: Likewise. * sysdeps/unix/sysv/linux/bits/in.h: Likewise. * sysdeps/unix/sysv/linux/bits/ioctl-types.h: Likewise. * sysdeps/unix/sysv/linux/bits/ioctls.h: Likewise. * sysdeps/unix/sysv/linux/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/bits/msq.h: Likewise. * sysdeps/unix/sysv/linux/bits/poll.h: Likewise. * sysdeps/unix/sysv/linux/bits/resource.h: Likewise. * sysdeps/unix/sysv/linux/bits/sched.h: Likewise. * sysdeps/unix/sysv/linux/bits/sem.h: Likewise. * sysdeps/unix/sysv/linux/bits/shm.h: Likewise. * sysdeps/unix/sysv/linux/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/bits/sigcontext.h: Likewise. * sysdeps/unix/sysv/linux/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/bits/statfs.h: Likewise. * sysdeps/unix/sysv/linux/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/bits/time.h: Likewise. * sysdeps/unix/sysv/linux/bits/uio.h: Likewise. * sysdeps/unix/sysv/linux/bits/utsname.h: Likewise. * sysdeps/unix/sysv/linux/bits/waitflags.h: Likewise. * sysdeps/unix/sysv/linux/i386/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/m68k/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/m68k/bits/poll.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/endian.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/poll.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/shm.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/statfs.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/time.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/ioctls.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/poll.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h: Likewise. * sysdeps/unix/sysv/minix/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/sco3.2.4/bits/confname.h: Likewise. * sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/sysv4/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/sysv4/bits/utsname.h: Likewise. * sysdeps/unix/sysv/sysv4/bits/waitflags.h: Likewise. * sysdeps/unix/sysv/sysv4/i386/bits/stat.h: Likewise. * sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h: Likewise. * sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h: Likewise. * sysdeps/vax/bits/huge_val.h: Likewise. * sysdeps/vax/bits/setjmp.h: Likewise. * sysdeps/wordsize-32/bits/elfclass.h: Likewise. * sysdeps/wordsize-64/bits/elfclass.h: Likewise. 1997-11-25 Andreas Jaeger <aj@arthur.rhein-neckar.de> * libio/stdio.h: Correct comment of sys_nerr/sys_errlist 1997-11-25 Paul Eggert <eggert@shade.twinsun.com> * strftime.c (strftime): No longer any need to undef or declare if emacs is defined. (my_strftime): When checking a -1 returned by mktime, don't blow up if localtime_r returns NULL. 1997-11-24 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * README.template: Fix spelling. 1997-11-25 Andreas Jaeger <aj@arthur.rhein-neckar.de> * configure.in: Enhance --enable-add-ons description a wee bit. 1997-11-24 Andreas Jaeger <aj@arthur.rhein-neckar.de> * glibcbug.in: Add more information of build environment and flags. 1997-11-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/posix/getcwd.c: Recognize EOF from readdir and translate it into ENOENT.
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits')
21 files changed, 141 insertions, 185 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/dirent.h b/sysdeps/unix/sysv/linux/bits/dirent.h index 1f8ff1e3d0..30e0203289 100644 --- a/sysdeps/unix/sysv/linux/bits/dirent.h +++ b/sysdeps/unix/sysv/linux/bits/dirent.h @@ -16,8 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _BITS_DIRENT_H -#define _BITS_DIRENT_H 1 +#ifndef _DIRENT_H +# error "Never use <bits/dirent.h> directly; include <dirent.h> instead." +#endif struct dirent { @@ -50,5 +51,3 @@ struct dirent64 #define _DIRENT_HAVE_D_RECLEN #define _DIRENT_HAVE_D_OFF #define _DIRENT_HAVE_D_TYPE - -#endif /* bits/dirent.h */ diff --git a/sysdeps/unix/sysv/linux/bits/in.h b/sysdeps/unix/sysv/linux/bits/in.h index 0dd94bef96..1d3817f68d 100644 --- a/sysdeps/unix/sysv/linux/bits/in.h +++ b/sysdeps/unix/sysv/linux/bits/in.h @@ -18,8 +18,9 @@ /* Linux 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 /* Options for use with `getsockopt' and `setsockopt' at the IP level. The first word in the comment at the right is the data type used; @@ -71,5 +72,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/sysdeps/unix/sysv/linux/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/bits/ioctl-types.h index af988a3c9d..4413dacdb4 100644 --- a/sysdeps/unix/sysv/linux/bits/ioctl-types.h +++ b/sysdeps/unix/sysv/linux/bits/ioctl-types.h @@ -17,12 +17,9 @@ 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 /* Get definition of constants for use with `ioctl'. */ #include <asm/ioctls.h> @@ -69,6 +66,3 @@ struct termio #define N_PPP 3 #define N_STRIP 4 #define N_AX25 5 - - -#endif /* bits/ioctl-types.h */ diff --git a/sysdeps/unix/sysv/linux/bits/ioctls.h b/sysdeps/unix/sysv/linux/bits/ioctls.h index 265c857f92..a89724cd71 100644 --- a/sysdeps/unix/sysv/linux/bits/ioctls.h +++ b/sysdeps/unix/sysv/linux/bits/ioctls.h @@ -1,4 +1,4 @@ -/* 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 @@ -16,15 +16,10 @@ 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_IOCTLS_H -#define _BITS_IOCTLS_H 1 +#ifndef _SYS_IOCTL_H +# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead." +#endif /* Use the definitions from the kernel header files. */ #include <asm/ioctls.h> #include <linux/sockios.h> - -#endif /* bits/ioctls.h */ diff --git a/sysdeps/unix/sysv/linux/bits/ipc.h b/sysdeps/unix/sysv/linux/bits/ipc.h index c01a81a83f..8b5db4add6 100644 --- a/sysdeps/unix/sysv/linux/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/bits/ipc.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 @@ -17,10 +16,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> @@ -35,9 +33,6 @@ #define IPC_STAT 2 /* Get `ipc_perm' options. */ #define IPC_INFO 3 /* See ipcs. */ - -__BEGIN_DECLS - /* Special key values. */ #define IPC_PRIVATE ((__key_t) 0) /* Private key. */ @@ -63,10 +58,15 @@ struct ipc_kludge long int msgtyp; }; + +__BEGIN_DECLS + /* The actual system call: all functions are multiplexed by this. */ extern int __ipc __P ((int __call, int __first, int __second, int __third, void *__ptr)); +__END_DECLS + /* The codes for the functions to use the multiplexer `__ipc'. */ #define IPCOP_semop 1 #define IPCOP_semget 2 @@ -79,7 +79,3 @@ extern int __ipc __P ((int __call, int __first, int __second, int __third, #define IPCOP_shmdt 22 #define IPCOP_shmget 23 #define IPCOP_shmctl 24 - -__END_DECLS - -#endif /* bits/ipc_buf.h */ diff --git a/sysdeps/unix/sysv/linux/bits/msq.h b/sysdeps/unix/sysv/linux/bits/msq.h index 59559a31c3..9d0b9a9afa 100644 --- a/sysdeps/unix/sysv/linux/bits/msq.h +++ b/sysdeps/unix/sysv/linux/bits/msq.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 @@ -17,10 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _SYS_MSQ_BUF_H - -#define _SYS_MSQ_BUF_H 1 -#include <features.h> +#ifndef _SYS_MSG_H +#error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." +#endif #include <sys/types.h> @@ -29,8 +27,6 @@ #define MSG_EXCEPT 020000 /* recv any msg except of specified type */ -__BEGIN_DECLS - /* Structure of record for one message inside the kernel. The type `struct __msg' is opaque. */ struct msqid_ds @@ -60,19 +56,15 @@ struct msqid_ds /* buffer for msgctl calls IPC_INFO, MSG_INFO */ struct msginfo -{ - int msgpool; - int msgmap; - int msgmax; - int msgmnb; - int msgmni; - int msgssz; - int msgtql; - ushort msgseg; -}; + { + int msgpool; + int msgmap; + int msgmax; + int msgmnb; + int msgmni; + int msgssz; + int msgtql; + ushort msgseg; + }; #endif /* __USE_MISC */ - -__END_DECLS - -#endif /* bits/msq_buf.h */ diff --git a/sysdeps/unix/sysv/linux/bits/poll.h b/sysdeps/unix/sysv/linux/bits/poll.h index c6b1d2324a..4aec021fed 100644 --- a/sysdeps/unix/sysv/linux/bits/poll.h +++ b/sysdeps/unix/sysv/linux/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/sysdeps/unix/sysv/linux/bits/resource.h b/sysdeps/unix/sysv/linux/bits/resource.h index 9ee6ea5b27..f825cba929 100644 --- a/sysdeps/unix/sysv/linux/bits/resource.h +++ b/sysdeps/unix/sysv/linux/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 + #include <asm/resource.h> #include <bits/types.h> @@ -148,7 +152,8 @@ enum __rusage_who #define RUSAGE_BOTH RUSAGE_BOTH }; -#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/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h index 521bbb7177..0ac5409172 100644 --- a/sysdeps/unix/sysv/linux/bits/sched.h +++ b/sysdeps/unix/sysv/linux/bits/sched.h @@ -19,12 +19,10 @@ 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 -#include <features.h> - /* Scheduling algorithms. */ #define SCHED_OTHER 0 #define SCHED_FIFO 1 @@ -36,15 +34,19 @@ struct sched_param int sched_priority; }; +#ifdef __USE_MISC /* Cloning flags. */ -#define CSIGNAL 0x000000ff /* Signal mask to be sent at exit. */ -#define CLONE_VM 0x00000100 /* Set if VM shared between processes. */ -#define CLONE_FS 0x00000200 /* Set if fs info shared between processes.*/ -#define CLONE_FILES 0x00000400 /* Set if open files shared between processes*/ -#define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared. */ -#define CLONE_PID 0x00001000 /* Set if pid shared. */ +# define CSIGNAL 0x000000ff /* Signal mask to be sent at exit. */ +# define CLONE_VM 0x00000100 /* Set if VM shared between processes. */ +# define CLONE_FS 0x00000200 /* Set if fs info shared between processes.*/ +# define CLONE_FILES 0x00000400 /* Set if open files shared between processes*/ +# define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared. */ +# define CLONE_PID 0x00001000 /* Set if pid shared. */ +#endif +__BEGIN_DECLS + /* Clone current process. */ extern int __clone __P ((int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg)); @@ -52,3 +54,5 @@ extern int __clone __P ((int (*__fn) (void *__arg), void *__child_stack, extern int clone __P ((int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg)); #endif + +__END_DECLS diff --git a/sysdeps/unix/sysv/linux/bits/sem.h b/sysdeps/unix/sysv/linux/bits/sem.h index 87951efea1..f3bbd89a12 100644 --- a/sysdeps/unix/sysv/linux/bits/sem.h +++ b/sysdeps/unix/sysv/linux/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 @@ -17,10 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _SYS_SEM_BUF_H - -#define _SYS_SEM_BUF_H 1 -#include <features.h> +#ifndef _SYS_SEM_H +# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead." +#endif #include <sys/types.h> @@ -37,8 +35,6 @@ #define SETALL 17 /* set all semval's */ -__BEGIN_DECLS - /* Data structure describing a set of semaphores. */ struct semid_ds { @@ -64,8 +60,8 @@ union semun #ifdef __USE_MISC /* ipcs ctl cmds */ -#define SEM_STAT 18 -#define SEM_INFO 19 +# define SEM_STAT 18 +# define SEM_INFO 19 struct seminfo { @@ -82,7 +78,3 @@ struct seminfo }; #endif /* __USE_MISC */ - -__END_DECLS - -#endif /* bits/sem_buf.h */ diff --git a/sysdeps/unix/sysv/linux/bits/shm.h b/sysdeps/unix/sysv/linux/bits/shm.h index 6db01dd4a2..6f5f840909 100644 --- a/sysdeps/unix/sysv/linux/bits/shm.h +++ b/sysdeps/unix/sysv/linux/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 @@ -17,10 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _SYS_SHM_BUF_H - -#define _SYS_SHM_BUF_H 1 -#include <features.h> +#ifndef _SYS_SHM_H +# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead." +#endif #include <sys/types.h> @@ -38,55 +36,49 @@ #define SHM_UNLOCK 12 /* unlock segment (root only) */ -__BEGIN_DECLS - /* Data structure describing a set of semaphores. */ struct shmid_ds -{ - struct ipc_perm shm_perm; /* operation permission struct */ - int shm_segsz; /* size of segment in bytes */ - __time_t shm_atime; /* time of last shmat() */ - __time_t shm_dtime; /* time of last shmdt() */ - __time_t shm_ctime; /* time of last change by shmctl() */ - int shm_cpid; /* pid of creator */ - 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 *__shm_pages; /* array of ptrs to frames -> SHMMAX */ - struct vm_area_struct *__attaches; /* descriptors for attaches */ -}; + { + struct ipc_perm shm_perm; /* operation permission struct */ + int shm_segsz; /* size of segment in bytes */ + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ + int shm_cpid; /* pid of creator */ + 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 *__shm_pages; /* array of ptrs to frames -> SHMMAX */ + struct vm_area_struct *__attaches; /* descriptors for attaches */ + }; #ifdef __USE_MISC /* ipcs ctl commands */ -#define SHM_STAT 13 -#define SHM_INFO 14 +# define SHM_STAT 13 +# define SHM_INFO 14 /* shm_mode upper byte flags */ -#define SHM_DEST 01000 /* segment will be destroyed on last detach */ -#define SHM_LOCKED 02000 /* segment will not be swapped */ +# define SHM_DEST 01000 /* segment will be destroyed on last detach */ +# define SHM_LOCKED 02000 /* segment will not be swapped */ struct shminfo -{ - int shmmax; - int shmmin; - int shmmni; - int shmseg; - int shmall; -}; + { + int shmmax; + int shmmin; + int shmmni; + int shmseg; + int shmall; + }; struct shm_info -{ - int used_ids; - ulong shm_tot; /* total allocated shm */ - ulong shm_rss; /* total resident shm */ - ulong shm_swp; /* total swapped shm */ - ulong swap_attempts; - ulong swap_successes; -}; + { + int used_ids; + ulong shm_tot; /* total allocated shm */ + ulong shm_rss; /* total resident shm */ + ulong shm_swp; /* total swapped shm */ + ulong swap_attempts; + ulong swap_successes; + }; #endif /* __USE_MISC */ - -__END_DECLS - -#endif /* bits/shm_buf.h */ diff --git a/sysdeps/unix/sysv/linux/bits/sigaction.h b/sysdeps/unix/sysv/linux/bits/sigaction.h index 247b53499e..1806bb2e92 100644 --- a/sysdeps/unix/sysv/linux/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/bits/sigaction.h @@ -17,6 +17,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SIGNAL_H +# error "Never include <bits/sigaction.h> directly; use <signal.h> instead." +#endif + /* Structure describing the action to be taken when a signal arrives. */ struct sigaction { diff --git a/sysdeps/unix/sysv/linux/bits/sigcontext.h b/sysdeps/unix/sysv/linux/bits/sigcontext.h index fb8bc5fc57..08960b6824 100644 --- a/sysdeps/unix/sysv/linux/bits/sigcontext.h +++ b/sysdeps/unix/sysv/linux/bits/sigcontext.h @@ -1,4 +1,4 @@ -/* 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,7 +17,7 @@ Boston, MA 02111-1307, USA. */ #ifndef _SIGNAL_H -#error "Never use <bits/sigcontext.h> directly; include <signal.h> instead." +# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead." #endif diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h index 8f859d2e3e..f48f2d1403 100644 --- a/sysdeps/unix/sysv/linux/bits/socket.h +++ b/sysdeps/unix/sysv/linux/bits/socket.h @@ -18,20 +18,15 @@ Boston, MA 02111-1307, USA. */ #ifndef _SYS_SOCKET_H -#error "Never include <bits/socket.h> directly; use <sys/socket.h> instead." +# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead." #endif - -#include <features.h> - #define __need_size_t #define __need_NULL #include <stddef.h> #include <sys/types.h> -__BEGIN_DECLS - /* Type for length arguments in socket calls. */ typedef unsigned int socklen_t; @@ -216,5 +211,3 @@ struct linger int l_onoff; /* Nonzero to linger on close. */ int l_linger; /* Time to linger. */ }; - -__END_DECLS diff --git a/sysdeps/unix/sysv/linux/bits/stat.h b/sysdeps/unix/sysv/linux/bits/stat.h index 1b98448ff4..18432fd09e 100644 --- a/sysdeps/unix/sysv/linux/bits/stat.h +++ b/sysdeps/unix/sysv/linux/bits/stat.h @@ -16,12 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - * Never include this file directly; use <sys/stat.h> instead. - */ - -#ifndef _BITS_STAT_H -#define _BITS_STAT_H 1 +#ifndef _SYS_STAT_H +# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." +#endif /* Versions of the `struct stat' data structure. */ #define _STAT_VER_LINUX_OLD 1 @@ -126,5 +123,3 @@ struct stat64 #define __S_IREAD 0400 /* Read by owner. */ #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ - -#endif /* bits/stat.h */ diff --git a/sysdeps/unix/sysv/linux/bits/statfs.h b/sysdeps/unix/sysv/linux/bits/statfs.h index c79c80e84c..a56ed79e7c 100644 --- a/sysdeps/unix/sysv/linux/bits/statfs.h +++ b/sysdeps/unix/sysv/linux/bits/statfs.h @@ -16,12 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - * Never include this file directly; use <sys/statfs.h> instead. - */ - -#ifndef _BITS_STATFS_H -#define _BITS_STATFS_H +#ifndef _SYS_STATFS_H +# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." +#endif #include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/ @@ -62,5 +59,3 @@ struct statfs64 int f_spare[6]; }; #endif - -#endif /* bits/statfs.h */ diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h index dd42012374..926c3f32f4 100644 --- a/sysdeps/unix/sysv/linux/bits/termios.h +++ b/sysdeps/unix/sysv/linux/bits/termios.h @@ -17,13 +17,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - * Never include this file directly; use <termios.h> instead. - */ - - -#ifndef _BITS_TERMIOS_H -#define _BITS_TERMIOS_H 1 +#ifndef _TERMIOS_H +# error "Never include <bits/termios.h> directly; use <termios.h> instead." +#endif typedef unsigned char cc_t; typedef unsigned int speed_t; @@ -185,5 +181,3 @@ struct termios #define _IOT_termios /* Hurd ioctl type field. */ \ _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) - -#endif /* bits/termios.h */ diff --git a/sysdeps/unix/sysv/linux/bits/time.h b/sysdeps/unix/sysv/linux/bits/time.h index 509cb2ce32..3c1b27a1bb 100644 --- a/sysdeps/unix/sysv/linux/bits/time.h +++ b/sysdeps/unix/sysv/linux/bits/time.h @@ -21,23 +21,9 @@ * Never include this file directly; use <time.h> instead. */ -#ifdef __need_timeval -# undef __need_timeval -# ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 -/* A time value that is accurate to the nearest - microsecond but also has a range of years. */ -struct timeval - { - time_t tv_sec; /* Seconds. */ - time_t tv_usec; /* Microseconds. */ - }; -# endif /* struct timeval */ -#endif /* need timeval */ - - -#ifndef _BITS_TIME_H -#define _BITS_TIME_H 1 +#ifndef __need_timeval +# ifndef _BITS_TIME_H +# define _BITS_TIME_H 1 /* ISO/IEC 9899:1990 7.12.1: <time.h> The macro `CLOCKS_PER_SEC' is the number per second of the value @@ -45,12 +31,26 @@ struct timeval /* CAE XSH, Issue 4, Version 2: <time.h> The value of CLOCKS_PER_SEC is required to be 1 million on all XSI-conformant systems. */ -# define CLOCKS_PER_SEC 1000000 +# define CLOCKS_PER_SEC 1000000 -# ifndef __STRICT_ANSI__ +# ifndef __STRICT_ANSI__ /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK presents the real value for clock ticks per second for the system. */ -# define CLK_TCK 100 -# endif +# define CLK_TCK 100 +# endif -#endif /* bits/time.h */ +# endif /* bits/time.h */ +#endif + +#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. */ +struct timeval + { + __time_t tv_sec; /* Seconds. */ + __time_t tv_usec; /* Microseconds. */ + }; +#endif /* struct timeval */ diff --git a/sysdeps/unix/sysv/linux/bits/uio.h b/sysdeps/unix/sysv/linux/bits/uio.h index 3f1dc01c73..38ac17baa9 100644 --- a/sysdeps/unix/sysv/linux/bits/uio.h +++ b/sysdeps/unix/sysv/linux/bits/uio.h @@ -17,7 +17,7 @@ Boston, MA 02111-1307, USA. */ #ifndef _SYS_UIO_H -#error "Never use <bits/uio.h> directly; include <sys/uio.h> instead." +# error "Never include <bits/uio.h> directly; use <sys/uio.h> instead." #endif diff --git a/sysdeps/unix/sysv/linux/bits/utsname.h b/sysdeps/unix/sysv/linux/bits/utsname.h index 64e2ab5bbc..8f4bf16f5a 100644 --- a/sysdeps/unix/sysv/linux/bits/utsname.h +++ b/sysdeps/unix/sysv/linux/bits/utsname.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. The GNU C Library is free software; you can redistribute it and/or @@ -16,6 +16,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _SYS_UTSNAME_H +# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead." +#endif + /* Length of the entries in `struct utsname' is 65. */ #define _UTSNAME_LENGTH 65 diff --git a/sysdeps/unix/sysv/linux/bits/waitflags.h b/sysdeps/unix/sysv/linux/bits/waitflags.h index ba3528b709..e5945051ed 100644 --- a/sysdeps/unix/sysv/linux/bits/waitflags.h +++ b/sysdeps/unix/sysv/linux/bits/waitflags.h @@ -18,7 +18,7 @@ Boston, MA 02111-1307, USA. */ #ifndef _SYS_WAIT_H -#error "Never use <bits/waitflags.h> directly; include <sys/wait.h> instead." +# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead." #endif |