source:
patches/bash-4.2-branch_update-3.patch@
dbcaa8a
Last change on this file since dbcaa8a was d01d386, checked in by , 13 years ago | |
---|---|
|
|
File size: 22.3 KB |
-
assoc.c
Submitted By: Jonathan Norman (jonathan at bluesquarelinux dot co dot uk) Date: 15-02-2012 Initial Package Version: 4.2 Origin: Upstream Upstream Status: Applied Description: Contains all upstream patches up to 4.2-020 diff -Naur bash-4.2.orig/assoc.c bash-4.2/assoc.c
old new 77 77 b = hash_search (key, hash, HASH_CREATE); 78 78 if (b == 0) 79 79 return -1; 80 /* If we are overwriting an existing element's value, we're not going to 81 use the key. Nothing in the array assignment code path frees the key 82 string, so we can free it here to avoid a memory leak. */ 83 if (b->key != key) 84 free (key); 80 85 FREE (b->data); 81 86 b->data = value ? savestring (value) : (char *)0; 82 87 return (0); -
builtins/declare.def
diff -Naur bash-4.2.orig/builtins/declare.def bash-4.2/builtins/declare.def
old new 513 513 *subscript_start = '['; /* ] */ 514 514 var = assign_array_element (name, value, 0); /* XXX - not aflags */ 515 515 *subscript_start = '\0'; 516 if (var == 0) /* some kind of assignment error */ 517 { 518 assign_error++; 519 NEXT_VARIABLE (); 520 } 516 521 } 517 522 else if (simple_array_assign) 518 523 { -
builtins/fc.def
diff -Naur bash-4.2.orig/builtins/fc.def bash-4.2/builtins/fc.def
old new 304 304 last_hist = i - rh - hist_last_line_added; 305 305 306 306 /* XXX */ 307 if ( saved_command_line_count > 0 &&i == last_hist && hlist[last_hist] == 0)307 if (i == last_hist && hlist[last_hist] == 0) 308 308 while (last_hist >= 0 && hlist[last_hist] == 0) 309 309 last_hist--; 310 310 if (last_hist < 0) … … 475 475 HIST_ENTRY **hlist; 476 476 { 477 477 int sign, n, clen, rh; 478 register int i, j ;478 register int i, j, last_hist; 479 479 register char *s; 480 480 481 481 sign = 1; … … 495 495 has been enabled (interactive or not) should use it in the last_hist 496 496 calculation as if it were on. */ 497 497 rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list); 498 i -= rh + hist_last_line_added; 498 last_hist = i - rh - hist_last_line_added; 499 500 if (i == last_hist && hlist[last_hist] == 0) 501 while (last_hist >= 0 && hlist[last_hist] == 0) 502 last_hist--; 503 if (last_hist < 0) 504 return (-1); 505 506 i = last_hist; 499 507 500 508 /* No specification defaults to most recent command. */ 501 509 if (command == NULL) -
builtins/printf.def
diff -Naur bash-4.2.orig/builtins/printf.def bash-4.2/builtins/printf.def
old new 465 465 secs = shell_start_time; /* roughly $SECONDS */ 466 466 else 467 467 secs = arg; 468 #if defined (HAVE_TZSET) 469 sv_tz ("TZ"); /* XXX -- just make sure */ 470 #endif 468 471 tm = localtime (&secs); 469 472 n = strftime (timebuf, sizeof (timebuf), timefmt, tm); 470 473 free (timefmt); -
builtins/read.def
diff -Naur bash-4.2.orig/builtins/read.def bash-4.2/builtins/read.def
old new 642 642 xfree (input_string); 643 643 return EXECUTION_FAILURE; /* readonly or noassign */ 644 644 } 645 if (assoc_p (var)) 646 { 647 builtin_error (_("%s: cannot convert associative to indexed array"), arrayname); 648 xfree (input_string); 649 return EXECUTION_FAILURE; /* existing associative array */ 650 } 645 651 array_flush (array_cell (var)); 646 652 647 653 alist = list_string (input_string, ifs_chars, 0); -
execute_cmd.c
diff -Naur bash-4.2.orig/execute_cmd.c bash-4.2/execute_cmd.c
old new 2196 2196 if (ignore_return && cmd) 2197 2197 cmd->flags |= CMD_IGNORE_RETURN; 2198 2198 2199 #if defined (JOB_CONTROL) 2199 2200 lastpipe_flag = 0; 2200 2201 begin_unwind_frame ("lastpipe-exec"); 2201 2202 lstdin = -1; … … 2215 2216 lastpipe_jid = stop_pipeline (0, (COMMAND *)NULL); /* XXX */ 2216 2217 add_unwind_protect (lastpipe_cleanup, lastpipe_jid); 2217 2218 } 2218 cmd->flags |= CMD_LASTPIPE; 2219 if (cmd) 2220 cmd->flags |= CMD_LASTPIPE; 2219 2221 } 2220 2222 if (prev >= 0) 2221 2223 add_unwind_protect (close, prev); 2224 #endif 2222 2225 2223 2226 exec_result = execute_command_internal (cmd, asynchronous, prev, pipe_out, fds_to_close); 2224 2227 2228 #if defined (JOB_CONTROL) 2225 2229 if (lstdin > 0) 2226 2230 restore_stdin (lstdin); 2231 #endif 2227 2232 2228 2233 if (prev >= 0) 2229 2234 close (prev); -
bash-4.2
diff -Naur bash-4.2.orig/expr.c bash-4.2/expr.c
old new 476 476 477 477 if (special) 478 478 { 479 if ((op == DIV || op == MOD) && value == 0) 480 { 481 if (noeval == 0) 482 evalerror (_("division by 0")); 483 else 484 value = 1; 485 } 486 479 487 switch (op) 480 488 { 481 489 case MUL: 482 490 lvalue *= value; 483 491 break; 484 492 case DIV: 485 if (value == 0)486 evalerror (_("division by 0"));487 493 lvalue /= value; 488 494 break; 489 495 case MOD: 490 if (value == 0)491 evalerror (_("division by 0"));492 496 lvalue %= value; 493 497 break; 494 498 case PLUS: … … 804 808 val2 = exppower (); 805 809 806 810 if (((op == DIV) || (op == MOD)) && (val2 == 0)) 807 evalerror (_("division by 0")); 811 { 812 if (noeval == 0) 813 evalerror (_("division by 0")); 814 else 815 val2 = 1; 816 } 808 817 809 818 if (op == MUL) 810 819 val1 *= val2; -
lib/glob/gmisc.c
diff -Naur bash-4.2.orig/lib/glob/gmisc.c bash-4.2/lib/glob/gmisc.c
old new 77 77 wchar_t *wpat; 78 78 size_t wmax; 79 79 { 80 wchar_t wc , *wbrack;81 int matlen, t, in_cclass, in_collsym, in_equiv;80 wchar_t wc; 81 int matlen, bracklen, t, in_cclass, in_collsym, in_equiv; 82 82 83 83 if (*wpat == 0) 84 84 return (0); … … 118 118 break; 119 119 case L'[': 120 120 /* scan for ending `]', skipping over embedded [:...:] */ 121 wbrack = wpat;121 bracklen = 1; 122 122 wc = *wpat++; 123 123 do 124 124 { 125 125 if (wc == 0) 126 126 { 127 matlen += wpat - wbrack - 1; /* incremented below */ 128 break; 127 wpat--; /* back up to NUL */ 128 matlen += bracklen; 129 goto bad_bracket; 129 130 } 130 131 else if (wc == L'\\') 131 132 { 132 wc = *wpat++; 133 if (*wpat == 0) 134 break; 133 /* *wpat == backslash-escaped character */ 134 bracklen++; 135 /* If the backslash or backslash-escape ends the string, 136 bail. The ++wpat skips over the backslash escape */ 137 if (*wpat == 0 || *++wpat == 0) 138 { 139 matlen += bracklen; 140 goto bad_bracket; 141 } 135 142 } 136 143 else if (wc == L'[' && *wpat == L':') /* character class */ 137 144 { 138 145 wpat++; 146 bracklen++; 139 147 in_cclass = 1; 140 148 } 141 149 else if (in_cclass && wc == L':' && *wpat == L']') 142 150 { 143 151 wpat++; 152 bracklen++; 144 153 in_cclass = 0; 145 154 } 146 155 else if (wc == L'[' && *wpat == L'.') /* collating symbol */ 147 156 { 148 157 wpat++; 158 bracklen++; 149 159 if (*wpat == L']') /* right bracket can appear as collating symbol */ 150 wpat++; 160 { 161 wpat++; 162 bracklen++; 163 } 151 164 in_collsym = 1; 152 165 } 153 166 else if (in_collsym && wc == L'.' && *wpat == L']') 154 167 { 155 168 wpat++; 169 bracklen++; 156 170 in_collsym = 0; 157 171 } 158 172 else if (wc == L'[' && *wpat == L'=') /* equivalence class */ 159 173 { 160 174 wpat++; 175 bracklen++; 161 176 if (*wpat == L']') /* right bracket can appear as equivalence class */ 162 wpat++; 177 { 178 wpat++; 179 bracklen++; 180 } 163 181 in_equiv = 1; 164 182 } 165 183 else if (in_equiv && wc == L'=' && *wpat == L']') 166 184 { 167 185 wpat++; 186 bracklen++; 168 187 in_equiv = 0; 169 188 } 189 else 190 bracklen++; 170 191 } 171 192 while ((wc = *wpat++) != L']'); 172 193 matlen++; /* bracket expression can only match one char */ 194 bad_bracket: 173 195 break; 174 196 } 175 197 } … … 213 235 char *pat; 214 236 size_t max; 215 237 { 216 char c , *brack;217 int matlen, t, in_cclass, in_collsym, in_equiv;238 char c; 239 int matlen, bracklen, t, in_cclass, in_collsym, in_equiv; 218 240 219 241 if (*pat == 0) 220 242 return (0); … … 254 276 break; 255 277 case '[': 256 278 /* scan for ending `]', skipping over embedded [:...:] */ 257 brack = pat;279 bracklen = 1; 258 280 c = *pat++; 259 281 do 260 282 { 261 283 if (c == 0) 262 284 { 263 matlen += pat - brack - 1; /* incremented below */ 264 break; 285 pat--; /* back up to NUL */ 286 matlen += bracklen; 287 goto bad_bracket; 265 288 } 266 289 else if (c == '\\') 267 290 { 268 c = *pat++; 269 if (*pat == 0) 270 break; 291 /* *pat == backslash-escaped character */ 292 bracklen++; 293 /* If the backslash or backslash-escape ends the string, 294 bail. The ++pat skips over the backslash escape */ 295 if (*pat == 0 || *++pat == 0) 296 { 297 matlen += bracklen; 298 goto bad_bracket; 299 } 271 300 } 272 301 else if (c == '[' && *pat == ':') /* character class */ 273 302 { 274 303 pat++; 304 bracklen++; 275 305 in_cclass = 1; 276 306 } 277 307 else if (in_cclass && c == ':' && *pat == ']') 278 308 { 279 309 pat++; 310 bracklen++; 280 311 in_cclass = 0; 281 312 } 282 313 else if (c == '[' && *pat == '.') /* collating symbol */ 283 314 { 284 315 pat++; 316 bracklen++; 285 317 if (*pat == ']') /* right bracket can appear as collating symbol */ 286 pat++; 318 { 319 pat++; 320 bracklen++; 321 } 287 322 in_collsym = 1; 288 323 } 289 324 else if (in_collsym && c == '.' && *pat == ']') 290 325 { 291 326 pat++; 327 bracklen++; 292 328 in_collsym = 0; 293 329 } 294 330 else if (c == '[' && *pat == '=') /* equivalence class */ 295 331 { 296 332 pat++; 333 bracklen++; 297 334 if (*pat == ']') /* right bracket can appear as equivalence class */ 298 pat++; 335 { 336 pat++; 337 bracklen++; 338 } 299 339 in_equiv = 1; 300 340 } 301 341 else if (in_equiv && c == '=' && *pat == ']') 302 342 { 303 343 pat++; 344 bracklen++; 304 345 in_equiv = 0; 305 346 } 347 else 348 bracklen++; 306 349 } 307 350 while ((c = *pat++) != ']'); 308 351 matlen++; /* bracket expression can only match one char */ 352 bad_bracket: 309 353 break; 310 354 } 311 355 } -
lib/readline/callback.c
diff -Naur bash-4.2.orig/lib/readline/callback.c bash-4.2/lib/readline/callback.c
old new 148 148 eof = _rl_vi_domove_callback (_rl_vimvcxt); 149 149 /* Should handle everything, including cleanup, numeric arguments, 150 150 and turning off RL_STATE_VIMOTION */ 151 if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) 152 _rl_internal_char_cleanup (); 153 151 154 return; 152 155 } 153 156 #endif -
lib/readline/vi_mode.c
diff -Naur bash-4.2.orig/lib/readline/vi_mode.c bash-4.2/lib/readline/vi_mode.c
old new 1114 1114 rl_beg_of_line (1, c); 1115 1115 _rl_vi_last_motion = c; 1116 1116 RL_UNSETSTATE (RL_STATE_VIMOTION); 1117 return ( 0);1117 return (vidomove_dispatch (m)); 1118 1118 } 1119 1119 #if defined (READLINE_CALLBACKS) 1120 1120 /* XXX - these need to handle rl_universal_argument bindings */ -
parse.y
diff -Naur bash-4.2.orig/parse.y bash-4.2/parse.y
old new 2499 2499 We do this only if it is time to do so. Notice that only here 2500 2500 is the mail alarm reset; nothing takes place in check_mail () 2501 2501 except the checking of mail. Please don't change this. */ 2502 if (prompt_is_ps1 && time_to_check_mail ())2502 if (prompt_is_ps1 && parse_and_execute_level == 0 && time_to_check_mail ()) 2503 2503 { 2504 2504 check_mail (); 2505 2505 reset_mail_timer (); … … 3842 3842 int flags; 3843 3843 { 3844 3844 sh_parser_state_t ps; 3845 sh_input_line_state_t ls; 3845 3846 int orig_ind, nc, sflags; 3846 3847 char *ret, *s, *ep, *ostring; 3847 3848 … … 3849 3850 orig_ind = *indp; 3850 3851 ostring = string; 3851 3852 3853 /*itrace("xparse_dolparen: size = %d shell_input_line = `%s'", shell_input_line_size, shell_input_line);*/ 3852 3854 sflags = SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOFREE; 3853 3855 if (flags & SX_NOLONGJMP) 3854 3856 sflags |= SEVAL_NOLONGJMP; 3855 3857 save_parser_state (&ps); 3858 save_input_line_state (&ls); 3856 3859 3857 3860 /*(*/ 3858 3861 parser_state |= PST_CMDSUBST|PST_EOFTOKEN; /* allow instant ')' */ /*(*/ … … 3861 3864 3862 3865 restore_parser_state (&ps); 3863 3866 reset_parser (); 3867 /* reset_parser clears shell_input_line and associated variables */ 3868 restore_input_line_state (&ls); 3864 3869 if (interactive) 3865 3870 token_to_read = 0; 3866 3871 … … 5135 5140 case 'A': 5136 5141 /* Make the current time/date into a string. */ 5137 5142 (void) time (&the_time); 5143 #if defined (HAVE_TZSET) 5144 sv_tz ("TZ"); /* XXX -- just make sure */ 5145 #endif 5138 5146 tm = localtime (&the_time); 5139 5147 5140 5148 if (c == 'd') … … 5905 5913 ps->expand_aliases = expand_aliases; 5906 5914 ps->echo_input_at_read = echo_input_at_read; 5907 5915 5916 ps->token = token; 5917 ps->token_buffer_size = token_buffer_size; 5918 /* Force reallocation on next call to read_token_word */ 5919 token = 0; 5920 token_buffer_size = 0; 5921 5908 5922 return (ps); 5909 5923 } 5910 5924 … … 5946 5960 5947 5961 expand_aliases = ps->expand_aliases; 5948 5962 echo_input_at_read = ps->echo_input_at_read; 5963 5964 FREE (token); 5965 token = ps->token; 5966 token_buffer_size = ps->token_buffer_size; 5967 } 5968 5969 sh_input_line_state_t * 5970 save_input_line_state (ls) 5971 sh_input_line_state_t *ls; 5972 { 5973 if (ls == 0) 5974 ls = (sh_input_line_state_t *)xmalloc (sizeof (sh_input_line_state_t)); 5975 if (ls == 0) 5976 return ((sh_input_line_state_t *)NULL); 5977 5978 ls->input_line = shell_input_line; 5979 ls->input_line_size = shell_input_line_size; 5980 ls->input_line_len = shell_input_line_len; 5981 ls->input_line_index = shell_input_line_index; 5982 5983 /* force reallocation */ 5984 shell_input_line = 0; 5985 shell_input_line_size = shell_input_line_len = shell_input_line_index = 0; 5986 } 5987 5988 void 5989 restore_input_line_state (ls) 5990 sh_input_line_state_t *ls; 5991 { 5992 FREE (shell_input_line); 5993 shell_input_line = ls->input_line; 5994 shell_input_line_size = ls->input_line_size; 5995 shell_input_line_len = ls->input_line_len; 5996 shell_input_line_index = ls->input_line_index; 5997 5998 set_line_mbstate (); 5949 5999 } 5950 6000 5951 6001 /************************************************ -
patchlevel.h
diff -Naur bash-4.2.orig/patchlevel.h bash-4.2/patchlevel.h
old new 25 25 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh 26 26 looks for to find the patch level (for the sccs version string). */ 27 27 28 #define PATCHLEVEL 028 #define PATCHLEVEL 20 29 29 30 30 #endif /* _PATCHLEVEL_H_ */ -
pathexp.c
diff -Naur bash-4.2.orig/pathexp.c bash-4.2/pathexp.c
old new 196 196 { 197 197 if ((qflags & QGLOB_FILENAME) && pathname[i+1] == '/') 198 198 continue; 199 if ( (qflags & QGLOB_REGEXP) && ere_char (pathname[i+1]) == 0)199 if (pathname[i+1] != CTLESC && (qflags & QGLOB_REGEXP) && ere_char (pathname[i+1]) == 0) 200 200 continue; 201 201 temp[j++] = '\\'; 202 202 i++; -
print_cmd.c
diff -Naur bash-4.2.orig/print_cmd.c bash-4.2/print_cmd.c
old new 315 315 cprintf ("( "); 316 316 skip_this_indent++; 317 317 make_command_string_internal (command->value.Subshell->command); 318 PRINT_DEFERRED_HEREDOCS (""); 318 319 cprintf (" )"); 319 320 break; 320 321 … … 592 593 newline ("do\n"); 593 594 indentation += indentation_amount; 594 595 make_command_string_internal (arith_for_command->action); 596 PRINT_DEFERRED_HEREDOCS (""); 595 597 semicolon (); 596 598 indentation -= indentation_amount; 597 599 newline ("done"); … … 653 655 } 654 656 655 657 make_command_string_internal (group_command->command); 658 PRINT_DEFERRED_HEREDOCS (""); 656 659 657 660 if (inside_function_def) 658 661 { -
shell.h
diff -Naur bash-4.2.orig/shell.h bash-4.2/shell.h
old new 136 136 int parser_state; 137 137 int *token_state; 138 138 139 char *token; 140 int token_buffer_size; 141 139 142 /* input line state -- line number saved elsewhere */ 140 143 int input_line_terminator; 141 144 int eof_encountered; … … 166 169 167 170 } sh_parser_state_t; 168 171 172 typedef struct _sh_input_line_state_t { 173 char *input_line; 174 int input_line_index; 175 int input_line_size; 176 int input_line_len; 177 } sh_input_line_state_t; 178 169 179 /* Let's try declaring these here. */ 170 180 extern sh_parser_state_t *save_parser_state __P((sh_parser_state_t *)); 171 181 extern void restore_parser_state __P((sh_parser_state_t *)); 182 183 extern sh_input_line_state_t *save_input_line_state __P((sh_input_line_state_t *)); 184 extern void restore_input_line_state __P((sh_input_line_state_t *)); -
bash-4.2
diff -Naur bash-4.2.orig/sig.c bash-4.2/sig.c
old new 46 46 47 47 #if defined (READLINE) 48 48 # include "bashline.h" 49 # include <readline/readline.h> 49 50 #endif 50 51 51 52 #if defined (HISTORY) … … 62 63 #if defined (HISTORY) 63 64 extern int history_lines_this_session; 64 65 #endif 66 extern int no_line_editing; 65 67 66 68 extern void initialize_siglist (); 67 69 … … 505 507 { 506 508 #if defined (HISTORY) 507 509 /* XXX - will inhibit history file being written */ 508 history_lines_this_session = 0; 510 # if defined (READLINE) 511 if (interactive_shell == 0 || interactive == 0 || (sig != SIGHUP && sig != SIGTERM) || no_line_editing || (RL_ISSTATE (RL_STATE_READCMD) == 0)) 512 # endif 513 history_lines_this_session = 0; 509 514 #endif 510 515 terminate_immediately = 0; 511 516 termsig_handler (sig); -
subst.c
diff -Naur bash-4.2.orig/subst.c bash-4.2/subst.c
old new 1379 1379 slen = strlen (string + *sindex) + *sindex; 1380 1380 1381 1381 /* The handling of dolbrace_state needs to agree with the code in parse.y: 1382 parse_matched_pair() */ 1383 dolbrace_state = 0; 1384 if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) 1385 dolbrace_state = (flags & SX_POSIXEXP) ? DOLBRACE_QUOTE : DOLBRACE_PARAM; 1382 parse_matched_pair(). The different initial value is to handle the 1383 case where this function is called to parse the word in 1384 ${param op word} (SX_WORD). */ 1385 dolbrace_state = (flags & SX_WORD) ? DOLBRACE_WORD : DOLBRACE_PARAM; 1386 if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && (flags & SX_POSIXEXP)) 1387 dolbrace_state = DOLBRACE_QUOTE; 1386 1388 1387 1389 i = *sindex; 1388 1390 while (c = string[i]) … … 3371 3373 if (string == 0 || *string == '\0') 3372 3374 return (WORD_LIST *)NULL; 3373 3375 3374 td.flags = 0;3376 td.flags = W_NOSPLIT2; /* no splitting, remove "" and '' */ 3375 3377 td.word = string; 3376 3378 tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, has_dollar_at); 3377 3379 return (tresult); … … 3704 3706 break; 3705 3707 } 3706 3708 else if (string[i] == CTLNUL) 3707 i++; 3709 { 3710 i++; 3711 continue; 3712 } 3708 3713 3709 3714 prev_i = i; 3710 3715 ADVANCE_CHAR (string, slen, i); … … 4607 4612 if (ifs_firstc == 0) 4608 4613 #endif 4609 4614 word->flags |= W_NOSPLIT; 4615 word->flags |= W_NOSPLIT2; 4610 4616 result = call_expand_word_internal (word, quoted, 0, (int *)NULL, (int *)NULL); 4611 4617 expand_no_split_dollar_star = 0; 4612 4618 … … 7176 7182 { 7177 7183 /* Extract the contents of the ${ ... } expansion 7178 7184 according to the Posix.2 rules. */ 7179 value = extract_dollar_brace_string (string, &sindex, quoted, (c == '%' || c == '#' ) ? SX_POSIXEXP : 0);7185 value = extract_dollar_brace_string (string, &sindex, quoted, (c == '%' || c == '#' || c =='/' || c == '^' || c == ',' || c ==':') ? SX_POSIXEXP|SX_WORD : SX_WORD); 7180 7186 if (string[sindex] == RBRACE) 7181 7187 sindex++; 7182 7188 else -
subst.h
diff -Naur bash-4.2.orig/subst.h bash-4.2/subst.h
old new 56 56 #define SX_NOLONGJMP 0x0040 /* don't longjmp on fatal error */ 57 57 #define SX_ARITHSUB 0x0080 /* extracting $(( ... )) (currently unused) */ 58 58 #define SX_POSIXEXP 0x0100 /* extracting new Posix pattern removal expansions in extract_dollar_brace_string */ 59 #define SX_WORD 0x0200 /* extracting word in ${param op word} */ 59 60 60 61 /* Remove backslashes which are quoting backquotes from STRING. Modifies 61 62 STRING, and returns a pointer to it. */ -
support/shobj-conf
diff -Naur bash-4.2.orig/support/shobj-conf bash-4.2/support/shobj-conf
old new 157 157 ;; 158 158 159 159 # Darwin/MacOS X 160 darwin[89]*|darwin1 0*)160 darwin[89]*|darwin1[012]*) 161 161 SHOBJ_STATUS=supported 162 162 SHLIB_STATUS=supported 163 163 … … 186 186 SHLIB_LIBSUFF='dylib' 187 187 188 188 case "${host_os}" in 189 darwin[789]*|darwin1 0*) SHOBJ_LDFLAGS=''189 darwin[789]*|darwin1[012]*) SHOBJ_LDFLAGS='' 190 190 SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' 191 191 ;; 192 192 *) SHOBJ_LDFLAGS='-dynamic' -
variables.c
diff -Naur bash-4.2.orig/variables.c bash-4.2/variables.c
old new 3653 3653 return n; 3654 3654 } 3655 3655 3656 int 3657 chkexport (name) 3658 char *name; 3659 { 3660 SHELL_VAR *v; 3661 3662 v = find_variable (name); 3663 if (v && exported_p (v)) 3664 { 3665 array_needs_making = 1; 3666 maybe_make_export_env (); 3667 return 1; 3668 } 3669 return 0; 3670 } 3671 3656 3672 void 3657 3673 maybe_make_export_env () 3658 3674 { … … 4214 4230 { "TEXTDOMAIN", sv_locale }, 4215 4231 { "TEXTDOMAINDIR", sv_locale }, 4216 4232 4217 #if defined (HAVE_TZSET) && defined (PROMPT_STRING_DECODE)4233 #if defined (HAVE_TZSET) 4218 4234 { "TZ", sv_tz }, 4219 4235 #endif 4220 4236 … … 4558 4574 } 4559 4575 #endif /* HISTORY */ 4560 4576 4561 #if defined (HAVE_TZSET) && defined (PROMPT_STRING_DECODE)4577 #if defined (HAVE_TZSET) 4562 4578 void 4563 4579 sv_tz (name) 4564 4580 char *name; 4565 4581 { 4566 tzset (); 4582 if (chkexport (name)) 4583 tzset (); 4567 4584 } 4568 4585 #endif 4569 4586 -
variables.h
diff -Naur bash-4.2.orig/variables.h bash-4.2/variables.h
old new 313 313 314 314 extern void sort_variables __P((SHELL_VAR **)); 315 315 316 extern int chkexport __P((char *)); 316 317 extern void maybe_make_export_env __P((void)); 317 318 extern void update_export_env_inplace __P((char *, int, char *)); 318 319 extern void put_command_name_into_env __P((char *));
Note:
See TracBrowser
for help on using the repository browser.