#! /bin/sh -e

dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
    pdir="-d $3"
    dir="$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 -p0 < $0
        #cd ${dir}gcc && autoconf
        ;;
    -unpatch)
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
        #rm ${dir}gcc/configure
        ;;
    *)
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
        exit 1
esac
exit 0

# DP: Traditional GNU systems don't have a /usr directory.  However, Debian
# DP: systems do, and we support both having a /usr -> . symlink, and having a
# DP: /usr directory like the other ports.  So this patch should NOT go
# DP: upstream.

--- gcc/config/t-gnu.old        2003-04-27 15:01:15.000000000 -0400
+++ gcc/config/t-gnu    2003-04-27 15:01:48.000000000 -0400
@@ -1,2 +1,3 @@
 # In GNU, "/usr" is a four-letter word.
-NATIVE_SYSTEM_HEADER_DIR = /include
+# Overridden for Debian GNU/Hurd (hurd-i386)
+NATIVE_SYSTEM_HEADER_DIR = /usr/include





