diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 11:48:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 11:48:48 -0500 |
commit | 2e1ca21d46aaef95101723fa402f39d3a95aba59 (patch) | |
tree | cd95efefb9ccb6ab4ac0589d01c06cdfc22cc989 /scripts/genksyms/genksyms.h | |
parent | 315ab19a6d12d6af7b6957090822f3057ab7e80f (diff) | |
parent | eae0f536f640bb95f2ad437a57c40c7d5683d1ac (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild
* master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild: (46 commits)
kbuild: remove obsoleted scripts/reference_* files
kbuild: fix make help & make *pkg
kconfig: fix time ordering of writes to .kconfig.d and include/linux/autoconf.h
Kconfig: remove the CONFIG_CC_ALIGN_* options
kbuild: add -fverbose-asm to i386 Makefile
kbuild: clean-up genksyms
kbuild: Lindent genksyms.c
kbuild: fix genksyms build error
kbuild: in makefile.txt note that Makefile is preferred name for kbuild files
kbuild: replace PHONY with FORCE
kbuild: Fix bug in crc symbol generating of kernel and modules
kbuild: change kbuild to not rely on incorrect GNU make behavior
kbuild: when warning symbols exported twice now tell user this is the problem
kbuild: fix make dir/file.xx when asm symlink is missing
kbuild: in the section mismatch check try harder to find symbols
kbuild: fix section mismatch check for unwind on IA64
kbuild: kill false positives from section mismatch warnings for powerpc
kbuild: kill trailing whitespace in modpost & friends
kbuild: small update of allnoconfig description
kbuild: make namespace.pl CROSS_COMPILE happy
...
Trivial conflict in arch/ppc/boot/Makefile manually fixed up
Diffstat (limited to 'scripts/genksyms/genksyms.h')
-rw-r--r-- | scripts/genksyms/genksyms.h | 57 |
1 files changed, 17 insertions, 40 deletions
diff --git a/scripts/genksyms/genksyms.h b/scripts/genksyms/genksyms.h index f09af47ab281..ab6f34f38735 100644 --- a/scripts/genksyms/genksyms.h +++ b/scripts/genksyms/genksyms.h | |||
@@ -20,74 +20,51 @@ | |||
20 | along with this program; if not, write to the Free Software Foundation, | 20 | along with this program; if not, write to the Free Software Foundation, |
21 | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | 21 | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
22 | 22 | ||
23 | |||
24 | #ifndef MODUTILS_GENKSYMS_H | 23 | #ifndef MODUTILS_GENKSYMS_H |
25 | #define MODUTILS_GENKSYMS_H 1 | 24 | #define MODUTILS_GENKSYMS_H 1 |
26 | 25 | ||
27 | #include <stdio.h> | 26 | #include <stdio.h> |
28 | 27 | ||
29 | 28 | enum symbol_type { | |
30 | enum symbol_type | 29 | SYM_NORMAL, SYM_TYPEDEF, SYM_ENUM, SYM_STRUCT, SYM_UNION |
31 | { | ||
32 | SYM_NORMAL, SYM_TYPEDEF, SYM_ENUM, SYM_STRUCT, SYM_UNION | ||
33 | }; | 30 | }; |
34 | 31 | ||
35 | struct string_list | 32 | struct string_list { |
36 | { | 33 | struct string_list *next; |
37 | struct string_list *next; | 34 | enum symbol_type tag; |
38 | enum symbol_type tag; | 35 | char *string; |
39 | char *string; | ||
40 | }; | 36 | }; |
41 | 37 | ||
42 | struct symbol | 38 | struct symbol { |
43 | { | 39 | struct symbol *hash_next; |
44 | struct symbol *hash_next; | 40 | const char *name; |
45 | const char *name; | 41 | enum symbol_type type; |
46 | enum symbol_type type; | 42 | struct string_list *defn; |
47 | struct string_list *defn; | 43 | struct symbol *expansion_trail; |
48 | struct symbol *expansion_trail; | 44 | int is_extern; |
49 | int is_extern; | ||
50 | }; | 45 | }; |
51 | 46 | ||
52 | typedef struct string_list **yystype; | 47 | typedef struct string_list **yystype; |
53 | #define YYSTYPE yystype | 48 | #define YYSTYPE yystype |
54 | 49 | ||
55 | extern FILE *outfile, *debugfile; | ||
56 | |||
57 | extern int cur_line; | 50 | extern int cur_line; |
58 | extern char *cur_filename, *output_directory; | 51 | extern char *cur_filename; |
59 | |||
60 | extern int flag_debug, flag_dump_defs, flag_warnings; | ||
61 | extern int checksum_version, kernel_version; | ||
62 | |||
63 | extern int want_brace_phrase, want_exp_phrase, discard_phrase_contents; | ||
64 | extern struct string_list *current_list, *next_list; | ||
65 | |||
66 | 52 | ||
67 | struct symbol *find_symbol(const char *name, enum symbol_type ns); | 53 | struct symbol *find_symbol(const char *name, enum symbol_type ns); |
68 | struct symbol *add_symbol(const char *name, enum symbol_type type, | 54 | struct symbol *add_symbol(const char *name, enum symbol_type type, |
69 | struct string_list *defn, int is_extern); | 55 | struct string_list *defn, int is_extern); |
70 | void export_symbol(const char *); | 56 | void export_symbol(const char *); |
71 | 57 | ||
72 | struct string_list *reset_list(void); | ||
73 | void free_list(struct string_list *s, struct string_list *e); | ||
74 | void free_node(struct string_list *list); | 58 | void free_node(struct string_list *list); |
59 | void free_list(struct string_list *s, struct string_list *e); | ||
75 | struct string_list *copy_node(struct string_list *); | 60 | struct string_list *copy_node(struct string_list *); |
76 | struct string_list *copy_list(struct string_list *s, struct string_list *e); | ||
77 | int equal_list(struct string_list *a, struct string_list *b); | ||
78 | void print_list(FILE *, struct string_list *list); | ||
79 | 61 | ||
80 | int yylex(void); | 62 | int yylex(void); |
81 | int yyparse(void); | 63 | int yyparse(void); |
82 | 64 | ||
83 | void error_with_pos(const char *, ...); | 65 | void error_with_pos(const char *, ...); |
84 | 66 | ||
85 | #define version(a,b,c) ((a << 16) | (b << 8) | (c)) | ||
86 | |||
87 | /*----------------------------------------------------------------------*/ | 67 | /*----------------------------------------------------------------------*/ |
88 | |||
89 | #define MODUTILS_VERSION "<in-kernel>" | ||
90 | |||
91 | #define xmalloc(size) ({ void *__ptr = malloc(size); \ | 68 | #define xmalloc(size) ({ void *__ptr = malloc(size); \ |
92 | if(!__ptr && size != 0) { \ | 69 | if(!__ptr && size != 0) { \ |
93 | fprintf(stderr, "out of memory\n"); \ | 70 | fprintf(stderr, "out of memory\n"); \ |
@@ -101,4 +78,4 @@ void error_with_pos(const char *, ...); | |||
101 | } \ | 78 | } \ |
102 | __str; }) | 79 | __str; }) |
103 | 80 | ||
104 | #endif /* genksyms.h */ | 81 | #endif /* genksyms.h */ |