]> gcc.gnu.org Git - gcc.git/blame - gcc/tsystem.h
Makefile.in, [...]: replace "GNU CC" with "GCC".
[gcc.git] / gcc / tsystem.h
CommitLineData
2e39bdbe
KG
1/* Get common system includes and various definitions and declarations
2 based on target macros.
16b97540 3 Copyright (C) 2000, 2001 Free Software Foundation, Inc.
2e39bdbe 4
1322177d 5This file is part of GCC.
2e39bdbe 6
1322177d
LB
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
9Software Foundation; either version 2, or (at your option) any later
10version.
2e39bdbe 11
1322177d
LB
12GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
2e39bdbe
KG
16
17You should have received a copy of the GNU General Public License
1322177d
LB
18along with GCC; see the file COPYING. If not, write to the Free
19Software Foundation, 59 Temple Place - Suite 330, Boston, MA
2002111-1307, USA. */
2e39bdbe 21
88657302
RH
22#ifndef GCC_TSYSTEM_H
23#define GCC_TSYSTEM_H
2e39bdbe 24
16b97540
KG
25/* System headers (e.g. stdio.h, stdlib.h, unistd.h) sometimes
26 indirectly include getopt.h. Our -I flags will cause gcc's gnu
27 getopt.h to be included, not the platform's copy. In the default
28 case, gnu getopt.h will provide us with a no-argument prototype
29 which will generate -Wstrict-prototypes warnings. None of the
30 target files actually use getopt, so it is safe to tell gnu
31 getopt.h we never need this prototype. */
32#ifndef HAVE_DECL_GETOPT
33#define HAVE_DECL_GETOPT 1
34#endif
35
2e39bdbe
KG
36/* GCC supplies this header. */
37#include <stddef.h>
38
39#ifdef inhibit_libc
40
41#ifndef malloc
42extern void *malloc (size_t);
43#endif
44
45#ifndef free
46extern void free (void *);
47#endif
48
49#ifndef atexit
50extern int atexit (void (*)(void));
51#endif
52
53#else /* ! inhibit_libc */
54/* We disable this when inhibit_libc, so that gcc can still be built without
55 needing header files first. */
56/* ??? This is not a good solution, since prototypes may be required in
57 some cases for correct code. */
58
59/* GCC supplies this header. */
60#include <stdarg.h>
61
62/* All systems have this header. */
63#include <stdio.h>
64
65/* All systems have this header. */
66#include <sys/types.h>
67
68/* All systems have this header. */
69#include <errno.h>
70
71#ifndef errno
72extern int errno;
73#endif
74
34f4f3a5 75#ifdef POSIX
2e39bdbe
KG
76#include <string.h>
77#endif
78
79/* GCC (fixproto) guarantees these system headers exist. */
80#include <stdlib.h>
81#include <unistd.h>
82
83/* GCC supplies this header. */
84#include <limits.h>
85
34f4f3a5 86#ifdef POSIX
2e39bdbe
KG
87#include <time.h>
88#endif
89
90#endif /* inhibit_libc */
91
92/* Define a generic NULL if one hasn't already been defined. */
93#ifndef NULL
94#define NULL 0
95#endif
96
88657302 97#endif /* ! GCC_TSYSTEM_H */
This page took 1.999598 seconds and 5 git commands to generate.