bash.patch 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. This patch documents two implemented and classical command
  2. line options "-v" and "-x". It is derived from Debian GNU/Linux.
  3. Index: doc/bash.1
  4. --- doc/bash.1.orig 2004-07-12 17:27:08 +0200
  5. +++ doc/bash.1 2004-07-27 19:47:10 +0200
  6. @@ -113,6 +113,12 @@
  7. This option allows the positional parameters to be set
  8. when invoking an interactive shell.
  9. .TP
  10. +.B \-v
  11. +Print shell input lines as they are read.
  12. +.TP
  13. +.B \-x
  14. +Print commands and their arguments as they are executed.
  15. +.TP
  16. .B \-D
  17. A list of all double-quoted strings preceded by \fB$\fP
  18. is printed on the standard ouput.
  19. -----------------------------------------------------------------------------
  20. This patch makes sure a signal state variable is declared "volatile" so
  21. it is consistent throughout signal handling. This patch is derived from
  22. SuSE Linux.
  23. Index: quit.h
  24. --- quit.h.orig 2001-09-10 16:08:33 +0200
  25. +++ quit.h 2004-07-27 19:47:10 +0200
  26. @@ -22,7 +22,7 @@
  27. #define _QUIT_H_
  28. /* Non-zero means SIGINT has already ocurred. */
  29. -extern int interrupt_state;
  30. +extern volatile int interrupt_state;
  31. /* Macro to call a great deal. SIGINT just sets above variable. When
  32. it is safe, put QUIT in the code, and the "interrupt" will take place. */
  33. Index: sig.c
  34. --- sig.c.orig 2003-12-19 22:11:35 +0100
  35. +++ sig.c 2004-07-27 19:47:10 +0200
  36. @@ -59,7 +59,7 @@
  37. extern int parse_and_execute_level, shell_initialized;
  38. /* Non-zero after SIGINT. */
  39. -int interrupt_state;
  40. +volatile int interrupt_state = 0;
  41. /* The environment at the top-level R-E loop. We use this in
  42. the case of error return. */
  43. @@ -71,7 +71,7 @@
  44. #endif /* JOB_CONTROL */
  45. /* When non-zero, we throw_to_top_level (). */
  46. -int interrupt_immediately = 0;
  47. +volatile int interrupt_immediately = 0;
  48. static void initialize_shell_signals __P((void));
  49. -----------------------------------------------------------------------------
  50. Port to HP-UX 11i and similar less smart platforms.
  51. Index: configure
  52. --- configure.orig 2004-07-21 22:18:56 +0200
  53. +++ configure 2004-07-27 19:47:10 +0200
  54. @@ -1479,6 +1479,7 @@
  55. *-beos*) opt_bash_malloc=no ;; # they say it's suitable
  56. *-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment
  57. *-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft
  58. +*-hpux*) opt_bash_malloc=no ;; # HP HP-UX
  59. esac
  60. # memory scrambling on free()
  61. @@ -1624,7 +1625,7 @@
  62. else
  63. MALLOC_LIB=
  64. - MALLOC_LIBRARY=
  65. + MALLOC_LIBRARY=dummy
  66. MALLOC_LDFLAGS=
  67. MALLOC_DEP=
  68. fi
  69. Index: syntax.h
  70. --- syntax.h.orig 2004-04-15 05:19:36 +0200
  71. +++ syntax.h 2004-07-27 19:47:10 +0200
  72. @@ -21,6 +21,8 @@
  73. #ifndef _SYNTAX_H_
  74. #define _SYNTAX_H_
  75. +#include "config.h"
  76. +
  77. /* Defines for use by mksyntax.c */
  78. #define slashify_in_quotes "\\`$\"\n"
  79. -----------------------------------------------------------------------------
  80. This adds the OpenPKG packaging brand.
  81. Index: version.c
  82. --- version.c.orig 2003-12-19 22:34:02 +0100
  83. +++ version.c 2004-07-27 19:47:10 +0200
  84. @@ -77,7 +77,7 @@
  85. show_shell_version (extended)
  86. int extended;
  87. {
  88. - printf ("GNU bash, version %s (%s)\n", shell_version_string (), MACHTYPE);
  89. + printf ("GNU bash, version %s (%s) [@l_openpkg_release@]\n", shell_version_string (), MACHTYPE);
  90. if (extended)
  91. printf (_("Copyright (C) 2004 Free Software Foundation, Inc.\n"));
  92. }
  93. -----------------------------------------------------------------------------
  94. Remove dependency to Bison/Yacc by applying a vendor patch to a generated file.
  95. Index: y.tab.c
  96. --- y.tab.c.orig 2005-11-14 15:53:30 +0100
  97. +++ y.tab.c 2006-03-06 22:46:56 +0100
  98. @@ -4237,7 +4237,7 @@
  99. if (open == ch) /* undo previous increment */
  100. count--;
  101. if (ch == '(') /* ) */
  102. - nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags);
  103. + nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags & ~P_DQUOTE);
  104. else if (ch == '{') /* } */
  105. nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags);
  106. else if (ch == '[') /* ] */