summaryrefslogtreecommitdiff
path: root/debian/patches/bash-minimal.dpatch
blob: c6b003939cf07cd9aaf5666cddf0e336f3f9048e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#! /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)