bash.patch 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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 adds an explicit recognition for terminal sequence "kD" to be
  21. "Delete" key. This is derived from Debian GNU/Linux and SuSE Linux.
  22. Index: lib/readline/terminal.c
  23. --- lib/readline/terminal.c.orig 2003-09-18 17:03:42 +0200
  24. +++ lib/readline/terminal.c 2004-07-27 20:03:17 +0200
  25. @@ -145,6 +145,9 @@
  26. static char *_rl_term_kH;
  27. static char *_rl_term_at7; /* @7 */
  28. +/* The key sequence sent by the Delete key, if any. */
  29. +static char *_rl_term_kD;
  30. +
  31. /* Insert key */
  32. static char *_rl_term_kI;
  33. @@ -313,6 +316,7 @@
  34. { "ei", &_rl_term_ei },
  35. { "ic", &_rl_term_ic },
  36. { "im", &_rl_term_im },
  37. + { "kD", &_rl_term_kD }, /* delete */
  38. { "kH", &_rl_term_kH }, /* home down ?? */
  39. { "kI", &_rl_term_kI }, /* insert */
  40. { "kd", &_rl_term_kd },
  41. @@ -492,6 +496,7 @@
  42. rl_bind_keyseq_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */
  43. rl_bind_keyseq_if_unbound (_rl_term_at7, rl_end_of_line); /* End */
  44. + rl_bind_keyseq_if_unbound (_rl_term_kD, rl_delete); /* Delete */
  45. _rl_keymap = xkeymap;
  46. }
  47. -----------------------------------------------------------------------------
  48. This patch makes sure a signal state variable is declared "volatile" so
  49. it is consistent throughout signal handling. This patch is derived from
  50. SuSE Linux.
  51. Index: quit.h
  52. --- quit.h.orig 2001-09-10 16:08:33 +0200
  53. +++ quit.h 2004-07-27 19:47:10 +0200
  54. @@ -22,7 +22,7 @@
  55. #define _QUIT_H_
  56. /* Non-zero means SIGINT has already ocurred. */
  57. -extern int interrupt_state;
  58. +extern volatile int interrupt_state;
  59. /* Macro to call a great deal. SIGINT just sets above variable. When
  60. it is safe, put QUIT in the code, and the "interrupt" will take place. */
  61. Index: sig.c
  62. --- sig.c.orig 2003-12-19 22:11:35 +0100
  63. +++ sig.c 2004-07-27 19:47:10 +0200
  64. @@ -59,7 +59,7 @@
  65. extern int parse_and_execute_level, shell_initialized;
  66. /* Non-zero after SIGINT. */
  67. -int interrupt_state;
  68. +volatile int interrupt_state = 0;
  69. /* The environment at the top-level R-E loop. We use this in
  70. the case of error return. */
  71. @@ -71,7 +71,7 @@
  72. #endif /* JOB_CONTROL */
  73. /* When non-zero, we throw_to_top_level (). */
  74. -int interrupt_immediately = 0;
  75. +volatile int interrupt_immediately = 0;
  76. static void initialize_shell_signals __P((void));
  77. -----------------------------------------------------------------------------
  78. Port to HP-UX 11i and similar less smart platforms.
  79. Index: configure
  80. --- configure.orig 2004-07-21 22:18:56 +0200
  81. +++ configure 2004-07-27 19:47:10 +0200
  82. @@ -1479,6 +1479,7 @@
  83. *-beos*) opt_bash_malloc=no ;; # they say it's suitable
  84. *-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment
  85. *-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft
  86. +*-hpux*) opt_bash_malloc=no ;; # HP HP-UX
  87. esac
  88. # memory scrambling on free()
  89. @@ -1624,7 +1625,7 @@
  90. else
  91. MALLOC_LIB=
  92. - MALLOC_LIBRARY=
  93. + MALLOC_LIBRARY=dummy
  94. MALLOC_LDFLAGS=
  95. MALLOC_DEP=
  96. fi
  97. Index: syntax.h
  98. --- syntax.h.orig 2004-04-15 05:19:36 +0200
  99. +++ syntax.h 2004-07-27 19:47:10 +0200
  100. @@ -21,6 +21,8 @@
  101. #ifndef _SYNTAX_H_
  102. #define _SYNTAX_H_
  103. +#include "config.h"
  104. +
  105. /* Defines for use by mksyntax.c */
  106. #define slashify_in_quotes "\\`$\"\n"
  107. -----------------------------------------------------------------------------
  108. This adds the OpenPKG packaging brand.
  109. Index: version.c
  110. --- version.c.orig 2003-12-19 22:34:02 +0100
  111. +++ version.c 2004-07-27 19:47:10 +0200
  112. @@ -77,7 +77,7 @@
  113. show_shell_version (extended)
  114. int extended;
  115. {
  116. - printf ("GNU bash, version %s (%s)\n", shell_version_string (), MACHTYPE);
  117. + printf ("GNU bash, version %s (%s) [@l_openpkg_release@]\n", shell_version_string (), MACHTYPE);
  118. if (extended)
  119. printf (_("Copyright (C) 2004 Free Software Foundation, Inc.\n"));
  120. }
  121. -----------------------------------------------------------------------------
  122. Fix timezone handling for HPUX
  123. Index: lib/sh/strftime.c
  124. --- lib/sh/strftime.c.orig 2004-03-04 04:13:23 +0100
  125. +++ lib/sh/strftime.c 2004-08-06 12:40:06 +0200
  126. @@ -97,6 +97,8 @@
  127. extern int daylight;
  128. #if defined(SOLARIS) || defined(mips) || defined (M_UNIX)
  129. extern long int timezone, altzone;
  130. +#elif defined(HPUX)
  131. +extern long int timezone;
  132. #else
  133. extern int timezone, altzone;
  134. #endif
  135. @@ -480,7 +482,11 @@
  136. * Systems with tzname[] probably have timezone as
  137. * secs west of GMT. Convert to mins east of GMT.
  138. */
  139. +#if defined(HPUX)
  140. + off = -(timezone / 60);
  141. +#else
  142. off = -(daylight ? timezone : altzone) / 60;
  143. +#endif /* HPUX */
  144. #else /* !HAVE_TZNAME */
  145. off = -zone.tz_minuteswest;
  146. #endif /* !HAVE_TZNAME */