]> git.pld-linux.org Git - packages/glibc.git/blob - glibc-posix-sh.patch
This commit was manufactured by cvs2git to create branch 'AC-branch'.
[packages/glibc.git] / glibc-posix-sh.patch
1 --- glibc-2.3.6/elf/ldd.bash.in 2005-02-16 12:29:34.000000000 +0200
2 +++ glibc-2.3.6/elf/ldd.bash.in 2009-08-18 14:30:10.000000000 +0300
3 @@ -1,4 +1,4 @@
4 -#! @BASH@
5 +#! /bin/sh
6  # Copyright (C) 1996-2004, 2005 Free Software Foundation, Inc.
7  # This file is part of the GNU C Library.
8  
9 @@ -36,24 +36,26 @@
10    case "$1" in
11    --vers | --versi | --versio | --version)
12      echo 'ldd (GNU libc) @VERSION@'
13 -    printf $"Copyright (C) %s Free Software Foundation, Inc.
14 +    printf "Copyright (C) %s Free Software Foundation, Inc.
15  This is free software; see the source for copying conditions.  There is NO
16  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17  " "2005"
18 -    printf $"Written by %s and %s.
19 +    printf "Written by %s and %s.
20  " "Roland McGrath" "Ulrich Drepper"
21      exit 0
22      ;;
23    --h | --he | --hel | --help)
24 -    echo $"Usage: ldd [OPTION]... FILE...
25 +    echo "Usage: ldd [OPTION]... FILE...
26        --help              print this help and exit
27        --version           print version information and exit
28    -d, --data-relocs       process data relocations
29    -r, --function-relocs   process data and function relocations
30    -u, --unused            print unused direct dependencies
31    -v, --verbose           print all information
32 -For bug reporting instructions, please see:
33 -<http://www.gnu.org/software/libc/bugs.html>."
34 +"
35 +    echo "For bug reporting instructions, please see:
36 +<http://www.gnu.org/software/libc/bugs.html>.
37 +"
38      exit 0
39      ;;
40    -d | --d | --da | --dat | --data | --data- | --data-r | --data-re | \
41 @@ -77,15 +79,15 @@
42      shift
43      ;;
44    --v | --ve | --ver)
45 -    echo >&2 $"ldd: option \`$1' is ambiguous"
46 +    echo >&2 "ldd: option \`$1' is ambiguous"
47      exit 1
48      ;;
49    --)          # Stop option processing.
50      shift; break
51      ;;
52    -*)
53 -    echo >&2 'ldd:' $"unrecognized option" "\`$1'"
54 -    echo >&2 $"Try \`ldd --help' for more information."
55 +    echo >&2 'ldd:' "unrecognized option" "\`$1'"
56 +    echo >&2 "Try \`ldd --help' for more information."
57      exit 1
58      ;;
59    *)
60 @@ -110,20 +112,14 @@
61  # environments where the executed program might not have permissions
62  # to write to the console/tty.  But only bash 3.x supports the pipefail
63  # option, and we don't bother to handle the case for older bash versions.
64 -if set -o pipefail 2> /dev/null; then
65 -  try_trace() {
66 -    eval $add_env '"$@"' | cat
67 -  }
68 -else
69 -  try_trace() {
70 -    eval $add_env '"$@"'
71 -  }
72 -fi
73 +try_trace() {
74 +  eval $add_env '"$@"'
75 +}
76  
77  case $# in
78  0)
79 -  echo >&2 'ldd:' $"missing file arguments"
80 -  echo >&2 $"Try \`ldd --help' for more information."
81 +  echo >&2 'ldd:' "missing file arguments"
82 +  echo >&2 "Try \`ldd --help' for more information."
83    exit 1
84    ;;
85  1)
86 @@ -144,13 +140,17 @@
87    *) file=./$file
88       ;;
89    esac
90 -  if test ! -f "$file"; then
91 -    echo "ldd: ${file}:" $"No such file or directory" >&2
92 +  if test ! -e "$file"; then
93 +    echo "ldd: ${file}:" "No such file or directory" >&2
94 +    result=1
95 +  elif test ! -f "$file"; then
96 +    echo "ldd: ${file}:" "not regular file" >&2
97      result=1
98    elif test -r "$file"; then
99 -    test -x "$file" || echo 'ldd:' $"\
100 +    test -x "$file" || echo 'ldd:' "\
101  warning: you do not have execution permission for" "\`$file'" >&2
102      RTLD=
103 +    ret=1
104      for rtld in ${RTLDLIST}; do
105        if test -x $rtld; then
106         verify_out=`${rtld} --verify "$file"`
107 @@ -160,12 +160,6 @@
108         esac
109        fi
110      done
111 -    if test -z "${RTLD}"; then
112 -      set ${RTLDLIST}
113 -      RTLD=$1
114 -      verify_out=`${RTLD} --verify "$file"`
115 -      ret=$?
116 -    fi
117      case $ret in
118      0)
119        # If the program exits with exit code 5, it means the process has been
120 @@ -182,7 +176,7 @@
121      1)
122        # This can be a non-ELF binary or no binary at all.
123        nonelf "$file" || {
124 -       echo $" not a dynamic executable"
125 +       echo "  not a dynamic executable"
126         result=1
127        }
128        ;;
129 @@ -190,12 +184,12 @@
130        try_trace "$RTLD" "$file" || result=1
131        ;;
132      *)
133 -      echo 'ldd:' ${RTLD} $"exited with unknown exit code" "($ret)" >&2
134 +      echo 'ldd:' ${RTLD} "exited with unknown exit code" "($ret)" >&2
135        exit 1
136        ;;
137      esac
138    else
139 -    echo 'ldd:' $"error: you do not have read permission for" "\`$file'" >&2
140 +    echo 'ldd:' "error: you do not have read permission for" "\`$file'" >&2
141      result=1
142    fi
143  done
This page took 0.147017 seconds and 3 git commands to generate.