[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Patches] int/hex/string option types
- To: Steve Longerbeam <steve_longerbeam@xxxxxxxxxx>
- Subject: Re: [Patches] int/hex/string option types
- From: "Joseph S. Myers" <joseph@xxxxxxxxxxxxxxxx>
- Date: Tue, 6 Dec 2011 01:43:33 +0000 (UTC)
On Mon, 28 Nov 2011, Steve Longerbeam wrote:
> diff -Nupbar -X /home/stevel/dontdiff eglibc.orig/libc/scripts/option-groups.awk eglibc/libc/scripts/option-groups.awk
> --- eglibc.orig/libc/scripts/option-groups.awk 2011-11-22 17:32:21.356911312 -0800
> +++ eglibc/libc/scripts/option-groups.awk 2011-11-23 15:08:37.792003410 -0800
> @@ -46,9 +46,13 @@ END {
> print "#define __" var " 1"
> else if (vars[var] == "n")
> print "/* #undef __" var " */"
> - # Ignore variables that don't have boolean values.
> - # Ideally, this would be driven by the types given in
> - # option-groups.def.
> + else if (vars[var] ~ /^0*x*[0-9]+/ || vars[var] ~ /\"\w*\"/)
I'm not clear on the integer syntax you're expecting to match with
/^0*x*[0-9]+/, but if hex integers are possible (presumably, since you're
allowing 'x') I'd have thought you need to allow for letters a-f after
them. (Unless this script will only ever run in the C locale, you don't
actually want to use "a-f" directly in a range, since in some locales that
will include other letters as well; spell out all the possible letters
explicitly.)
\"\w*\" also looks wrong for the string syntax; strings such as file names
may well not be restricted to word (alphanumeric and underscore)
characters.
--
Joseph S. Myers
joseph@xxxxxxxxxxxxxxxx
_______________________________________________
Patches mailing list
Patches@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/patches