public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Patch for stdint support on darwin
@ 2009-04-03 19:53 FX
  0 siblings, 0 replies; only message in thread
From: FX @ 2009-04-03 19:53 UTC (permalink / raw)
  To: gcc, Joseph S. Myers, gcc-patches; +Cc: dalej, mrs, echristo, stanshebs

[-- 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 --]



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-04-03 19:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-03 19:53 Patch for stdint support on darwin FX

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).