This patch permits OpenMP to build and work (with both gcc and clang) on OpenBSD. It mostly follows what was done for FreeBSD and NetBSD, except OpenBSD does not have pthread_getattr_np support, so it follows OS X in that one instance.
I'm sorry to keep poking, but I would really appreciate this getting committed to the tree.
I am willing to work to ensure that OpenMP continues to build on OpenBSD and is not a hindrance to other platforms.
This is beyond the scope of this patch but all platforms (Windows, Linux, BSDs, MacOSX) as far as I can tell ship alloca(3) from <stdlib.h>. The only exception of a modern system that I'm aware of, where <stdlib.h> does not work for this task is Solaris, it requires <alloca.h>.
I would still very much like to add OpenBSD support to OpenMP. I have been using it for the past several months.
I have uploaded a new patch that rebases the OpenBSD additions to HEAD.