This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] OpenBSD stdint fix
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: gerald at pfeifer dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 11 Feb 2012 20:33:03 +0100 (CET)
- Subject: Re: [PATCH] OpenBSD stdint fix
- References: <201201030825.q038PJLu006133@glazunov.sibelius.xs4all.nl> <alpine.LNX.firstname.lastname@example.org>
> Date: Sun, 5 Feb 2012 00:30:53 +0100 (CET)
> From: Gerald Pfeifer <email@example.com>
> Is this patch upstream on the OpenBSD side? How and where have
> you tested it?
Not sure what you mean by "upstream" in this conext. We curently ship
GCC 4.2.1 as our system compiler, which is different enough from the
current GCC codebase that it doesn't have the OS-stdint.h files.
I tested this diff on OpenBSD/i386 and OpenBSD/amd64, where it fixes a
couple of test cases in the GCC testsuite.
> I see we do not have a maintainer for OpenBSD, and no other port
> seems to do anything like that, but if this really matches what
> you have in place, I can commit it for you.
Indeed. I'd be willing to take up that role. I already have an
account on sourceware.org and a copyright assigment for GCC in place.
But in the mean time it would be great if you could commit this fix
> On Tue, 3 Jan 2012, Mark Kettenis wrote:
> > These are "long long" on all supported platforms instead of the
> > default "long" on 64-bit, "long long" on 32-bit that defaults.h
> > assumes.
> > 2012-01-03 Mark Kettenis <firstname.lastname@example.org>
> > * config/openbsd-stdint.h (INTMAX_TYPE, UINTMAX_TYPE): New defines.
> > Index: gcc/config/openbsd-stdint.h
> > ===================================================================
> > --- gcc/config/openbsd-stdint.h (revision 182767)
> > +++ gcc/config/openbsd-stdint.h (working copy)
> > @@ -26,6 +26,9 @@
> > #define UINT_FAST16_TYPE "unsigned int"
> > #define UINT_FAST32_TYPE "unsigned int"
> > #define UINT_FAST64_TYPE "long long unsigned int"
> > +
> > +#define INTMAX_TYPE "long long int"
> > +#define UINTMAX_TYPE "long long unsigned int"
> > #define INTPTR_TYPE "long int"
> > #define UINTPTR_TYPE "long unsigned int"