Deleted Added
full compact
config.h (163638) config.h (169507)
1/*
2 * Copyright (c) 1980, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)config.h 8.1 (Berkeley) 6/6/93
1/*
2 * Copyright (c) 1980, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)config.h 8.1 (Berkeley) 6/6/93
30 * $FreeBSD: head/usr.sbin/config/config.h 163638 2006-10-24 00:31:59Z imp $
30 * $FreeBSD: head/usr.sbin/config/config.h 169507 2007-05-12 19:38:18Z wkoszek $
31 */
32
33/*
34 * Config.
35 */
36#include <sys/types.h>
37#include <sys/queue.h>
38#include <stdlib.h>
39#include <string.h>
40
31 */
32
33/*
34 * Config.
35 */
36#include <sys/types.h>
37#include <sys/queue.h>
38#include <stdlib.h>
39#include <string.h>
40
41struct cfgfile {
42 STAILQ_ENTRY(cfgfile) cfg_next;
43 char *cfg_path;
44};
45STAILQ_HEAD(, cfgfile) cfgfiles;
46
41struct file_list {
42 STAILQ_ENTRY(file_list) f_next;
43 char *f_fn; /* the name */
44 int f_type; /* type */
45 u_char f_flags; /* see below */
46 char *f_compilewith; /* special make rule if present */
47 char *f_depends; /* additional dependancies */
48 char *f_clean; /* File list to add to clean rule */

--- 63 unchanged lines hidden (view full) ---

112 */
113struct opt {
114 char *op_name;
115 char *op_value;
116 int op_ownfile; /* true = own file, false = makefile */
117 SLIST_ENTRY(opt) op_next;
118};
119
47struct file_list {
48 STAILQ_ENTRY(file_list) f_next;
49 char *f_fn; /* the name */
50 int f_type; /* type */
51 u_char f_flags; /* see below */
52 char *f_compilewith; /* special make rule if present */
53 char *f_depends; /* additional dependancies */
54 char *f_clean; /* File list to add to clean rule */

--- 63 unchanged lines hidden (view full) ---

118 */
119struct opt {
120 char *op_name;
121 char *op_value;
122 int op_ownfile; /* true = own file, false = makefile */
123 SLIST_ENTRY(opt) op_next;
124};
125
120SLIST_HEAD(opt_head, opt) opt, mkopt;
126SLIST_HEAD(opt_head, opt) opt, mkopt, rmopts;
121
122struct opt_list {
123 char *o_name;
124 char *o_file;
125 SLIST_ENTRY(opt_list) o_next;
126};
127
128SLIST_HEAD(, opt_list) otab;
129
130struct hint {
131 char *hint_name;
132 STAILQ_ENTRY(hint) hint_next;
133};
134
135STAILQ_HEAD(hint_head, hint) hints;
136
127
128struct opt_list {
129 char *o_name;
130 char *o_file;
131 SLIST_ENTRY(opt_list) o_next;
132};
133
134SLIST_HEAD(, opt_list) otab;
135
136struct hint {
137 char *hint_name;
138 STAILQ_ENTRY(hint) hint_next;
139};
140
141STAILQ_HEAD(hint_head, hint) hints;
142
143/*
144 * Tag present in the kernelconf.tmlp template file. It's mandatory for those
145 * two strings to be the same. Otherwise you'll get into trouble.
146 */
147#define KERNCONFTAG "%%KERNCONFFILE%%"
148
149/*
150 * Faked option to note, that the configuration file has been taken from the
151 * kernel file and inclusion of DEFAULTS etc.. isn't nessesery, because we
152 * already have a list of all required devices.
153 */
154#define OPT_AUTOGEN "CONFIG_AUTOGENERATED"
155
137extern char *ident;
138extern char *env;
156extern char *ident;
157extern char *env;
158extern char kernconfstr[];
139extern int do_trace;
140extern int envmode;
141extern int hintmode;
159extern int do_trace;
160extern int envmode;
161extern int hintmode;
162extern int incignore;
142
143char *get_word(FILE *);
144char *get_quoted_word(FILE *);
145char *path(const char *);
146char *raisestr(char *);
147void remember(const char *);
148void moveifchanged(const char *, const char *);
149int yyparse(void);
150int yylex(void);
151void options(void);
152void makefile(void);
153void makeenv(void);
154void makehints(void);
155void headers(void);
163
164char *get_word(FILE *);
165char *get_quoted_word(FILE *);
166char *path(const char *);
167char *raisestr(char *);
168void remember(const char *);
169void moveifchanged(const char *, const char *);
170int yyparse(void);
171int yylex(void);
172void options(void);
173void makefile(void);
174void makeenv(void);
175void makehints(void);
176void headers(void);
177void cfgfile_add(const char *);
178void cfgfile_removeall(void);
156
179
157extern STAILQ_HEAD(device_head, device) dtab;
180extern STAILQ_HEAD(device_head, device) dtab, rmdtab;
158
159extern char errbuf[80];
160extern int yyline;
161extern const char *yyfile;
162
163extern STAILQ_HEAD(file_list_head, file_list) ftab;
164
165extern STAILQ_HEAD(files_name_head, files_name) fntab;

--- 12 unchanged lines hidden ---
181
182extern char errbuf[80];
183extern int yyline;
184extern const char *yyfile;
185
186extern STAILQ_HEAD(file_list_head, file_list) ftab;
187
188extern STAILQ_HEAD(files_name_head, files_name) fntab;

--- 12 unchanged lines hidden ---