X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=gcc%2Ftsystem.h;h=60df5242ce2a4a0a6b6bc089ba7a49ab937e7074;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=97333bba506e022d14a678aff20aa591692b6f9d;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git
diff --git a/gcc/tsystem.h b/gcc/tsystem.h
index 97333bba..60df5242 100644
--- a/gcc/tsystem.h
+++ b/gcc/tsystem.h
@@ -1,12 +1,12 @@
/* 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
-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
@@ -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.
-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
+. */
#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
-/* GCC supplies this header. */
+/* We want everything from the glibc headers. */
+#define _GNU_SOURCE 1
+
+/* GCC supplies these headers. */
#include
+#include
#ifdef inhibit_libc
@@ -50,6 +58,22 @@ extern void free (void *);
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. */
@@ -72,20 +96,16 @@ extern int atexit (void (*)(void));
extern int errno;
#endif
-#ifdef POSIX
-#include
-#endif
-
/* GCC (fixproto) guarantees these system headers exist. */
+#include
#include
#include
/* GCC supplies this header. */
#include
-#ifdef POSIX
+/* GCC (fixproto) guarantees this system headers exists. */
#include
-#endif
#endif /* inhibit_libc */
@@ -94,4 +114,21 @@ extern int errno;
#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 */