Hi Branden, On Sun, Mar 12, 2000 at 10:32:06PM -0500, Branden Robinson wrote: > Hmm. I am using the following patch, which I got from slashdot of all > places: > > --- xc/config/makedepend/cppsetup.c.orig Sun Mar 12 15:47:41 2000 > +++ xc/config/makedepend/cppsetup.c Sun Mar 12 15:48:21 2000 > @@ -188,7 +188,7 @@ > return 0; > do { > var = (*s)->s_value; > - if (!isvarfirstletter(*var)) > + if (!isvarfirstletter(*var) || !strcmp((*s)->s_name, var)) > break; > s = lookup_variable (ip, var, strlen(var)); > } while (s); > > It did seem to fix the problem. If someone who understands cppsetup.c > could comment and it turns out that this patch doesn't in fact disable some > feature of cppsetup, I will submit this patch to XFree86.
This is the code to evaluate the value of a macro. E.g. if you write #define FOO BAR #define BAR BAZ it will lookup "FOO" and get "BAR", then lookup "BAR" and get "BAZ" which is not a macro. Now ANSI-C defines that you can say #define FOO FOO and the preprocessor will handle this without looping. The old code lookup up "FOO", found "FOO" as value, looked up "FOO" ad nauseum. The patch just checks if the macro is defined as itself and breaks the loop in that case. I think this patch is perfectly valid and should go upstream. HTH Torsten -- Torsten Landschoff [EMAIL PROTECTED] <[EMAIL PROTECTED]> Debian Developer and Quality Assurance Committee Member