#! /bin/sh -e if [ $# -eq 3 -a "$2" = '-d' ]; then pdir="-d $3" elif [ $# -ne 1 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 fi case "$1" in -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; *) echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 esac exit 0 # DP: Build fixes for minimal bash --- bash/parse.y~ 2009-11-02 23:34:15.000000000 +0100 +++ bash/parse.y 2009-12-30 17:08:12.341085169 +0100 @@ -2772,12 +2772,14 @@ dstack.delimiter_depth = 0; /* No delimiters found so far. */ open_brace_count = 0; +#if defined (EXTENDED_GLOB) /* Reset to global value of extended glob */ if (parser_state & PST_EXTPAT) { /*itrace("reset_parser: parser_state includes PST_EXTPAT");*/ extended_glob = global_extglob; } +#endif parser_state = 0; --- bash/execute_cmd.c~ 2009-11-29 03:29:34.000000000 +0100 +++ bash/execute_cmd.c 2009-12-30 17:13:36.041085541 +0100 @@ -4196,7 +4196,9 @@ if (variable_context == 0 || this_shell_function == 0) { make_funcname_visible (0); +#if defined (PROCESS_SUBSTITUTION) unlink_fifo_list (); +#endif } return (result); --- bash/lib/glob/glob.c~ 2009-11-15 00:39:30.000000000 +0100 +++ bash/lib/glob/glob.c 2009-12-30 17:34:56.802336552 +0100 @@ -640,7 +640,11 @@ continue; } +#ifdef MACOS convfn = fnx_fromfs (dp->d_name, D_NAMLEN (dp)); +#else + convfn = dp->d_name; +#endif if (strmatch (pat, convfn, mflags) != FNM_NOMATCH) { if (nalloca < ALLOCA_MAX)