From 77005f0338e3c1ab8ab58100f705c03b8966a320 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sat, 26 Oct 2013 00:10:17 -0400 Subject: * makeint.h (STOP_SET): [SV 40371] Cast to unsigned char. * tests/scripts/misc/utf8: Test variable names with characters >127. Fix suggested by Robert Bogomip Change-Id: I93e2b24562d2bed3a8d60f8876d1def3a1f7b012 Signed-off-by: Yury Usishchev --- makeint.h | 2 +- tests/scripts/misc/utf8 | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tests/scripts/misc/utf8 diff --git a/makeint.h b/makeint.h index 3e22296..7677af0 100644 --- a/makeint.h +++ b/makeint.h @@ -409,7 +409,7 @@ extern int unixy_shell; # define MAP_VMSCOMMA 0x0000 #endif -#define STOP_SET(_v,_m) ANY_SET (stopchar_map[(int)(_v)],(_m)) +#define STOP_SET(_v,_m) ANY_SET (stopchar_map[(unsigned char)(_v)],(_m)) #if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT) # define SET_STACK_SIZE diff --git a/tests/scripts/misc/utf8 b/tests/scripts/misc/utf8 new file mode 100644 index 0000000..2adcd07 --- /dev/null +++ b/tests/scripts/misc/utf8 @@ -0,0 +1,14 @@ +# -*-perl-*- +$description = "Test utf8 handling."; + +$details = ""; + +# Variable names containing UTF8 characters +run_make_test(" +\xe2\x96\xaa := hello +\$(info \$(\xe2\x96\xaa)) +all: +", + '', "hello\n#MAKE#: Nothing to be done for 'all'."); + +1; -- cgit v1.2.3