Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: After changes to sys/ddb build is broken..



On Tue, Apr 12, 2011 at 1:32 PM, henning petersen
<henning.petersen%t-online.de@localhost> wrote:
> After changes to db_lwp.c and db_print.c build is broken,
> in db_lwp.c <sys/cpu.h> is includes twice and in db_print.c <stdbool.h>
> is missing.

I think this is wrong.  sys/cpu.h is _already_ including stdbool.h,
but the inclusion happens way down below the first use.  The includes
need to be moved to the top, like in:

Index: include/cpu.h
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/include/cpu.h,v
retrieving revision 1.31
diff -u -p -r1.31 cpu.h
--- include/cpu.h       24 Feb 2011 15:42:17 -0000      1.31
+++ include/cpu.h       12 Apr 2011 12:37:51 -0000
@@ -46,6 +46,12 @@
 #endif
 #endif

+#if defined(_KERNEL) || defined(_STANDALONE)
+#include <sys/types.h>
+#else
+#include <stdbool.h>
+#endif /* _KERNEL || _STANDALONE */
+
 /*
  * Definitions unique to x86 cpu support.
  */
@@ -435,12 +441,6 @@ void x86_bus_space_mallocok(void);

 #endif /* _KERNEL || __KMEMUSER */

-#if defined(_KERNEL) || defined(_STANDALONE)
-#include <sys/types.h>
-#else
-#include <stdbool.h>
-#endif /* _KERNEL || _STANDALONE */
-
 /*
  * CTL_MACHDEP definitions.
  */

-- 
Julio Merino / @jmmv


Home | Main Index | Thread Index | Old Index