This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

protect <bits/*.h> files against inclusion


Hi,

The protection against direct inclusion of <bits/*.h> files has apparently
been forgotten for <bits/stropts.h> and <bits/ustat.h>. Here is a patch that
adds it.


2002-07-06  Bruno Haible  <bruno@clisp.org>

	* sysdeps/generic/bits/stropts.h: Protect against direct inclusion.
	* sysdeps/generic/bits/ustat.h: Likewise.

diff -r -c3 glibc-20020627.bak/sysdeps/generic/bits/stropts.h glibc-20020627/sysdeps/generic/bits/stropts.h
--- glibc-20020627.bak/sysdeps/generic/bits/stropts.h	Tue Jul 10 23:00:36 2001
+++ glibc-20020627/sysdeps/generic/bits/stropts.h	Fri Jul  5 01:17:07 2002
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2002 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 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#ifndef _STROPTS_H
+# error "Never include <bits/stropts.h> directly; use <stropts.h> instead."
+#endif
+
 #ifndef _BITS_STROPTS_H
 #define _BITS_STROPTS_H	1
 
diff -r -c3 glibc-20020627.bak/sysdeps/generic/bits/ustat.h glibc-20020627/sysdeps/generic/bits/ustat.h
--- glibc-20020627.bak/sysdeps/generic/bits/ustat.h	Thu Jun 27 21:00:02 2002
+++ glibc-20020627/sysdeps/generic/bits/ustat.h	Fri Jul  5 01:28:59 2002
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2002 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 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#ifndef _SYS_USTAT_H
+# error "Never include <bits/ustat.h> directly; use <sys/ustat.h> instead."
+#endif
+
 #include <sys/types.h>
 
 struct ustat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]