We define a lot of POSIX macros like this in <unistd.h>.
Do you need anyone to test your ttyname_r patch? I can try to test it with
mono here on RELENG_5 and see how it goes. I don't know ttyname_r that
much, but I can dig in web/google.
The convention on Linux's glibc is to only define a _POSIX
macro if the feature is supported. Consequently, a lot of
software written on Linux which assumes this convention will break
The Linux glibc convention is IMHO more intuitive,
but FreeBSD is more "standards" conformant.
So the Mono code is not entirely doing the right thing
with respect to checking _POSIX_THREAD_PROCESS_SHARED....but
you mention that the Mono code isn't even consistent in checking this
macro. Bleh. :)