On 17 Nov 2003, at 22:09, Henrik Nordstrom <[EMAIL PROTECTED]> wrote:

> On Mon, 17 Nov 2003, Andres Kroonmaa wrote:
>
> >  gcc (3.3.1 and 3.3.2) produce error whenever there is variable
> >  definition with all uppercase:
> >
> > protos.h
> > -SQUIDCEXTERN void fwdServersFree(FwdServer ** FS);
> > +SQUIDCEXTERN void fwdServersFree(FwdServer ** fs);
>
> Most likely there is a #define FS in some include file somewhere in
> your system...

 indeed:
/usr/include/ia32/sys/reg.h:#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
/usr/include/ia32/sys/reg.h:#define     CS      15
/usr/include/ia32/sys/reg.h:#define     FS      1
/usr/include/ia32/sys/reg.h:#define     PS      EFL

 register names defined to have index into some array..
 Had same issue with CS and PS also. Maybe more to come.

 Its Solaris8 x86 system, btw.

> gcc -E will show what the above looks like to the C++ compiler after
> preprocessor expansions..

static void
peerAddFwdServer(FwdServer ** 1, peer * p, hier_code code)
{
...
    while (*1)
        1 = &(*1)->next;

    *1 = fs;
}

 So, then, what is correct way to solve this? Rename vars in all cases
 that conflict? I'll submit you a patch with rename changes, and you'll
 review for consistent naming conventions, ok?


------------------------------------
 Andres Kroonmaa <[EMAIL PROTECTED]>
 CTO, Microlink Data AS
 Tel: 6501 731, Fax: 6501 725
 P�rnu mnt. 158, Tallinn
 11317 Estonia

Reply via email to