This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 07/11] [C++/mingw] Define __STDC_CONSTANT_MACROS / __STDC_LIMIT_MACROS for stdint.h
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>, gdb-patches at sourceware dot org
- Date: Tue, 03 Nov 2015 14:06:57 +0000
- Subject: Re: [PATCH 07/11] [C++/mingw] Define __STDC_CONSTANT_MACROS / __STDC_LIMIT_MACROS for stdint.h
- Authentication-results: sourceware.org; auth=none
- References: <1446492970-21432-1-git-send-email-palves at redhat dot com> <1446492970-21432-8-git-send-email-palves at redhat dot com> <5637CBC9 dot 2050404 at ericsson dot com> <5638BD73 dot 8000706 at ericsson dot com>
On 11/03/2015 01:58 PM, Simon Marchi wrote:
> On 15-11-02 03:47 PM, Simon Marchi wrote:
>> FYI, I stumbled on the same problem when building for various architectures this weekend. I
>> generated some toolchains by using some of the Buildroot included configurations, which use
>> uclibc. I ended up defining those macros as well in CFLAGS. So that change can help for more
>> configurations than just mingw.
>
> Actually, would it be better to add ifndefs?
>
> #ifndef __STDC_CONSTANT_MACROS
> #define __STDC_CONSTANT_MACROS
> #endif
>
> (same for __STDC_LIMIT_MACROS)
>
> I tried to build the latest version of the branch, but since I had specified those in CFLAGS, I get:
Isn't this a case of "don't do that (CFLAGS), then" ?
If I update the gnulib patch per Paul's comment here:
https://lists.nongnu.org/archive/html/bug-gnulib/2015-11/msg00006.html
then __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS will be
unconditionally defined in config.h; I don't think defines
in config.h can be ifndefed.
Thanks,
Pedro Alves