make-4.0-char-cast.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. https://savannah.gnu.org/bugs/?40371
  2. http://git.savannah.gnu.org/cgit/make.git/commit/?id=9d58570c
  3. From 9d58570c77240fed53d1f88217877f8e778f4bb2 Mon Sep 17 00:00:00 2001
  4. From: Paul Smith <psmith@gnu.org>
  5. Date: Sat, 26 Oct 2013 04:10:17 +0000
  6. Subject: * makeint.h (STOP_SET): [SV 40371] Cast to unsigned char.
  7. * tests/scripts/misc/utf8: Test variable names with characters >127.
  8. Fix suggested by Robert Bogomip <bob.bogo@milohedge.com>
  9. ---
  10. diff --git a/makeint.h b/makeint.h
  11. index 77f51e0..c591427 100644
  12. --- a/makeint.h
  13. +++ b/makeint.h
  14. @@ -415,7 +415,7 @@ extern int unixy_shell;
  15. # define MAP_VMSCOMMA 0x0000
  16. #endif
  17. -#define STOP_SET(_v,_m) ANY_SET (stopchar_map[(int)(_v)],(_m))
  18. +#define STOP_SET(_v,_m) ANY_SET (stopchar_map[(unsigned char)(_v)],(_m))
  19. #if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
  20. # define SET_STACK_SIZE
  21. diff --git a/tests/scripts/misc/utf8 b/tests/scripts/misc/utf8
  22. new file mode 100644
  23. index 0000000..2adcd07
  24. --- a/dev/null
  25. +++ b/tests/scripts/misc/utf8
  26. @@ -0,0 +1,14 @@
  27. +# -*-perl-*-
  28. +$description = "Test utf8 handling.";
  29. +
  30. +$details = "";
  31. +
  32. +# Variable names containing UTF8 characters
  33. +run_make_test("
  34. +\xe2\x96\xaa := hello
  35. +\$(info \$(\xe2\x96\xaa))
  36. +all:
  37. +",
  38. + '', "hello\n#MAKE#: Nothing to be done for 'all'.");
  39. +
  40. +1;
  41. --
  42. cgit v0.9.0.2