From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1033) id AEBEF383D831; Thu, 22 Jul 2021 15:28:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AEBEF383D831 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: David Edelsohn To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-2471] aix: Protect AIX math.h overloads with new macro. X-Act-Checkin: gcc X-Git-Author: David Edelsohn X-Git-Refname: refs/heads/master X-Git-Oldrev: c9ca352186226ae757688e160e7c6f394c9f26aa X-Git-Newrev: 3f7a2374d312112ea9a858dbbb883edf50730e96 Message-Id: <20210722152816.AEBEF383D831@sourceware.org> Date: Thu, 22 Jul 2021 15:28:16 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2021 15:28:16 -0000 https://gcc.gnu.org/g:3f7a2374d312112ea9a858dbbb883edf50730e96 commit r12-2471-g3f7a2374d312112ea9a858dbbb883edf50730e96 Author: David Edelsohn Date: Wed Jul 21 14:06:45 2021 -0400 aix: Protect AIX math.h overloads with new macro. AIX math.h provides C++ overloaded inlined math functions, which should not be present for G++. The definitions have been guaded by __COMPATMATH__, but that macro had other uses in IBM xlC++. A new macro has been introduced with the sole purpose of guarding the functions. This patch updates libstdc++ os_defines.h to define the additional macro. The earlier macro definition is retained to guard the functions in the math.h header of earlier AIX releases. libstdc++-v3/ChangeLog: * config/os/aix/os_defines.h (__LIBC_NO_CPP_MATH_OVERLOADS__): Define. Diff: --- libstdc++-v3/config/os/aix/os_defines.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libstdc++-v3/config/os/aix/os_defines.h b/libstdc++-v3/config/os/aix/os_defines.h index 723a6533319..265e2941d1a 100644 --- a/libstdc++-v3/config/os/aix/os_defines.h +++ b/libstdc++-v3/config/os/aix/os_defines.h @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later WITH GCC-exception-3.1 // Specific definitions for AIX -*- C++ -*- // Copyright (C) 2000-2021 Free Software Foundation, Inc. @@ -48,6 +49,10 @@ #define __COMPATMATH__ #endif +#ifndef __LIBC_NO_CPP_MATH_OVERLOADS__ +#define __LIBC_NO_CPP_MATH_OVERLOADS__ +#endif + // No support for referencing weak symbols without a definition. #define _GLIBCXX_USE_WEAK_REF 0