OSDN Git Service

* fixinc/fixincl.c: Move declarations of 'pz_fname' and
[pf3gnuchains/gcc-fork.git] / gcc / fixinc / fixlib.h
1
2 /* Install modified versions of certain ANSI-incompatible system header
3    files which are fixed to work correctly with ANSI C and placed in a
4    directory that GNU C will search.
5
6    Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
7
8 This file is part of GNU CC.
9
10 GNU CC is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2, or (at your option)
13 any later version.
14
15 GNU CC is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with GNU CC; see the file COPYING.  If not, write to
22 the Free Software Foundation, 59 Temple Place - Suite 330,
23 Boston, MA 02111-1307, USA.  */
24
25 #ifndef FIXINCLUDES_FIXLIB_H
26 #define FIXINCLUDES_FIXLIB_H
27
28 #include "auto-host.h"
29 #include "gansidecl.h"
30 #include "system.h"
31
32 #include "gnu-regex.h"
33
34 #ifndef STDIN_FILENO
35 # define STDIN_FILENO   0
36 #endif
37 #ifndef STDOUT_FILENO
38 # define STDOUT_FILENO  1
39 #endif
40
41 typedef int t_success;
42
43 #define FAILURE         (-1)
44 #define SUCCESS           0
45 #define PROBLEM           1
46
47 #define SUCCEEDED(p)    ((p) == SUCCESS)
48 #define SUCCESSFUL(p)   SUCCEEDED (p)
49 #define FAILED(p)       ((p) < SUCCESS)
50 #define HADGLITCH(p)    ((p) > SUCCESS)
51
52
53 #define tSCC static const char
54 #define tCC  const char
55 #define tSC  static char
56
57 /* If this particular system's header files define the macro `MAXPATHLEN',
58    we happily take advantage of it; otherwise we use a value which ought
59    to be large enough.  */
60 #ifndef MAXPATHLEN
61 # define MAXPATHLEN     4096
62 #endif
63
64 #ifndef EXIT_SUCCESS
65 # define EXIT_SUCCESS 0
66 #endif
67 #ifndef EXIT_FAILURE
68 # define EXIT_FAILURE 1
69 #endif
70
71 #define NUL             '\0'
72
73 #ifndef NOPROCESS
74 #define NOPROCESS       ((pid_t) -1)
75 #define NULLPROCESS     ((pid_t)0)
76
77 #define EXIT_PANIC      99
78
79 #ifndef HAVE_T_BOOL_ENUM
80 #define HAVE_T_BOOL_ENUM
81 typedef enum
82 {
83   BOOL_FALSE, BOOL_TRUE
84 } t_bool;
85 #endif
86
87 typedef int apply_fix_p_t;  /* Apply Fix Predicate Type */
88
89 #define APPLY_FIX 0
90 #define SKIP_FIX  1
91
92 #define _P_(p)  ()
93 #endif
94
95 /*
96  *  Exported procedures
97  */
98 char * load_file_data _P_(( FILE* fp ));
99 t_bool is_cxx_header  _P_(( tCC* filename, tCC* filetext ));
100 void   compile_re     _P_(( tCC* pat, regex_t* re, int match,
101                             tCC *e1, tCC *e2 ));
102 void   mn_get_regexps _P_(( regex_t** label_re, regex_t** name_re,
103                             tCC *who ));
104 #endif /* FIXINCLUDES_FIXLIB_H */