Subject: Re: interrupt_reg variable
To: Andy <port-macppc@netbsd.org>
From: Laurent de Segur <lds@apple.com>
List: port-macppc
Date: 07/08/2000 10:40:34
Try it for yourself with a test case but globals are globals whether it
makes it difficult to read or not. Some compilers would issue a warning.
Adding extern to the one that is not initialized would not hurt though.

L
----- Original Message -----
From: "Andy" <andy@softbook.com>
To: <port-macppc@netbsd.org>
Sent: Thursday, July 06, 2000 6:13 PM
Subject: Re: interrupt_reg variable


> hmm, and the linker is happy with the two same name/type variable
> declarations? Neither of them is declared extern..
> Andy
>
> >On Thu, 29 Jun 2000, Andy wrote:
> >
> >> There are 2 global variables called interrupt_reg that are declared in
both
> >> macppc/autoconf.c and macppc/extintr.c
> >> The one in autoconf.c is initialized ( interrupt_reg = mapiodev(...)
> >> But the one in extintr.c is not initialized but used ( in macros
> >> INT_STATE_REG, etc)
> >>
> >> Where is the interrupt_reg in extintr.c initialized ?
> >
> >If they really are globals, then they are the same thing. Thus it is
> >initialized in autoconf.c. :-)
> >
> >Take care,
> >
> >Bill
>
>
>
>