diff -Nur modutils-2.4.19/ChangeLog modutils-2.4.20/ChangeLog --- modutils-2.4.19/ChangeLog Wed Jul 31 16:05:38 2002 +++ modutils-2.4.20/ChangeLog Wed Sep 4 12:33:05 2002 @@ -1,3 +1,9 @@ +2002-09-04 Keith Owens + + modutils 2.4.20 + + * Do not rely on timestamps for keywords.c. + 2002-07-31 Keith Owens modutils 2.4.19 diff -Nur modutils-2.4.19/genksyms/Makefile.in modutils-2.4.20/genksyms/Makefile.in --- modutils-2.4.19/genksyms/Makefile.in Fri Mar 1 11:39:06 2002 +++ modutils-2.4.20/genksyms/Makefile.in Wed Sep 4 13:08:03 2002 @@ -32,12 +32,25 @@ ./makecrc32 > $@.tmp mv $@.tmp $@ -keywords.c: keywords.gperf - gperf -a -C -E -g -H is_reserved_hash -k 1,3,$$ -N is_reserved_word -p -t $^ > $@.tmp - mv $@.tmp $@ +# Cannot rely on timestamps to detect if keywords.c needs to be regenerated or not. +# Repository checkouts and patch can mangle the timestamps. +# If keywords.gperf == keywords.gperf_shipped then use keywords.c_shipped, +# otherwise regenerate keywords.c using gperf and update the base files. + +keywords.c: keywords.gperf keywords.gperf_shipped keywords.c_shipped + @cmp $(filter %keywords.gperf_shipped,$^) $(filter %keywords.gperf,$^) && \ + cp $(filter %keywords.c_shipped,$^) $@ || \ + (set -ex; \ + gperf -a -C -E -g -H is_reserved_hash -k 1,3,$$ -N is_reserved_word -p -t $(filter %keywords.gperf,$^) > $@.tmp ; \ + rm -f $@; \ + sed -e '/Command-line/s/[^ ]*keywords.gperf/keywords.gperf/' $@.tmp > $@; \ + rm $@.tmp; \ + cp -f $(filter %keywords.gperf,$^) $(filter %keywords.gperf_shipped,$^); \ + cp -f $@ $(filter %keywords.c_shipped,$^); \ + ) clean: - rm -f *.o *.tmp parse.output genksyms makecrc32 + rm -f *.o *.tmp parse.output genksyms makecrc32 keywords.c realclean: clean rm -f .depend parse.c parse.h lex.c crc32.tab diff -Nur modutils-2.4.19/genksyms/keywords.c modutils-2.4.20/genksyms/keywords.c --- modutils-2.4.19/genksyms/keywords.c Fri Mar 1 11:39:06 2002 +++ modutils-2.4.20/genksyms/keywords.c Thu Jan 1 10:00:00 1970 @@ -1,140 +0,0 @@ -/* C code produced by gperf version 2.7 */ -/* Command-line: gperf -a -C -E -g -H is_reserved_hash -k 1,3,$ -N is_reserved_word -p -t keywords.gperf */ -struct resword { const char *name; int token; }; -/* maximum key range = 101, duplicates = 0 */ - -#ifdef __GNUC__ -__inline -#endif -static unsigned int -is_reserved_hash (str, len) - register const char *str; - register unsigned int len; -{ - static const unsigned char asso_values[] = - { - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 5, - 105, 105, 105, 105, 105, 105, 0, 105, 105, 105, - 0, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 0, 105, 0, 105, 20, - 25, 0, 35, 30, 105, 20, 105, 105, 40, 30, - 30, 0, 0, 105, 0, 0, 0, 15, 5, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105 - }; - return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]] + asso_values[(unsigned char)str[len - 1]]; -} - -#ifdef __GNUC__ -__inline -#endif -const struct resword * -is_reserved_word (str, len) - register const char *str; - register unsigned int len; -{ - enum - { - TOTAL_KEYWORDS = 39, - MIN_WORD_LENGTH = 3, - MAX_WORD_LENGTH = 17, - MIN_HASH_VALUE = 4, - MAX_HASH_VALUE = 104 - }; - - static const struct resword wordlist[] = - { - {""}, {""}, {""}, {""}, - {"auto", AUTO_KEYW}, - {"short", SHORT_KEYW}, - {"struct", STRUCT_KEYW}, - {"__asm__", ASM_KEYW}, - {"restrict", RESTRICT_KEYW}, - {"_restrict", RESTRICT_KEYW}, - {"__signed__", SIGNED_KEYW}, - {"__attribute", ATTRIBUTE_KEYW}, - {"__restrict__", RESTRICT_KEYW}, - {"__attribute__", ATTRIBUTE_KEYW}, - {""}, - {"__volatile", VOLATILE_KEYW}, - {""}, - {"__volatile__", VOLATILE_KEYW}, - {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, - {""}, {""}, {""}, - {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, - {"int", INT_KEYW}, - {"char", CHAR_KEYW}, - {""}, - {"static", STATIC_KEYW}, - {"__const", CONST_KEYW}, - {"__inline", INLINE_KEYW}, - {"__const__", CONST_KEYW}, - {"__inline__", INLINE_KEYW}, - {""}, {""}, - {"__signed", SIGNED_KEYW}, - {""}, - {"__asm", ASM_KEYW}, - {"extern", EXTERN_KEYW}, - {""}, - {"register", REGISTER_KEYW}, - {""}, - {"float", FLOAT_KEYW}, - {""}, - {"typedef", TYPEDEF_KEYW}, - {""}, {""}, - {"_Bool", BOOL_KEYW}, - {"double", DOUBLE_KEYW}, - {""}, - {"unsigned", UNSIGNED_KEYW}, - {"enum", ENUM_KEYW}, - {""}, {""}, {""}, - {"volatile", VOLATILE_KEYW}, - {"void", VOID_KEYW}, - {"const", CONST_KEYW}, - {""}, {""}, {""}, {""}, {""}, - {"signed", SIGNED_KEYW}, - {""}, - {"asm", ASM_KEYW}, - {""}, {""}, - {"inline", INLINE_KEYW}, - {""}, {""}, {""}, - {"union", UNION_KEYW}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"long", LONG_KEYW} - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - register int key = is_reserved_hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= 0) - { - register const char *s = wordlist[key].name; - - if (*str == *s && !strcmp (str + 1, s + 1)) - return &wordlist[key]; - } - } - return 0; -} diff -Nur modutils-2.4.19/genksyms/keywords.c_shipped modutils-2.4.20/genksyms/keywords.c_shipped --- modutils-2.4.19/genksyms/keywords.c_shipped Thu Jan 1 10:00:00 1970 +++ modutils-2.4.20/genksyms/keywords.c_shipped Wed Sep 4 13:08:03 2002 @@ -0,0 +1,144 @@ +/* C code produced by gperf version 2.7.2 */ +/* Command-line: gperf -a -C -E -g -H is_reserved_hash -k '1,3,$' -N is_reserved_word -p -t keywords.gperf */ +struct resword { const char *name; int token; }; +/* maximum key range = 101, duplicates = 0 */ + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static unsigned int +is_reserved_hash (str, len) + register const char *str; + register unsigned int len; +{ + static const unsigned char asso_values[] = + { + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 5, + 105, 105, 105, 105, 105, 105, 0, 105, 105, 105, + 0, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 0, 105, 0, 105, 20, + 25, 0, 35, 30, 105, 20, 105, 105, 40, 30, + 30, 0, 0, 105, 0, 0, 0, 15, 5, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105 + }; + return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]] + asso_values[(unsigned char)str[len - 1]]; +} + +#ifdef __GNUC__ +__inline +#endif +const struct resword * +is_reserved_word (str, len) + register const char *str; + register unsigned int len; +{ + enum + { + TOTAL_KEYWORDS = 39, + MIN_WORD_LENGTH = 3, + MAX_WORD_LENGTH = 17, + MIN_HASH_VALUE = 4, + MAX_HASH_VALUE = 104 + }; + + static const struct resword wordlist[] = + { + {""}, {""}, {""}, {""}, + {"auto", AUTO_KEYW}, + {"short", SHORT_KEYW}, + {"struct", STRUCT_KEYW}, + {"__asm__", ASM_KEYW}, + {"restrict", RESTRICT_KEYW}, + {"_restrict", RESTRICT_KEYW}, + {"__signed__", SIGNED_KEYW}, + {"__attribute", ATTRIBUTE_KEYW}, + {"__restrict__", RESTRICT_KEYW}, + {"__attribute__", ATTRIBUTE_KEYW}, + {""}, + {"__volatile", VOLATILE_KEYW}, + {""}, + {"__volatile__", VOLATILE_KEYW}, + {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, + {""}, {""}, {""}, + {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, + {"int", INT_KEYW}, + {"char", CHAR_KEYW}, + {""}, + {"static", STATIC_KEYW}, + {"__const", CONST_KEYW}, + {"__inline", INLINE_KEYW}, + {"__const__", CONST_KEYW}, + {"__inline__", INLINE_KEYW}, + {""}, {""}, + {"__signed", SIGNED_KEYW}, + {""}, + {"__asm", ASM_KEYW}, + {"extern", EXTERN_KEYW}, + {""}, + {"register", REGISTER_KEYW}, + {""}, + {"float", FLOAT_KEYW}, + {""}, + {"typedef", TYPEDEF_KEYW}, + {""}, {""}, + {"_Bool", BOOL_KEYW}, + {"double", DOUBLE_KEYW}, + {""}, + {"unsigned", UNSIGNED_KEYW}, + {"enum", ENUM_KEYW}, + {""}, {""}, {""}, + {"volatile", VOLATILE_KEYW}, + {"void", VOID_KEYW}, + {"const", CONST_KEYW}, + {""}, {""}, {""}, {""}, {""}, + {"signed", SIGNED_KEYW}, + {""}, + {"asm", ASM_KEYW}, + {""}, {""}, + {"inline", INLINE_KEYW}, + {""}, {""}, {""}, + {"union", UNION_KEYW}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"long", LONG_KEYW} + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + register int key = is_reserved_hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= 0) + { + register const char *s = wordlist[key].name; + + if (*str == *s && !strcmp (str + 1, s + 1)) + return &wordlist[key]; + } + } + return 0; +} diff -Nur modutils-2.4.19/genksyms/keywords.gperf_shipped modutils-2.4.20/genksyms/keywords.gperf_shipped --- modutils-2.4.19/genksyms/keywords.gperf_shipped Thu Jan 1 10:00:00 1970 +++ modutils-2.4.20/genksyms/keywords.gperf_shipped Wed Sep 4 12:33:05 2002 @@ -0,0 +1,48 @@ +%{ +%} +struct resword { const char *name; int token; } +%% +EXPORT_SYMBOL, EXPORT_SYMBOL_KEYW +EXPORT_SYMBOL_GPL, EXPORT_SYMBOL_KEYW +__asm, ASM_KEYW +__asm__, ASM_KEYW +__attribute, ATTRIBUTE_KEYW +__attribute__, ATTRIBUTE_KEYW +__const, CONST_KEYW +__const__, CONST_KEYW +__inline, INLINE_KEYW +__inline__, INLINE_KEYW +__signed, SIGNED_KEYW +__signed__, SIGNED_KEYW +__volatile, VOLATILE_KEYW +__volatile__, VOLATILE_KEYW +# According to rth, c99 defines _Bool, __restrict, __restrict__, restrict. KAO +_Bool, BOOL_KEYW +_restrict, RESTRICT_KEYW +__restrict__, RESTRICT_KEYW +restrict, RESTRICT_KEYW +asm, ASM_KEYW +# attribute commented out in modutils 2.4.2. People are using 'attribute' as a +# field name which breaks the genksyms parser. It is not a gcc keyword anyway. +# KAO. +# attribute, ATTRIBUTE_KEYW +auto, AUTO_KEYW +char, CHAR_KEYW +const, CONST_KEYW +double, DOUBLE_KEYW +enum, ENUM_KEYW +extern, EXTERN_KEYW +float, FLOAT_KEYW +inline, INLINE_KEYW +int, INT_KEYW +long, LONG_KEYW +register, REGISTER_KEYW +short, SHORT_KEYW +signed, SIGNED_KEYW +static, STATIC_KEYW +struct, STRUCT_KEYW +typedef, TYPEDEF_KEYW +union, UNION_KEYW +unsigned, UNSIGNED_KEYW +void, VOID_KEYW +volatile, VOLATILE_KEYW diff -Nur modutils-2.4.19/include/version.h modutils-2.4.20/include/version.h --- modutils-2.4.19/include/version.h Fri Jul 26 20:08:44 2002 +++ modutils-2.4.20/include/version.h Wed Sep 4 11:45:23 2002 @@ -1 +1 @@ -#define MODUTILS_VERSION "2.4.19" +#define MODUTILS_VERSION "2.4.20" diff -Nur modutils-2.4.19/modutils.spec modutils-2.4.20/modutils.spec --- modutils-2.4.19/modutils.spec Fri Jul 26 20:08:44 2002 +++ modutils-2.4.20/modutils.spec Wed Sep 4 11:45:23 2002 @@ -1,6 +1,6 @@ Summary: Module utilities Name: modutils -Version: 2.4.19 +Version: 2.4.20 Release: 1 Copyright: GPL Group: Utilities/System