Re: [Predef-contribute] Predefined macro updates and fixes
Brought to you by:
breese,
tahonermann
|
From: Guillem J. <gu...@ha...> - 2013-01-10 23:48:41
|
On Sun, 2012-12-30 at 16:42:08 +0100, Bjorn Reese wrote: > Thanks for your detailed reply. Most of the information has been added > now. More replies below. Thanks! > On 2012-12-10 12:24, Guillem Jover wrote: > >On Fri, 2012-11-23 at 19:25:45 +0100, Guillem Jover wrote: > >>For GNU/kFreeBSD both __FreeBSD_kernel__&& __GLIBC__ should be > >>checked, because FreeBSD has started defining __FreeBSD_kernel__ > >>(since FreeBSD 8.3, FreeBSD 9.1 and FreeBSD 10.0 on those branches). > > I have added this to the FreeBSD and GNU/kFreeBSD entries. It seems the __FreeBSD_kernel__ variable was typoed in the wiki, it's missing the two trailing underscores. > Just out of curiosity, do you know why it doesn't define something like > a __gnu_freebsd__ macro? My guess is that these __gnu_*__ macros are not widely used at all? I think the first time I've seen them mentioned anywhere has been from the predef documentation and then after checking into gcc source code. > >>For GNU/Hurd, __gnu_hurd__ is also defined, and because it's currently > >>based on the GNU Mach kernel, so is __MACH__. > > I have added the __gnu_hurd__ macro. I assume that this is sufficient to > identify GNU/Hurd. Sure, although __GNU__ is the customary macro being checked, I just mentioned it for completelness. Would be nice to add a reference to __MACH__ too, so that people is aware that is defined there as well. > >>The new x32 architecture (or different ABI for AMD64, depending how > >>one looks at it), can be distinguished with __amd64__&& __ILP32__. > > This has been tentatively captured on: > > http://sourceforge.net/p/predef/wiki/DataModels/ Ah right, but I'm not sure if that might be clear enough when looking for an x32 reference, though? As not all current architectures will have such data models readily available. Maybe a entry could still be added to the Architectures page, with references to the DataModels page, instead of detailing that out there? Thanks, Guillem |