#! /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
        ;;
    -unpatch)
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
        ;;
    *)
        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
--- gcc/config/gnu.h.old   2004-06-11 13:13:48.350311485 -0400
+++ gcc/config/gnu.h       2004-06-11 13:14:14.784350872 -0400
@@ -8,10 +8,6 @@
 #undef LIB_SPEC
 #define LIB_SPEC "%{bsd:-lbsd-compat} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"

-/* Standard include directory.  In GNU, "/usr" is a four-letter word.  */
-#undef STANDARD_INCLUDE_DIR
-#define STANDARD_INCLUDE_DIR "/include"
-
 /* Implicit library calls should use memcpy, not bcopy, etc.  */
 #undef TARGET_MEM_FUNCTIONS
 #define TARGET_MEM_FUNCTIONS



