1 /* $NetBSD: nonints.h,v 1.63 2011/09/16 15:38:04 joerg Exp $ */
4 * Copyright (c) 1988, 1989, 1990, 1993
5 * The Regents of the University of California. All rights reserved.
7 * This code is derived from software contributed to Berkeley by
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. Neither the name of the University nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * from: @(#)nonints.h 8.3 (Berkeley) 3/19/94
38 * Copyright (c) 1989 by Berkeley Softworks
39 * All rights reserved.
41 * This code is derived from software contributed to Berkeley by
44 * Redistribution and use in source and binary forms, with or without
45 * modification, are permitted provided that the following conditions
47 * 1. Redistributions of source code must retain the above copyright
48 * notice, this list of conditions and the following disclaimer.
49 * 2. Redistributions in binary form must reproduce the above copyright
50 * notice, this list of conditions and the following disclaimer in the
51 * documentation and/or other materials provided with the distribution.
52 * 3. All advertising materials mentioning features or use of this software
53 * must display the following acknowledgement:
54 * This product includes software developed by the University of
55 * California, Berkeley and its contributors.
56 * 4. Neither the name of the University nor the names of its contributors
57 * may be used to endorse or promote products derived from this software
58 * without specific prior written permission.
60 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
61 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
62 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
63 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
64 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
65 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
66 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
67 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
68 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
69 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
72 * from: @(#)nonints.h 8.3 (Berkeley) 3/19/94
77 #define __attribute__(x)
81 ReturnStatus
Arch_ParseArchive(char **, Lst
, GNode
*);
82 void Arch_Touch(GNode
*);
83 void Arch_TouchLib(GNode
*);
84 time_t Arch_MTime(GNode
*);
85 time_t Arch_MemMTime(GNode
*);
86 void Arch_FindLib(GNode
*, Lst
);
87 Boolean
Arch_LibOODate(GNode
*);
90 int Arch_IsLib(GNode
*);
93 int CompatRunCommand(void *, void *);
95 int Compat_Make(void *, void *);
99 int Cond_EvalExpression(const struct If
*, char *, Boolean
*, int);
100 int Cond_Eval(char *);
101 void Cond_restore_depth(unsigned int);
102 unsigned int Cond_save_depth(void);
105 int For_Eval(char *);
106 int For_Accum(char *);
110 void JobReapChild(pid_t
, int, Boolean
);
113 void Main_ParseArgLine(const char *);
114 void MakeMode(const char *);
115 int main(int, char **);
116 char *Cmd_Exec(const char *, const char **);
117 void Error(const char *, ...) __attribute__((__format__(__printf__
, 1, 2)));
118 void Fatal(const char *, ...)
119 __attribute__((__format__(__printf__
, 1, 2),__noreturn__
));
120 void Punt(const char *, ...)
121 __attribute__((__format__(__printf__
, 1, 2),__noreturn__
));
122 void DieHorribly(void) __attribute__((__noreturn__
));
123 int PrintAddr(void *, void *);
124 void Finish(int) __dead
;
125 int eunlink(const char *);
126 void execError(const char *, const char *);
127 char *getTmpdir(void);
130 void Parse_Error(int, const char *, ...)
131 __attribute__((__format__(__printf__
, 2, 3)));
132 Boolean
Parse_AnyExport(void);
133 Boolean
Parse_IsVar(char *);
134 void Parse_DoVar(char *, GNode
*);
135 void Parse_AddIncludeDir(char *);
136 void Parse_File(const char *, int);
137 void Parse_Init(void);
138 void Parse_End(void);
139 void Parse_SetInput(const char *, int, int, char *(*)(void *, size_t *), void *);
140 Lst
Parse_MainName(void);
143 char *str_concat(const char *, const char *, int);
144 char **brk_string(const char *, int *, Boolean
, char **);
145 char *Str_FindSubstring(const char *, const char *);
146 int Str_Match(const char *, const char *);
147 char *Str_SYSVMatch(const char *, const char *, int *len
);
148 void Str_SYSVSubst(Buffer
*, char *, char *, int);
151 void Suff_ClearSuffixes(void);
152 Boolean
Suff_IsTransform(char *);
153 GNode
*Suff_AddTransform(char *);
154 int Suff_EndTransform(void *, void *);
155 void Suff_AddSuffix(char *, GNode
**);
156 Lst
Suff_GetPath(char *);
157 void Suff_DoPaths(void);
158 void Suff_AddInclude(char *);
159 void Suff_AddLib(char *);
160 void Suff_FindDeps(GNode
*);
161 Lst
Suff_FindPath(GNode
*);
162 void Suff_SetNull(char *);
163 void Suff_Init(void);
165 void Suff_PrintAll(void);
168 void Targ_Init(void);
171 GNode
*Targ_NewGN(const char *);
172 GNode
*Targ_FindNode(const char *, int);
173 Lst
Targ_FindList(Lst
, int);
174 Boolean
Targ_Ignore(GNode
*);
175 Boolean
Targ_Silent(GNode
*);
176 Boolean
Targ_Precious(GNode
*);
177 void Targ_SetMain(GNode
*);
178 int Targ_PrintCmd(void *, void *);
179 int Targ_PrintNode(void *, void *);
180 char *Targ_FmtTime(time_t);
181 void Targ_PrintType(int);
182 void Targ_PrintGraph(int);
183 void Targ_Propagate(void);
184 void Targ_Propagate_Wait(void);
187 void Var_Delete(const char *, GNode
*);
188 void Var_Set(const char *, const char *, GNode
*, int);
189 void Var_Append(const char *, const char *, GNode
*);
190 Boolean
Var_Exists(const char *, GNode
*);
191 char *Var_Value(const char *, GNode
*, char **);
192 char *Var_Parse(const char *, GNode
*, Boolean
, int *, void **);
193 char *Var_Subst(const char *, const char *, GNode
*, Boolean
);
194 char *Var_GetTail(const char *);
195 char *Var_GetHead(const char *);
198 void Var_Dump(GNode
*);
199 void Var_ExportVars(void);
200 void Var_Export(char *, int);
201 void Var_UnExport(char *);
204 void (*bmake_signal(int, void (*)(int)))(int);