[PATCH 1/5] Replace DDXBEFORERESET with a more general way of doing DDX-specific hooks
Jon TURNEY
jon.turney at dronecode.org.uk
Fri Apr 9 06:47:35 PDT 2010
On 07/04/2010 18:32, Jamey Sharp wrote:
> I'm confused about whether multiple declarations of the same global
> are allowed. In this case, ddxHooks is declared in both
> xwin/InitOutput.c and dispatch.c. But as far as I can tell, this can't
> hurt any DDX except Xwin, and I assume you've tested that it works
> there, so I'd guess it's fine. :-)
Hmmm.... yes
Rereading the language of section 6.9.2 of the C standard (or at least the
draft I could find, since I seem to have mislaid my copy of the C89 standard
:-) ), the tentative declaration only is only required to remain tentative to
the end of a file.
I guess this means this approach won't work if gcc -fno-common (or another
compiler which behaves like that) is used.
So, I suppose I need to change this to use a functional interface to
initialize ddxHooks.
More information about the xorg-devel
mailing list