<div dir="ltr">Hi,<div class="gmail_extra"><br><div class="gmail_quote">On 2 July 2014 20:14, Hans de Goede <span dir="ltr"><<a href="mailto:hdegoede@redhat.com" target="_blank">hdegoede@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">include/os.h defines protyptes for various non ansi-c str functions, such<br>
as str[n]casecmp and strndup. The definition of the prototypes is guarded<br>
by #ifndef HAVE_STRFOO, but HAVE_STRFOO is defined by xorg-server.h which<br>
is not included by all users of os.h. E.g. glamor.h does not and should not<br>
include xorg-server.h<br>
<br>
This is a problem since the these prototype declarations clash with the libc<br>
declarations when using the latest glibc:<br>
<br>
In file included from /usr/include/xorg/misc.h:115:0,<br>
                 from /usr/include/xorg/screenint.h:50,<br>
                 from /usr/include/xorg/scrnintstr.h:50,<br>
                 from /usr/include/xorg/glamor.h:32,<br>
                 from conftest.c:61:<br>
/usr/include/xorg/os.h:579:2: error: expected identifier or '(' before '__extension__'<br>
 strndup(const char *str, size_t n);<br><br>
To fix this, this commit moves the HAVE_STRFOO defines to their own<br>
(generated) header called os-strfeatures.h, and unconditionally includes this<br>
header from os.h .<br></blockquote><div><br></div><div>NAK.</div><div><br></div><div>If glamor.h includes scrnintstr.h, it must include xorg-server.h. xorg-server.h (as distinct from xorg-config.h) is the specially-generated header designed explicitly to be included by all exported/SDK modules which include internal headers, since it carries defines such as _XSERVER64 (and many, many more) which thoroughly smash the server ABI.</div>
<div><br></div><div>If glamor.h can't have xorg-server.h, then it can't have any other server headers either.</div><div><br></div><div>Cheers,</div><div>Daniel </div></div></div></div>