Log Message: Fix the C99 problem on SunOS properly. GCC 4.6 and newer on SunOS will force C99 with C++, which requires _XOPEN_SOURCE=600 to be set. On the other hand, GCC 4.5 and earlier will require C99 for _XOPEN_SOURCE=600, but reject C99 for C++ code. Set _XOPEN_SOURCE to 500 or 600 accordingly.