X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Ftsystem.h;h=bc8384e1739477cb041775f64f7ee7b6dccc1830;hb=aff6b8e2844233bb221f10575b29eaa2841d033a;hp=f36510b15aee4c506bcc6727f64ca06441cb6e8a;hpb=b5c673fc200fdd02f27e9a3a42f53eca2b3b6ae9;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/tsystem.h b/gcc/tsystem.h index f36510b15ae..bc8384e1739 100644 --- a/gcc/tsystem.h +++ b/gcc/tsystem.h @@ -1,6 +1,6 @@ /* 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 Free Software Foundation, Inc. This file is part of GCC. @@ -40,6 +40,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #define HAVE_DECL_GETOPT 1 #endif +/* We want everything from the glibc headers. */ +#define _GNU_SOURCE 1 + /* GCC supplies these headers. */ #include #include @@ -58,6 +61,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. */ @@ -98,4 +117,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 */