[Xcb] Adding pthread stubs into libxcb

Josh Triplett josh at freedesktop.org
Wed Nov 8 11:48:00 PST 2006


Diego 'Flameeyes' Pettenò wrote:
> I was thinking of using the AC_CHECK_FUNCS method myself,

Note that AC_CHECK_FUNCS won't do what you want; it only checks for a function
in the standard C library or in a library you designate, rather than in all
libraries linked by default as AC_TRY_LINK does.

> but this means 
> having about 6 lines for every function, as you cannot use preprocessor 
> macros expansion to do the job (#if* in macros is not allowed)..

That doesn't seem all that onerous.

> The only way I can think to do this "cleanly" is to use an sh script that 
> generates the C code, but it's kinda strange that approach, too. Or maybe 
> using the Makefile itself and generate a series of .c files with the stubs 
> for every function. Both these solutions are kinda complicated, I'd still 
> prefer the current solutions.

All of those seem like overkill just to avoid copy-pasting a few lines for
each of a dozen or so pthread functions.  Once we get this working correctly,
we hopefully won't need to touch it again, so we don't really need a
code-generation solution.

- Josh Triplett

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20061108/c9fb8adc/signature-0001.pgp


More information about the Xcb mailing list