[libcxx] r339794 - For FreeBSD, don't define _M in nasty_macros.hpp

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 16 02:45:50 PDT 2018


Merged to 7.0 in r339852.

On Wed, Aug 15, 2018 at 7:30 PM, Dimitry Andric via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
> Author: dim
> Date: Wed Aug 15 10:30:32 2018
> New Revision: 339794
>
> URL: http://llvm.org/viewvc/llvm-project?rev=339794&view=rev
> Log:
> For FreeBSD, don't define _M in nasty_macros.hpp
>
> Because FreeBSD uses _M in its <sys/types.h>, and it is hard to avoid
> including that header, only define _M to NASTY_MACRO for other operating
> systems.  This fixes almost 2000 unexpected test failures.
>
> Discussed with Eric Fiselier.
>
> Modified:
>     libcxx/trunk/test/support/nasty_macros.hpp
>
> Modified: libcxx/trunk/test/support/nasty_macros.hpp
> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/nasty_macros.hpp?rev=339794&r1=339793&r2=339794&view=diff
> ==============================================================================
> --- libcxx/trunk/test/support/nasty_macros.hpp (original)
> +++ libcxx/trunk/test/support/nasty_macros.hpp Wed Aug 15 10:30:32 2018
> @@ -22,7 +22,11 @@
>  #define _J NASTY_MACRO
>  #define _K NASTY_MACRO
>  #define _L NASTY_MACRO
> +// Because FreeBSD uses _M in its <sys/types.h>, and it is hard to avoid
> +// including that header, only define _M for other operating systems.
> +#ifndef __FreeBSD__
>  #define _M NASTY_MACRO
> +#endif
>  #define _N NASTY_MACRO
>  #define _O NASTY_MACRO
>  #define _P NASTY_MACRO
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


More information about the cfe-commits mailing list