openocd-0.8.0-jimtcl-0.75.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. Apply upstream patch for jimtcl-0.75 compatibility
  2. X-Gentoo-Bug: 509902
  3. X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=509902
  4. Link: http://repo.or.cz/w/openocd.git/commitdiff/92ea548aafee840e1507306a3ffb38625f427ec5
  5. Signed-off-by: Markos Chandras <hwoarang@gentoo.org>
  6. From 92ea548aafee840e1507306a3ffb38625f427ec5 Mon Sep 17 00:00:00 2001
  7. From: Paul Fertser <fercerpav@gmail.com>
  8. Date: Mon, 28 Apr 2014 14:34:47 +0400
  9. Subject: [PATCH] Update to the current Jim Tcl
  10. This is a post-release version but hopefully some fixes that went in
  11. are worth it; also the changes here make OpenOCD compatible with stock
  12. 0.75 version if a distro maintainer decides to use it.
  13. Change-Id: I7ad1814c7c4868198475cdca4750c3d0ee4f5f8b
  14. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
  15. Reviewed-on: http://openocd.zylin.com/2121
  16. Tested-by: jenkins
  17. Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
  18. ---
  19. jimtcl | 2 +-
  20. src/helper/command.c | 2 +-
  21. src/helper/command.h | 4 ++--
  22. 3 files changed, 4 insertions(+), 4 deletions(-)
  23. diff --git a/src/helper/command.c b/src/helper/command.c
  24. index 21362a6..137ac7e 100644
  25. --- a/src/helper/command.c
  26. +++ b/src/helper/command.c
  27. @@ -365,7 +365,7 @@ static int register_command_handler(struct command_context *cmd_ctx,
  28. LOG_DEBUG("registering '%s'...", ocd_name);
  29. - Jim_CmdProc func = c->handler ? &script_command : &command_unknown;
  30. + Jim_CmdProc *func = c->handler ? &script_command : &command_unknown;
  31. int retval = Jim_CreateCommand(interp, ocd_name, func, c, NULL);
  32. free(ocd_name);
  33. if (JIM_OK != retval)
  34. diff --git a/src/helper/command.h b/src/helper/command.h
  35. index 0f0edbb..0eda5b5 100644
  36. --- a/src/helper/command.h
  37. +++ b/src/helper/command.h
  38. @@ -168,7 +168,7 @@ struct command {
  39. struct command *parent;
  40. struct command *children;
  41. command_handler_t handler;
  42. - Jim_CmdProc jim_handler;
  43. + Jim_CmdProc *jim_handler;
  44. void *jim_handler_data;
  45. enum command_mode mode;
  46. struct command *next;
  47. @@ -204,7 +204,7 @@ char *command_name(struct command *c, char delim);
  48. struct command_registration {
  49. const char *name;
  50. command_handler_t handler;
  51. - Jim_CmdProc jim_handler;
  52. + Jim_CmdProc *jim_handler;
  53. void *jim_handler_data;
  54. enum command_mode mode;
  55. const char *help;
  56. --
  57. 1.7.6.6.GIT