Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 69982 invoked from network); 7 Dec 2007 00:23:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Dec 2007 00:23:07 -0000 Received: (qmail 62531 invoked by uid 500); 7 Dec 2007 00:22:56 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 62517 invoked by uid 500); 7 Dec 2007 00:22:56 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 62504 invoked by uid 99); 7 Dec 2007 00:22:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2007 16:22:56 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Dec 2007 00:23:04 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5B8E871425B for ; Thu, 6 Dec 2007 16:22:43 -0800 (PST) Message-ID: <32945617.1196986963371.JavaMail.jira@brutus> Date: Thu, 6 Dec 2007 16:22:43 -0800 (PST) From: "Martin Sebor (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Commented: (STDCXX-677) [IBM XLC++ 9.0/AIX 5.3] tr1/cstdint limit macros incompatible with system provided C headers In-Reply-To: <21536106.1196905003317.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549248 ] Martin Sebor commented on STDCXX-677: ------------------------------------- I agree that we should avoid interfering with the native C library if it defines these things. The tr1/ subdirectory isn't supported (whatever that means in our world) and its contents will eventually (in 4.3 or later) be moved directly under include, when we enable at least partial support for C++ 0x. Until then, I suppose we can guard against the re-#definition of these macros in our . > [IBM XLC++ 9.0/AIX 5.3] tr1/cstdint limit macros incompatible with system provided C headers > -------------------------------------------------------------------------------------------- > > Key: STDCXX-677 > URL: https://issues.apache.org/jira/browse/STDCXX-677 > Project: C++ Standard Library > Issue Type: Bug > Components: TR1.8 - C Compatibility > Affects Versions: 4.2.0 > Reporter: Travis Vitek > Assignee: Travis Vitek > Fix For: 4.2.1 > > > The following testcase fails to compile because both the C library stdint.h and our tr1/cstdint headers define defines the C99 limit macros. It looks like we need to avoid defining the macros if a previous definition already exists. Is that a sufficient solution? What if our defintion is different for some reason? > $ cat u.cpp && gmake u > #include > #include > xlCcore -c -I/amd/devco/vitek/stdcxx/trunk/include/ansi -D_RWSTDDEBUG -I/amd/devco/vitek/stdcxx/trunk/include -I/build/vitek/11s/include -I/amd/devco/vitek/stdcxx/trunk/tests/include -g -qtemplateregistry=u.ti u.cpp > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 56.11: 1540-0848 (S) The macro name "INT8_MAX" is already defined with a different definition. > "/usr/include/stdint.h", line 142.9: 1540-0425 (I) "INT8_MAX" is defined on line 142 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 57.11: 1540-0848 (S) The macro name "UINT8_MAX" is already defined with a different definition. > "/usr/include/stdint.h", line 149.9: 1540-0425 (I) "UINT8_MAX" is defined on line 149 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 116.11: 1540-0848 (S) The macro name "INT16_MAX" is already defined with a different definition. > "/usr/include/stdint.h", line 143.9: 1540-0425 (I) "INT16_MAX" is defined on line 143 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 117.11: 1540-0848 (S) The macro name "UINT16_MAX" is already defined with a different definition. > "/usr/include/stdint.h", line 150.9: 1540-0425 (I) "UINT16_MAX" is defined on line 150 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 171.13: 1540-0848 (S) The macro name "INT32_MAX" is already defined with a different definition. > "/usr/include/stdint.h", line 144.9: 1540-0425 (I) "INT32_MAX" is defined on line 144 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 172.13: 1540-0848 (S) The macro name "UINT32_MAX" is already defined with a different definition. > "/usr/include/stdint.h", line 151.9: 1540-0425 (I) "UINT32_MAX" is defined on line 151 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 225.13: 1540-0848 (S) The macro name "INT64_MAX" is already defined with a different definition. > "/usr/include/stdint.h", line 146.9: 1540-0425 (I) "INT64_MAX" is defined on line 146 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 226.13: 1540-0848 (S) The macro name "UINT64_MAX" is already defined with a different definition. > "/usr/include/stdint.h", line 153.9: 1540-0425 (I) "UINT64_MAX" is defined on line 153 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 323.9: 1540-0848 (S) The macro name "PTRDIFF_MIN" is already defined with a different definition. > "/usr/include/stdint.h", line 222.9: 1540-0425 (I) "PTRDIFF_MIN" is defined on line 222 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 324.9: 1540-0848 (S) The macro name "PTRDIFF_MAX" is already defined with a different definition. > "/usr/include/stdint.h", line 223.9: 1540-0425 (I) "PTRDIFF_MAX" is defined on line 223 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 326.9: 1540-0848 (S) The macro name "SIZE_MAX" is already defined with a different definition. > "/usr/include/stdint.h", line 246.9: 1540-0425 (I) "SIZE_MAX" is defined on line 246 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 328.9: 1540-0848 (S) The macro name "WCHAR_MIN" is already defined with a different definition. > "/usr/include/stdint.h", line 236.9: 1540-0425 (I) "WCHAR_MIN" is defined on line 236 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 329.9: 1540-0848 (S) The macro name "WCHAR_MAX" is already defined with a different definition. > "/usr/include/stdint.h", line 234.9: 1540-0425 (I) "WCHAR_MAX" is defined on line 234 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 331.9: 1540-0848 (S) The macro name "WINT_MIN" is already defined with a different definition. > "/usr/include/stdint.h", line 239.9: 1540-0425 (I) "WINT_MIN" is defined on line 239 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 332.9: 1540-0848 (S) The macro name "WINT_MAX" is already defined with a different definition. > "/usr/include/stdint.h", line 240.9: 1540-0425 (I) "WINT_MAX" is defined on line 240 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 334.9: 1540-0848 (S) The macro name "SIG_ATOMIC_MIN" is already defined with a different definition. > "/usr/include/stdint.h", line 226.9: 1540-0425 (I) "SIG_ATOMIC_MIN" is defined on line 226 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 335.9: 1540-0848 (S) The macro name "SIG_ATOMIC_MAX" is already defined with a different definition. > "/usr/include/stdint.h", line 227.9: 1540-0425 (I) "SIG_ATOMIC_MAX" is defined on line 227 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 339.9: 1540-0848 (S) The macro name "INT8_MIN" is already defined with a different definition. > "/usr/include/stdint.h", line 135.9: 1540-0425 (I) "INT8_MIN" is defined on line 135 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 340.9: 1540-0848 (S) The macro name "INT16_MIN" is already defined with a different definition. > "/usr/include/stdint.h", line 136.9: 1540-0425 (I) "INT16_MIN" is defined on line 136 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 341.9: 1540-0848 (S) The macro name "INT32_MIN" is already defined with a different definition. > "/usr/include/stdint.h", line 137.9: 1540-0425 (I) "INT32_MIN" is defined on line 137 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 342.9: 1540-0848 (S) The macro name "INT64_MIN" is already defined with a different definition. > "/usr/include/stdint.h", line 139.9: 1540-0425 (I) "INT64_MIN" is defined on line 139 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 344.9: 1540-0848 (S) The macro name "INT_LEAST8_MIN" is already defined with a different definition. > "/usr/include/stdint.h", line 156.9: 1540-0425 (I) "INT_LEAST8_MIN" is defined on line 156 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 345.9: 1540-0848 (S) The macro name "INT_LEAST16_MIN" is already defined with a different definition. > "/usr/include/stdint.h", line 157.9: 1540-0425 (I) "INT_LEAST16_MIN" is defined on line 157 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 346.9: 1540-0848 (S) The macro name "INT_LEAST32_MIN" is already defined with a different definition. > "/usr/include/stdint.h", line 158.9: 1540-0425 (I) "INT_LEAST32_MIN" is defined on line 158 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 347.9: 1540-0848 (S) The macro name "INT_LEAST64_MIN" is already defined with a different definition. > "/usr/include/stdint.h", line 160.9: 1540-0425 (I) "INT_LEAST64_MIN" is defined on line 160 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 349.9: 1540-0848 (S) The macro name "INT_FAST8_MIN" is already defined with a different definition. > "/usr/include/stdint.h", line 177.9: 1540-0425 (I) "INT_FAST8_MIN" is defined on line 177 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 350.9: 1540-0848 (S) The macro name "INT_FAST16_MIN" is already defined with a different definition. > "/usr/include/stdint.h", line 178.9: 1540-0425 (I) "INT_FAST16_MIN" is defined on line 178 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 351.9: 1540-0848 (S) The macro name "INT_FAST32_MIN" is already defined with a different definition. > "/usr/include/stdint.h", line 179.9: 1540-0425 (I) "INT_FAST32_MIN" is defined on line 179 of "/usr/include/stdint.h". > "/amd/devco/vitek/stdcxx/trunk/include/tr1/cstdint", line 352.9: 1540-0848 (S) The macro name "INT_FAST64_MIN" is already defined with a different definition. > "/usr/include/stdint.h", line 181.9: 1540-0425 (I) "INT_FAST64_MIN" is defined on line 181 of "/usr/include/stdint.h". > gmake: *** [u.o] Error 1 > $ grep "INT8_MAX" /usr/include/stdint.h > #define INT8_MAX (127) > #define UINT8_MAX (255U) > #define INT_LEAST8_MAX INT8_MAX > #define UINT_LEAST8_MAX UINT8_MAX > #define INT_FAST8_MAX INT8_MAX > #define UINT_FAST8_MAX UINT8_MAX > $ grep "INT8_MAX" /nfs/devco/vitek/stdcxx/trunk/include/tr1/cstdint > # define INT8_MAX 127 > # define UINT8_MAX 255U > # define INT_LEAST8_MAX INT8_MAX > # define UINT_LEAST8_MAX UINT8_MAX > # define INT_FAST8_MAX INT8_MAX > # define UINT_FAST8_MAX UINT8_MAX > #define INT8_MIN _RWSTD_T_MIN (INT8_MAX) > $ -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.