From 2065c9982bc101f91918b7ff6ca938ce1a841b59 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Wed, 15 Sep 2010 08:47:10 +0000 Subject: [PATCH] include - minor compile fixes (including in files that use it) workaround for kernel/debug.h that causes to be included in mpx.S indirectly. --- include/ansi.h | 4 ++++ include/err.h | 7 +++---- include/strings.h | 2 ++ include/util.h | 1 + kernel/debug.h | 2 ++ 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/ansi.h b/include/ansi.h index 9d3d8a135..34f7c1559 100644 --- a/include/ansi.h +++ b/include/ansi.h @@ -69,4 +69,8 @@ #define _POSIX_SOURCE 1 #endif +/* What is a va_list? */ +#include +#define _BSD_VA_LIST_ va_list + #endif /* ANSI_H */ diff --git a/include/err.h b/include/err.h index c8e6df506..e44709ba5 100644 --- a/include/err.h +++ b/include/err.h @@ -34,10 +34,6 @@ #ifndef _ERR_H_ #define _ERR_H_ -#ifdef __minix -#define _BSD_VA_LIST_ va_list -#include -#else /* * Don't use va_list in the err/warn prototypes. Va_list is typedef'd in two * places ( and ), so if we include one @@ -45,6 +41,9 @@ * for utilities to have to include one of them to include err.h, so we get * _BSD_VA_LIST_ from and use it. */ +#ifdef __minix +#include +#else #include #endif #include diff --git a/include/strings.h b/include/strings.h index f6ce07feb..6432e469c 100644 --- a/include/strings.h +++ b/include/strings.h @@ -2,6 +2,8 @@ strings.h */ +#include + /* Open Group Base Specifications Issue 6 (not complete) */ _PROTOTYPE( char *index, (const char *_s, int _charwanted) ); _PROTOTYPE( int strcasecmp, (const char *_s1, const char *_s2) ); diff --git a/include/util.h b/include/util.h index bf8ec2d86..45ff06c26 100644 --- a/include/util.h +++ b/include/util.h @@ -38,6 +38,7 @@ #include #include #include +#include #ifdef _BSD_TIME_T_ typedef _BSD_TIME_T_ time_t; diff --git a/kernel/debug.h b/kernel/debug.h index 575e0b4ef..d0a830290 100644 --- a/kernel/debug.h +++ b/kernel/debug.h @@ -7,9 +7,11 @@ * other kernel headers. */ +#ifndef __ASSEMBLY__ #include #include #include "config.h" +#endif /* Enable prints such as * . send/receive failed due to deadlock or dead source or dead destination