From: Randy Dunlap Fix mtrr-add.c and mtrr-show.c in Doc/mtrr.txt to build cleanly. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton --- Documentation/mtrr.txt | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff -puN Documentation/mtrr.txt~doc-fix-mtrr-userspace-programs-to-build-cleanly Documentation/mtrr.txt --- devel/Documentation/mtrr.txt~doc-fix-mtrr-userspace-programs-to-build-cleanly 2006-04-05 01:10:32.000000000 -0700 +++ devel-akpm/Documentation/mtrr.txt 2006-04-05 01:10:32.000000000 -0700 @@ -138,19 +138,29 @@ Reading MTRRs from a C program using ioc */ #include +#include #include #include #include #include #include #include -#define MTRR_NEED_STRINGS #include #define TRUE 1 #define FALSE 0 #define ERRSTRING strerror (errno) +static char *mtrr_strings[MTRR_NUM_TYPES] = +{ + "uncachable", /* 0 */ + "write-combining", /* 1 */ + "?", /* 2 */ + "?", /* 3 */ + "write-through", /* 4 */ + "write-protect", /* 5 */ + "write-back", /* 6 */ +}; int main () { @@ -232,13 +242,22 @@ Creating MTRRs from a C programme using #include #include #include -#define MTRR_NEED_STRINGS #include #define TRUE 1 #define FALSE 0 #define ERRSTRING strerror (errno) +static char *mtrr_strings[MTRR_NUM_TYPES] = +{ + "uncachable", /* 0 */ + "write-combining", /* 1 */ + "?", /* 2 */ + "?", /* 3 */ + "write-through", /* 4 */ + "write-protect", /* 5 */ + "write-back", /* 6 */ +}; int main (int argc, char **argv) { _