public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kai Tietz <ktietz70@googlemail.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>,
	Richard Henderson <rth@redhat.com>
Subject: Re: [patch]: Add check for stdint header
Date: Thu, 03 Sep 2009 01:37:00 -0000	[thread overview]
Message-ID: <90baa01f0909021837n772d38acldcd0eea76005fdc2@mail.gmail.com> (raw)
In-Reply-To: <90baa01f0909021518w469a8991ga54bacf8f7df68f9@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 893 bytes --]

2009/9/3 Kai Tietz <ktietz70@googlemail.com>:
Hello,

This patch adds to gcc's system.h file the include of stdint.h file,
if present. It uses AC_TYPE_INTPTR_T and AC_TYPE_UINTPTR_T feature of
libtool.

ChangeLog

2009-09-03  Kai Tietz  <kai.tietz@onevision.com>

        * config.in (HAVE_STDINT_H): New.
        (HAVE_UINTPTR_T): New.
        (HAVE_INTPTR_T): New.
        (uintptr_t): New.
        (uintptr_t): New.
        * configure.ac (AC_CHECK_HEADERS): Add stdint.h.
        (AC_TYPE_INTPTR_T): New
        (AC_TYPE_UINTPTR_T): New.
        * configure: Regenerated.
        * system.h: Include stdint.h, if present.

Tested for x86_64-pc-linux, i686-w64-mingw32, and for
x86_64-w64-mingw32. Ok for apply to trunk?

Cheers,
Kai

-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

[-- Attachment #2: stdint.diff --]
[-- Type: text/x-diff, Size: 2023 bytes --]

Index: gcc/gcc/config.in
===================================================================
--- gcc.orig/gcc/config.in	2009-08-24 08:11:35.000000000 +0200
+++ gcc/gcc/config.in	2009-09-03 01:23:09.497371000 +0200
@@ -1144,6 +1144,25 @@
 #undef HAVE_MALLOC_H
 #endif
 
+#ifndef USED_FOR_TARGET
+#undef HAVE_STDINT_H
+#endif
+
+#ifndef USED_FOR_TARGET
+#undef HAVE_UINTPTR_T
+#endif
+
+#ifndef USED_FOR_TARGET
+#undef HAVE_INTPTR_T
+#endif
+
+#ifndef USED_FOR_TARGET
+#undef uintptr_t
+#endif
+
+#ifndef USED_FOR_TARGET
+#undef intptr_t
+#endif
 
 /* Define to 1 if you have the `mbstowcs' function. */
 #ifndef USED_FOR_TARGET
Index: gcc/gcc/configure.ac
===================================================================
--- gcc.orig/gcc/configure.ac	2009-08-28 21:28:51.000000000 +0200
+++ gcc/gcc/configure.ac	2009-09-03 03:27:44.886371000 +0200
@@ -311,6 +311,8 @@
 AC_CHECK_SIZEOF(long)
 AC_CHECK_TYPES([long long], [AC_CHECK_SIZEOF(long long)])
 AC_CHECK_TYPES([__int64], [AC_CHECK_SIZEOF(__int64)])
+AC_TYPE_UINTPTR_T
+AC_TYPE_INTPTR_T
 
 # ---------------------
 # Warnings and checking
@@ -933,7 +935,8 @@
 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
 		 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
 		 sys/resource.h sys/param.h sys/times.h sys/stat.h \
-		 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h)
+		 direct.h malloc.h stdint.h langinfo.h ldfcn.h \
+		 locale.h wchar.h)
 
 # Check for thread headers.
 AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
Index: gcc/gcc/system.h
===================================================================
--- gcc.orig/gcc/system.h	2009-08-27 15:04:09.000000000 +0200
+++ gcc/gcc/system.h	2009-09-03 01:25:05.294371000 +0200
@@ -414,6 +414,10 @@
 extern void *realloc (void *, size_t);
 #endif
 
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
 /* If the system doesn't provide strsignal, we get it defined in
    libiberty but no declaration is supplied.  */
 #if !defined (HAVE_STRSIGNAL) \

  reply	other threads:[~2009-09-03  1:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-02 22:18 Kai Tietz
2009-09-03  1:37 ` Kai Tietz [this message]
2009-09-03 10:55 ` Richard Guenther
2009-09-03 11:05   ` Kai Tietz
2009-09-03 11:10     ` Richard Guenther
2009-09-04  7:49       ` Kai Tietz
2009-09-04  9:57         ` Richard Guenther
2009-09-04 10:36           ` Paolo Bonzini
     [not found]             ` <4AA0EE5E.80204@gnu.org>
     [not found]               ` <90baa01f0909040359r45b5b0c1gfb9132cf800bde9b@mail.gmail.com>
     [not found]                 ` <90baa01f0909040534g4ac57551se2e843b861c42a06@mail.gmail.com>
2009-09-04 13:22                   ` Paolo Bonzini
2009-09-06  9:57           ` Ralf Wildenhues
2009-09-04 12:48 Tobias Burnus
2009-09-04 12:53 ` Kai Tietz
2009-09-04 13:18   ` Tobias Burnus
2009-09-04 13:27     ` Paolo Bonzini
2009-09-04 14:07       ` Kai Tietz
2009-09-05 12:41         ` Paolo Bonzini
2009-09-08 15:22           ` Kai Tietz
2009-09-06 10:00       ` Ralf Wildenhues
2009-09-07  6:51         ` Paolo Bonzini
2009-09-04 13:07 Tobias Burnus
2009-09-04 13:18 ` Kai Tietz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=90baa01f0909021837n772d38acldcd0eea76005fdc2@mail.gmail.com \
    --to=ktietz70@googlemail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).