This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Provide stdint.h for Tru64 UNIX V[45]


The following patch implements stdint.h for Tru64 UNIX V4 and V5.  I've
chosen to include the definitions in alpha/osf.h directly instead of
using a separate alpha/osf-stdint.h instead, just like e.g. Solaris 2.

Bootstrappped without regressions on alpha-dec-osf4.0f and
alpha-dec-osf5.1b.

There's one testsuite problem I'd like to get an opinion about:
gcc.dg/c99-stdint-6.c is unsupported on alpha-dec-osf4.0f, which lacks
inttypes.h completely, but FAILs on alpha-dec-osf5.1b which has an
incomplete inttypes.h, i.e. without definitions for *int_least*_t,
*int_fast*t, *intmax_t.  I could either augment the header via
fixincludes, or XFAIL the test on V5.1B.  Preferences?

I'll check the patch as osf maintainer, but would like to wait for
opinions on the issue above before doing so.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 154216)
+++ gcc/config.gcc	(working copy)
@@ -651,6 +651,7 @@
 	tmake_file="alpha/t-alpha alpha/t-ieee alpha/t-crtfm alpha/t-osf4"
 	tm_file="${tm_file} alpha/osf.h"
 	extra_headers=va_list.h
+	use_gcc_stdint=provide
 	case ${target} in
 	  *-*-osf4*)
 	    # Define TARGET_SUPPORT_ARCH except on 4.0a.
Index: gcc/config/alpha/osf.h
===================================================================
--- gcc/config/alpha/osf.h	(revision 154216)
+++ gcc/config/alpha/osf.h	(working copy)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler, for DEC Alpha on OSF/1.
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003,
-   2004, 2007 Free Software Foundation, Inc.
+   2004, 2007, 2009 Free Software Foundation, Inc.
    Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
 
 This file is part of GCC.
@@ -162,6 +162,38 @@
 #define SIZE_TYPE	"long unsigned int"
 #define PTRDIFF_TYPE	"long int"
 
+#define SIG_ATOMIC_TYPE "int"
+
+#define INT8_TYPE "signed char"
+#define INT16_TYPE "short int"
+#define INT32_TYPE "int"
+#define INT64_TYPE "long int"
+#define UINT8_TYPE "unsigned char"
+#define UINT16_TYPE "short unsigned int"
+#define UINT32_TYPE "unsigned int"
+#define UINT64_TYPE "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 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 unsigned int"
+
+#define INT_FAST8_TYPE "signed char"
+#define INT_FAST16_TYPE "int"
+#define INT_FAST32_TYPE "int"
+#define INT_FAST64_TYPE "long int"
+#define UINT_FAST8_TYPE "unsigned char"
+#define UINT_FAST16_TYPE "unsigned int"
+#define UINT_FAST32_TYPE "unsigned int"
+#define UINT_FAST64_TYPE "long unsigned int"
+
+#define INTPTR_TYPE "long int"
+#define UINTPTR_TYPE "long unsigned int"
+
 /* The linker will stick __main into the .init section.  */
 #define HAS_INIT_SECTION
 #define LD_INIT_SWITCH "-init"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]