diff options
-rw-r--r-- | imakemdep.h | 15 | ||||
-rw-r--r-- | main.c | 5 |
2 files changed, 11 insertions, 9 deletions
diff --git a/imakemdep.h b/imakemdep.h index f1b8a8f..75a540f 100644 --- a/imakemdep.h +++ b/imakemdep.h @@ -26,23 +26,26 @@ in this Software without prior written authorization from The Open Group. /* - * This file contains machine-dependent constants for the imake utility. - * When porting imake, read each of the steps below and add in any necessary - * definitions. In general you should *not* edit ccimake.c or imake.c! + * This file contains machine-dependent constants for the makedepend utility. + * When porting makedepend, add in any necessary definitions for selecting + * the right headers to include on your platform. */ +struct predef_symtab { + const char *s_name; + const char *s_value; +}; #if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP) /* predefs: * If your compiler and/or preprocessor define any specific symbols, add - * them to the the following table. The definition of struct symtab is - * in util/makedepend/def.h. + * them to the the following table. */ #undef DEF_EVALUATE #undef DEF_STRINGIFY #define DEF_EVALUATE(__x) #__x #define DEF_STRINGIFY(_x) DEF_EVALUATE(_x) -static const struct symtab predefs[] = { +static const struct predef_symtab predefs[] = { #ifdef apollo {"apollo", "1"}, #endif @@ -144,7 +144,6 @@ main(int argc, char *argv[]) struct inclist *ip; char *makefile = NULL; struct filepointer *filecontent; - const struct symtab *psymp = predefs; const char *endmarker = NULL; char *defincdir = NULL; char **undeflist = NULL; @@ -152,9 +151,9 @@ main(int argc, char *argv[]) ProgramName = argv[0]; - while (psymp->s_name) { + for (const struct predef_symtab *psymp = predefs ; + psymp->s_name != NULL ; psymp++) { define2(psymp->s_name, psymp->s_value, &maininclist); - psymp++; } #ifdef __sun /* Solaris predefined values that are computed, not hardcoded */ |