public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: FX <fxcoudert@gmail.com>
To: gcc@gcc.gnu.org,  "Joseph S. Myers" <joseph@codesourcery.com>,
	 gcc-patches@gcc.gnu.org
Cc: dalej@apple.com,  mrs@apple.com,  echristo@apple.com,
	 stanshebs@earthlink.net
Subject: Patch for stdint support on darwin
Date: Fri, 03 Apr 2009 19:53:00 -0000	[thread overview]
Message-ID: <5E4E460E-1336-4C56-A47A-DEA1A7DBF04C@gmail.com> (raw)

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

This is a patch that should add stdint support on darwin. It should  
work on both i386 and ppc, for Mac OS >= 10.3 (don't think we support  
10.2 or earlier, anyway). Because I only have a laptop at hand and  
poor connectivity for the next 10 days, the following needs doing:
   -- bootstrap and regtest on ppc-darwin (Dominique, could you help?)
   -- regtest on i386-darwin
   -- review and approval (Dale, Mike, Eric or Stan)

What I've done so far is:
   -- bootstrap on i386-apple-darwin9.6.0
   -- checked gcc.dg/c99-stdint-*.c on same with both -m32 and -m64


After the patch, the only remaining stdint-related failure is gcc.dg/ 
c99-stdint-1.c, which is due to issues in the system headers (see  
comments #15 and #16 in PR448). I don't know fixincludes and can't  
help there. I still think the current patch is better than nothing for  
now, while waiting for fixincludes.

Thanks to anyone who can help,
FX


[-- Attachment #2: darwin-stdint.diff --]
[-- Type: application/octet-stream, Size: 1925 bytes --]

diff -pur trunk.unmodified/gcc/config/darwin.h trunk/gcc/config/darwin.h
--- trunk.unmodified/gcc/config/darwin.h	2009-04-03 10:48:59.000000000 +0530
+++ trunk/gcc/config/darwin.h	2009-04-03 17:21:26.000000000 +0530
@@ -72,6 +72,38 @@ Boston, MA 02110-1301, USA.  */
 #undef	WCHAR_TYPE_SIZE
 #define WCHAR_TYPE_SIZE 32
 
+#define INT8_TYPE "signed char"
+#define INT16_TYPE "short int"
+#define INT32_TYPE "int"
+#define INT64_TYPE "long long int"
+#define UINT8_TYPE "unsigned char"
+#define UINT16_TYPE "short unsigned int"
+#define UINT32_TYPE "unsigned int"
+#define UINT64_TYPE "long long unsigned int"
+
+#define INT_LEAST8_TYPE "signed char"
+#define INT_LEAST16_TYPE "short int"
+#define INT_LEAST32_TYPE "int"
+#define INT_LEAST64_TYPE "long long int"
+#define UINT_LEAST8_TYPE "unsigned char"
+#define UINT_LEAST16_TYPE "short unsigned int"
+#define UINT_LEAST32_TYPE "unsigned int"
+#define UINT_LEAST64_TYPE "long long unsigned int"
+
+#define INT_FAST8_TYPE "signed char"
+#define INT_FAST16_TYPE "short int"
+#define INT_FAST32_TYPE "int"
+#define INT_FAST64_TYPE "long long int"
+#define UINT_FAST8_TYPE "unsigned char"
+#define UINT_FAST16_TYPE "short unsigned int"
+#define UINT_FAST32_TYPE "unsigned int"
+#define UINT_FAST64_TYPE "long long unsigned int"
+
+#define INTPTR_TYPE "long int"
+#define UINTPTR_TYPE "long unsigned int"
+
+#define SIG_ATOMIC_TYPE "int"
+
 /* Default to using the NeXT-style runtime, since that's what is
    pre-installed on Darwin systems.  */
 
diff -pur trunk.unmodified/gcc/config.gcc trunk/gcc/config.gcc
--- trunk.unmodified/gcc/config.gcc	2009-04-03 10:49:00.000000000 +0530
+++ trunk/gcc/config.gcc	2009-04-03 11:04:52.000000000 +0530
@@ -411,6 +411,7 @@ case ${target} in
   extra_objs="darwin.o"
   extra_gcc_objs="darwin-driver.o"
   default_use_cxa_atexit=yes
+  use_gcc_stdint=wrap
   case ${enable_threads} in
     "" | yes | posix) thread_file='posix' ;;
   esac

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



                 reply	other threads:[~2009-04-03 19:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=5E4E460E-1336-4C56-A47A-DEA1A7DBF04C@gmail.com \
    --to=fxcoudert@gmail.com \
    --cc=dalej@apple.com \
    --cc=echristo@apple.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=mrs@apple.com \
    --cc=stanshebs@earthlink.net \
    /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).