]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - gcc/tsystem.h
Imported gcc-4.4.3
[msp430-gcc.git] / gcc / tsystem.h
index 97333bba506e022d14a678aff20aa591692b6f9d..60df5242ce2a4a0a6b6bc089ba7a49ab937e7074 100644 (file)
@@ -1,12 +1,12 @@
 /* Get common system includes and various definitions and declarations
    based on target macros.
 /* Get common system includes and various definitions and declarations
    based on target macros.
-   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2004, 2005, 2009 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
 
 This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
+Software Foundation; either version 3, or (at your option) any later
 version.
 
 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
 version.
 
 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
@@ -14,10 +14,14 @@ WARRANTY; without even the implied warranty of MERCHANTABILITY or
 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 for more details.
 
 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 for more details.
 
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.  */
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
 
 #ifndef GCC_TSYSTEM_H
 #define GCC_TSYSTEM_H
 
 #ifndef GCC_TSYSTEM_H
 #define GCC_TSYSTEM_H
@@ -33,8 +37,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #define HAVE_DECL_GETOPT 1
 #endif
 
 #define HAVE_DECL_GETOPT 1
 #endif
 
-/* GCC supplies this header.  */
+/* We want everything from the glibc headers.  */
+#define _GNU_SOURCE 1
+
+/* GCC supplies these headers.  */
 #include <stddef.h>
 #include <stddef.h>
+#include <float.h>
 
 #ifdef inhibit_libc
 
 
 #ifdef inhibit_libc
 
@@ -50,6 +58,22 @@ extern void free (void *);
 extern int atexit (void (*)(void));
 #endif
 
 extern int atexit (void (*)(void));
 #endif
 
+#ifndef abort
+extern void abort (void) __attribute__ ((__noreturn__));
+#endif
+
+#ifndef strlen
+extern size_t strlen (const char *);
+#endif
+
+#ifndef memcpy
+extern void *memcpy (void *, const void *, size_t);
+#endif
+
+#ifndef memset
+extern void *memset (void *, int, size_t);
+#endif
+
 #else /* ! inhibit_libc */
 /* We disable this when inhibit_libc, so that gcc can still be built without
    needing header files first.  */
 #else /* ! inhibit_libc */
 /* We disable this when inhibit_libc, so that gcc can still be built without
    needing header files first.  */
@@ -72,20 +96,16 @@ extern int atexit (void (*)(void));
 extern int errno;
 #endif
 
 extern int errno;
 #endif
 
-#ifdef POSIX
-#include <string.h>
-#endif
-
 /* GCC (fixproto) guarantees these system headers exist.  */
 /* GCC (fixproto) guarantees these system headers exist.  */
+#include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
 
 /* GCC supplies this header.  */
 #include <limits.h>
 
 #include <stdlib.h>
 #include <unistd.h>
 
 /* GCC supplies this header.  */
 #include <limits.h>
 
-#ifdef POSIX
+/* GCC (fixproto) guarantees this system headers exists.  */
 #include <time.h>
 #include <time.h>
-#endif
 
 #endif /* inhibit_libc */
 
 
 #endif /* inhibit_libc */
 
@@ -94,4 +114,21 @@ extern int errno;
 #define NULL 0
 #endif
 
 #define NULL 0
 #endif
 
+/* GCC always provides __builtin_alloca(x).  */
+#undef alloca
+#define alloca(x) __builtin_alloca(x)
+
+#ifdef ENABLE_RUNTIME_CHECKING
+#define gcc_assert(EXPR) ((void)(!(EXPR) ? abort (), 0 : 0))
+#else
+/* Include EXPR, so that unused variable warnings do not occur.  */
+#define gcc_assert(EXPR) ((void)(0 && (EXPR)))
+#endif
+/* Use gcc_unreachable() to mark unreachable locations (like an
+   unreachable default case of a switch.  Do not use gcc_assert(0).  */
+#define gcc_unreachable() (abort ())
+
+/* Filename handling macros.  */
+#include "filenames.h"
+
 #endif /* ! GCC_TSYSTEM_H */
 #endif /* ! GCC_TSYSTEM_H */