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.

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to