
would result in a problem with ::accept(). If the listen socket on which ::accept() is called is non-blocking, then the returned socket from ::accept() is blocking. This behaviour is different on HP/UX 11.11 were the new socket is also non-blocking.
I would have expected the cross-compiler to have some define that says you're compiling for HP/UX so that you change your code using preprocessor.
That's what autoconf does for you. The only thing you have to do is to prepare some macros which check if the requested feature is available and then produces a preprocessor define (like HAVE_MSG_NOSIGNAL). The benefit is that it is more genreric than checking in the code for the OS/OS version/OS release Like: #if defined (LINUX || Solaris_10) strerror_r #elif defined (Solaris_28 || HP/UX_11) strerror #else #ifdef HAS_STRERROR_R strerror_r #else strerror #endif
If it's not possible, then you'd have to set your own define manually, when building for HP/UX.
see above
I don't think autoconf can run a binary for target system to check run-time properties, even if you have the target system around.
Autoconf does run m4 macros (some already provided - but you can also implement your own) before you start compiling your source code.