Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/config/config.h
Show All 35 Lines | |||||
* Config. | * Config. | ||||
*/ | */ | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <sys/queue.h> | #include <sys/queue.h> | ||||
#include <stdbool.h> | #include <stdbool.h> | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include <string.h> | #include <string.h> | ||||
#ifdef __cplusplus | |||||
extern "C" { | |||||
#endif | |||||
struct cfgfile { | struct cfgfile { | ||||
STAILQ_ENTRY(cfgfile) cfg_next; | STAILQ_ENTRY(cfgfile) cfg_next; | ||||
char *cfg_path; | char *cfg_path; | ||||
}; | }; | ||||
extern STAILQ_HEAD(cfgfile_head, cfgfile) cfgfiles; | extern STAILQ_HEAD(cfgfile_head, cfgfile) cfgfiles; | ||||
struct file_list { | struct file_list { | ||||
STAILQ_ENTRY(file_list) f_next; | STAILQ_ENTRY(file_list) f_next; | ||||
char *f_option; /* the main option (v2) */ | |||||
char *f_fn; /* the name */ | char *f_fn; /* the name */ | ||||
int f_type; /* type */ | int f_type; /* type */ | ||||
u_char f_flags; /* see below */ | u_char f_flags; /* see below */ | ||||
char *f_compilewith; /* special make rule if present */ | char *f_compilewith; /* special make rule if present */ | ||||
char *f_depends; /* additional dependencies */ | char *f_depends; /* additional dependencies */ | ||||
char *f_clean; /* File list to add to clean rule */ | char *f_clean; /* File list to add to clean rule */ | ||||
char *f_warn; /* warning message */ | char *f_warn; /* warning message */ | ||||
const char *f_objprefix; /* prefix string for object name */ | const char *f_objprefix; /* prefix string for object name */ | ||||
▲ Show 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
#define OPT_AUTOGEN "CONFIG_AUTOGENERATED" | #define OPT_AUTOGEN "CONFIG_AUTOGENERATED" | ||||
extern char *ident; | extern char *ident; | ||||
extern char kernconfstr[]; | extern char kernconfstr[]; | ||||
extern int do_trace; | extern int do_trace; | ||||
extern int incignore; | extern int incignore; | ||||
char *get_word(FILE *); | char *get_word(FILE *, const char *); | ||||
char *get_quoted_word(FILE *); | char *get_quoted_word(FILE *); | ||||
char *path(const char *); | char *path(const char *); | ||||
char *raisestr(char *); | char *raisestr(char *); | ||||
void remember(const char *); | void remember(const char *); | ||||
void moveifchanged(const char *, const char *); | void moveifchanged(const char *, const char *); | ||||
int yylex(void); | int yylex(void); | ||||
void options(void); | void options(void); | ||||
void makefile(void); | void makefile(void); | ||||
void makeenv(void); | void makeenv(void); | ||||
void makehints(void); | void makehints(void); | ||||
void headers(void); | void headers(void); | ||||
void cfgfile_add(const char *); | void cfgfile_add(const char *); | ||||
void cfgfile_removeall(void); | void cfgfile_removeall(void); | ||||
FILE *open_makefile_template(void); | FILE *open_makefile_template(void); | ||||
struct file_list *new_fent(void); | |||||
void read_file_v2(char *); | |||||
extern STAILQ_HEAD(device_head, device) dtab; | extern STAILQ_HEAD(device_head, device) dtab; | ||||
extern char errbuf[80]; | extern char errbuf[80]; | ||||
extern int yyline; | extern int yyline; | ||||
extern const char *yyfile; | extern const char *yyfile; | ||||
extern STAILQ_HEAD(file_list_head, file_list) ftab; | extern STAILQ_HEAD(file_list_head, file_list) ftab; | ||||
extern STAILQ_HEAD(files_name_head, files_name) fntab; | extern STAILQ_HEAD(files_name_head, files_name) fntab; | ||||
extern int debugging; | extern int debugging; | ||||
extern int found_defaults; | extern int found_defaults; | ||||
extern int maxusers; | extern int maxusers; | ||||
extern int versreq; | extern int versreq; | ||||
extern char *PREFIX; /* Config file name - for error messages */ | extern char *PREFIX; /* Config file name - for error messages */ | ||||
extern char srcdir[]; /* root of the kernel source tree */ | extern char srcdir[]; /* root of the kernel source tree */ | ||||
#define eq(a,b) (!strcmp(a,b)) | #define eq(a,b) (!strcmp(a,b)) | ||||
#define ns(s) strdup(s) | #define ns(s) strdup(s) | ||||
#ifdef __cplusplus | |||||
} | |||||
#endif | |||||