From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12736 invoked by alias); 4 Sep 2009 07:49:45 -0000 Received: (qmail 12726 invoked by uid 22791); 4 Sep 2009 07:49:44 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-bw0-f225.google.com (HELO mail-bw0-f225.google.com) (209.85.218.225) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Sep 2009 07:49:39 +0000 Received: by bwz25 with SMTP id 25so477145bwz.8 for ; Fri, 04 Sep 2009 00:49:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.13.204 with SMTP id d12mr8660467bka.61.1252050576362; Fri, 04 Sep 2009 00:49:36 -0700 (PDT) In-Reply-To: <84fc9c000909030409u2fc11f7fs5c9d4fe60dd7c6a1@mail.gmail.com> References: <90baa01f0909021518w469a8991ga54bacf8f7df68f9@mail.gmail.com> <84fc9c000909030355r6843e245j5f5290b021d4ec0e@mail.gmail.com> <90baa01f0909030405q77ba38b0ibb0eebc8c3b560a4@mail.gmail.com> <84fc9c000909030409u2fc11f7fs5c9d4fe60dd7c6a1@mail.gmail.com> Date: Fri, 04 Sep 2009 07:49:00 -0000 Message-ID: <90baa01f0909040049k36a03c4s5ae3a65d3d9153d0@mail.gmail.com> Subject: Re: [patch]: Add check for stdint header From: Kai Tietz To: Richard Guenther Cc: GCC Patches , Richard Henderson Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2009-09/txt/msg00336.txt.bz2 2009/9/3 Richard Guenther : > On Thu, Sep 3, 2009 at 1:05 PM, Kai Tietz wrote: >> 2009/9/3 Richard Guenther : >>> On Thu, Sep 3, 2009 at 12:18 AM, Kai Tietz wro= te: >>>> Hello, >>>> >>>> this patch adds to gcc's system.h file the include of stdint.h file, >>>> if present. If it doesn't finds this header it defines uintptr_t as >>>> 'unsigned long' and intptr_t as 'long'. >>> >>> The toplevel already has support for creating a stdint comaptible heade= r, >>> you should probably simply use that. =A0See config/stdint*.m4. >>> >>> Richard. >> >> Well, we could extend this, but autoconf 2.64 supports the >> AC_TYPE_UINTPTR_T and AC_TYPE_INTPTR_T, and defines the types >> uintptr_t & intptr_t (as macros) for hosts without stdint.h fine. > > I'd say use the exisitng support - it's already heavily used by target > libs which > just do > > GCC_HEADER_STDINT(gstdint.h) > > and then include gstdint.h instead of stdint.h. > > The question is of course if it works well enough for the host, but > you'll find out. > > Richard. Well, I tested things about it. There are two issues I found about the use of gstdint.h instead of using 2.64 UINTPTR_T and INPTR_T checks. First the gstdint.h needs to generated dependent and added to the include CFLAGS options, well this isn't hard. But by using it in system.h header all function decl checks seems to fail. I tested the other variant by using #ifdef HAVE_STDINT_H #include #endif in system.h and it bootstraps on linux without issues. So I would like to use the previous patch without gstdint.h header for solving this issue. Cheers, Kai --=20 | (\_/) This is Bunny. Copy and paste | (=3D'.'=3D) Bunny into your signature to help | (")_(") him gain world domination