On 07/13/15 11:29, Don Lewis wrote:
...
OpenOffice has a clang patch that was not catching this.
I hacked it for FreeBSD now:
http://svn.apache.org/viewvc?view=revision&revision=1690740

But there is certainly something wrong as clang is not being detected.
I think clang defines __GNUC__, so with the existing clang patch we
were still using the original typedef.  If the compiler didn't croak
there, then we would have redefined the typedef again in the __clang__
section.
Yes, clang reports itself as gcc 4.2, so it sets __GNUC__ and
__clang__.

The patch I committed should be a no-op (except for gcc).
<http://stackoverflow.com/questions/28166565/detect-gcc-as-opposed-to-msvc-clang-with-macro>


#if defined(__FreeBSD__) && defined(__GNUC__)
    typedef typeof(SIG_DFL) CoinSighandler_t;
#  define CoinSighandler_t_defined
#endif

//-----------------------------------------------------------------------------

...
<some lines later>
...
//-----------------------------------------------------------------------------

#if defined(__clang__)
    typedef void(*CoinSighandler_t)(int);
#  define CoinSighandler_t_defined
#elif defined(__MACH__) && defined(__GNUC__)
    typedef typeof(SIG_DFL) CoinSighandler_t;
#  define CoinSighandler_t_defined
#endif

Ugh.. the problem is I am only looking at diffs, not at the code so
I missed this mess.

Second try:

http://svn.apache.org/viewvc?view=revision&revision=1690755


Pedro.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org

Reply via email to