Your question is missing a lot of details, but I hit the same issue with C++ using stlport4 because it defines _XOPEN_SOURCE=500. I was told that this would be removed in the next version. In the mean time, you can add -D_GNU_SOURCE or -D_BSD_SOURCE to your CXXFLAGS. If you are talking about something else than c++ with stlport4, then please say so, details can only help...
> It sounds like Sun is uncertain on the gnu compatibility
Well, not actually that. The truth is that gnu itself is uncertain on the gnu compatibility, and even more it is uncertain about compatibility with other compilers.
There are many problems with glibc headers being unreasonably tied to the fact that compiler has GNU_SOURCE enabled.
We dont have it, and we get hosed in many different ways.
(here is one of the bug report we submitted on glibc headers: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=179525)
> it would really help if some docs exist (or did I miss them) advising on common compiler flags
Thats true, and we hope to be able to address this issue till the release.
There is a public twiki that some of our engineers try to support.
Feel free to contribute there. http://www.genunix.org/wiki/index.php/Category:Sun_Studio
regards,
__Fedor.