X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Ftsystem.h;h=fc7713c9d13990ae88a0c9d051569b66c09620ad;hb=dfdfba40c33e30656bb1e396990524750c505366;hp=6e83b431f7114ee0435b5b631db643b8a47388b6;hpb=2a28135353b97956c0ad51a9fe00868f24458a06;p=pf3gnuchains%2Fgcc-fork.git
diff --git a/gcc/tsystem.h b/gcc/tsystem.h
index 6e83b431f71..fc7713c9d13 100644
--- a/gcc/tsystem.h
+++ b/gcc/tsystem.h
@@ -1,23 +1,27 @@
/* 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 GNU CC.
+This file is part of GCC.
-GNU CC 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 version.
+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 3, or (at your option) any later
+version.
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+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 GNU CC; 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 @@ Boston, MA 02111-1307, USA. */
#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,42 +58,54 @@ 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. */
/* ??? This is not a good solution, since prototypes may be required in
some cases for correct code. */
-/* GCC supplies this header. */
+/* GCC supplies this header. */
#include
-/* All systems have this header. */
+/* All systems have this header. */
#include
-/* All systems have this header. */
+/* All systems have this header. */
#include
-/* All systems have this header. */
+/* All systems have this header. */
#include
#ifndef errno
extern int errno;
#endif
-#ifdef POSIX
+/* If these system headers do not exist, fixincludes must create them. */
#include
-#endif
-
-/* GCC (fixproto) guarantees these system headers exist. */
#include
#include
-/* GCC supplies this header. */
+/* GCC supplies this header. */
#include
-#ifdef POSIX
+/* If these system headers do not exist, fixincludes must create them. */
#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 */