Hi,

I was playing around in the arch code of OpenBSD/i386 lately, and again
and again found that sys/user.h was not safe against multiple inclusions
from the same source file. Is that for a reason? One of my header files
needs to include sys/user.h, which creates a huge mess.

The following patch might fix this, although I think I might be on the
wrong track here.

--- a/sys/sys/user.h
+++ b/sys/sys/user.h
@@ -32,6 +32,9 @@
  *     @(#)user.h      8.2 (Berkeley) 9/23/93
  */
 
+#ifndef _SYS_USER_H_
+#define _SYS_USER_H_
+
 #include <machine/pcb.h>
 #ifndef _KERNEL
 /* stuff that *used* to be included by user.h, or is now needed */
@@ -58,3 +61,5 @@ struct        user {
 
        struct  pstats u_stats;         /* p_stats points here (use it!) */
 };
+
+#endif /* _SYS_USER_H_ */

Regards.


  - Christian 

-- 
God is real... unless declared an integer.

Reply via email to