-
-
How much useful you can do with the result is another question.
-
Well, you can remove the need of checking with autotools, and defer checking to runtime. If not available, you can provide your own semantically equal replacement.
-
While I love this hack, as it is, it's still not a substitute for the kind of check that autotools makes. Consider XSI vs. GNU strerror_r(3), or functions with parameters of the same type but in different order (almost like sendfile(2) in macOS and FreeBSD).
-
It (rather a minor variant of it) can actually distinguish GNU vs XSI strerror_r and write a portable wrapper that can use either!
-
Ah, indeed, the return type is different!
-
Oh, then that's a stopper. :-(
-
Of course if you already know the function is declared in one way or the other, you can skip testing that, and then testing which function type it's compatible with is a simple use of _Generic.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.