Date: Sun, 4 Mar 2012 21:05:09 +0100 From: Tijl Coosemans <tijl@freebsd.org> To: John Baldwin <jhb@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232264 - in head/sys: amd64/include i386/include pc98/include x86/include Message-ID: <201203042105.15916.tijl@freebsd.org> In-Reply-To: <201203041351.22847.jhb@freebsd.org> References: <201202281838.q1SIcYhE082928@svn.freebsd.org> <201203041351.22847.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Sunday 04 March 2012 19:51:22 John Baldwin wrote: > On Tuesday, February 28, 2012 01:38:34 PM Tijl Coosemans wrote: >> Author: tijl >> Date: Tue Feb 28 18:38:33 2012 >> New Revision: 232264 >> URL: http://svn.freebsd.org/changeset/base/232264 >> >> Log: >> Copy amd64 _stdint.h to x86 and merge with i386 _stdint.h. Replace >> amd64/i386/pc98 _stdint.h with stubs. >> >> Added: >> head/sys/x86/include/_stdint.h >> - copied, changed from r232259, head/sys/amd64/include/_stdint.h > > This broke C++ software (such as the audio/flac port), that #includes > <stdint.h> with __STDC_LIMIT_MACROS defined but not __STDC_CONSTANT_MACROS > defined. The problem is that you have changed UINT64_MAX and INT64_MAX to use > UINT64_C() and INT64_C(), so in this case UINT64_MAX now expands to > UINT64_C(...) which can't be resolved to a constant. > > You should be able to reproduce this via the following: > > % cat > bar.cc > #define __STDC_LIMIT_MACROS > #include <stdint.h> > % c++ -c bar.cc > > (The test to see if __WORDSIZE should be defined at the end of stdint.h trips > over this bug.) > > While you could do something like add __INT64_C() and __UINT64_C() macros that > are always defined and use them for INT64_MAX and UINT64_MAX, I think the > simplest fix is probably to just use #ifdef _LP64 tests to define INT64_MAX > and UINT64_MAX as pure constants as those are the only two macros effected. > > (I've just hardcoded those two constants on my little netbook so I can keep > building ports and that worked fine for audio/flac). Fixed in r232519. [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iF4EABEIAAYFAk9TyvsACgkQfoCS2CCgtisF9wD/SfvlMj3E2vfcD/7Mb6iUlJ1a fWY+7zWyjv18kcCuUlYA/3wQkD1hjPQW02PTS1+7GXEDLMoEFPLSIX9ltvGvG3Re =753o -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203042105.15916.tijl>
