You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
2.0 KiB
61 lines
2.0 KiB
18 years ago
|
#!/bin/sh -e
|
||
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||
|
#
|
||
|
# Filename: package/.../uclibc/pkg_patch/binutils-300-006_better_file_error.patch
|
||
|
# Copyright (C) 2006 The OpenSDE Project
|
||
|
# Copyright (C) 2004 - 2006 The T2 SDE Project
|
||
|
#
|
||
|
# More information can be found in the files COPYING and README.
|
||
|
#
|
||
|
# This patch file is dual-licensed. It is available under the license the
|
||
|
# patched project is licensed under, as long as it is an OpenSource license
|
||
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
||
|
# of the GNU General Public License as published by the Free Software
|
||
|
# Foundation; either version 2 of the License, or (at your option) any later
|
||
|
# version.
|
||
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
||
|
|
||
|
## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
|
||
|
##
|
||
|
## All lines beginning with `## DP:' are a description of the patch.
|
||
|
## DP: Specify which filename is causing an error if the filename is a
|
||
|
## DP: directory. (#45832)
|
||
|
|
||
|
if [ $# -ne 1 ]; then
|
||
|
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
|
||
|
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
|
||
|
|
||
|
case "$1" in
|
||
|
-patch) patch $patch_opts -p1 < $0;;
|
||
|
-unpatch) patch $patch_opts -p1 -R < $0;;
|
||
|
*)
|
||
|
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||
|
exit 1;;
|
||
|
esac
|
||
|
|
||
|
exit 0
|
||
|
|
||
|
@DPATCH@
|
||
|
diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
|
||
|
--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
|
||
|
+++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
|
||
|
@@ -150,6 +150,13 @@
|
||
|
{
|
||
|
bfd *nbfd;
|
||
|
const bfd_target *target_vec;
|
||
|
+ struct stat s;
|
||
|
+
|
||
|
+ if (stat (filename, &s) == 0)
|
||
|
+ if (S_ISDIR(s.st_mode)) {
|
||
|
+ bfd_set_error (bfd_error_file_not_recognized);
|
||
|
+ return NULL;
|
||
|
+ }
|
||
|
|
||
|
nbfd = _bfd_new_bfd ();
|
||
|
if (nbfd == NULL)
|