http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47802
--- Comment #38 from dave at hiauly1 dot hia.nrc.ca 2011-03-10 16:58:38 UTC --- > While the latter is fixed, I think the _REENTRANT issue isn't. Or is it? > > If it it not fixed, I think we should have (a different) PR open to track that > issue. Dave, you wrote you were testing a patch for _REENTRANT ... Correct, I have a patch which I have been testing. While it seems to work, there is one issue that I don't particularly like. `-threads' is a multilib option handled completely by the gcc driver. It is not passed to the standard option processing, so I wasn't able to find a way to check for `-threads' in TARGET_OS_CPP_BUILTINS. Currently, I define _REENTRANT whenever we define _HPUX_SOURCE in TARGET_OS_CPP_BUILTINS. It is also defined by CPP_SPEC when -threads is specified. As a result, there are some situations where _REENTRANT is effectively defined twice. This could be avoided if _REENTRANT was only defined in CPP_SPEC but it is difficult to duplicate the option handling in TARGET_OS_CPP_BUILTINS. Since I haven't seen any actual problems with the current patch, I think I will commit it tonight. Dave