OSDN Git Service

Move scheduling visualization code to separate file.
[pf3gnuchains/gcc-fork.git] / gcc / tsystem.h
1 /* Get common system includes and various definitions and declarations
2    based on target macros.
3    Copyright (C) 2000 Free Software Foundation, Inc.
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21
22 #ifndef __GCC_TSYSTEM_H__
23 #define __GCC_TSYSTEM_H__
24
25 /* GCC supplies this header. */
26 #include <stddef.h>
27
28 #ifdef inhibit_libc
29
30 #ifndef malloc
31 extern void *malloc (size_t);
32 #endif
33
34 #ifndef free
35 extern void free (void *);
36 #endif
37
38 #ifndef atexit
39 extern int atexit (void (*)(void));
40 #endif
41
42 #else /* ! inhibit_libc */
43 /* We disable this when inhibit_libc, so that gcc can still be built without
44    needing header files first.  */
45 /* ??? This is not a good solution, since prototypes may be required in
46    some cases for correct code.  */
47
48 /* GCC supplies this header. */
49 #include <stdarg.h>
50
51 /* All systems have this header. */
52 #include <stdio.h>
53
54 /* All systems have this header. */
55 #include <sys/types.h>
56
57 /* All systems have this header. */
58 #include <errno.h>
59
60 #ifndef errno
61 extern int errno;
62 #endif
63
64 #if defined(POSIX) || defined(USG)
65 #include <string.h>
66 #endif
67
68 /* GCC (fixproto) guarantees these system headers exist. */
69 #include <stdlib.h>
70 #include <unistd.h>
71
72 /* GCC supplies this header. */
73 #include <limits.h>
74
75 #if defined(POSIX) || defined(USG)
76 #include <time.h>
77 #endif
78
79 #endif /* inhibit_libc */
80
81 /* Define a generic NULL if one hasn't already been defined.  */
82 #ifndef NULL
83 #define NULL 0
84 #endif
85
86 #endif /* __GCC_TSYSTEM_H__ */