Blame SOURCES/glibc-ppc64le-03.patch

147e83
# commit 9e54314bb06aace405553552f7e7b7d8c172968c
147e83
# Author: Joseph Myers <joseph@codesourcery.com>
147e83
# Date:   Thu Jun 6 19:02:09 2013 +0000
147e83
# 
147e83
#     Update miscellaneous scripts from upstream.
147e83
# 
147e83
diff -urN glibc-2.17-c758a686/scripts/config.guess glibc-2.17-c758a686/scripts/config.guess
147e83
--- glibc-2.17-c758a686/scripts/config.guess	2014-05-26 15:59:45.000000000 -0500
147e83
+++ glibc-2.17-c758a686/scripts/config.guess	2014-05-26 16:01:00.000000000 -0500
147e83
@@ -1,14 +1,12 @@
147e83
 #! /bin/sh
147e83
 # Attempt to guess a canonical system name.
147e83
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
147e83
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
147e83
-#   2011, 2012 Free Software Foundation, Inc.
147e83
+#   Copyright 1992-2013 Free Software Foundation, Inc.
147e83
 
147e83
-timestamp='2012-09-25'
147e83
+timestamp='2013-11-29'
147e83
 
147e83
 # This file is free software; you can redistribute it and/or modify it
147e83
 # under the terms of the GNU General Public License as published by
147e83
-# the Free Software Foundation; either version 2 of the License, or
147e83
+# the Free Software Foundation; either version 3 of the License, or
147e83
 # (at your option) any later version.
147e83
 #
147e83
 # This program is distributed in the hope that it will be useful, but
147e83
@@ -22,19 +20,17 @@
147e83
 # As a special exception to the GNU General Public License, if you
147e83
 # distribute this file as part of a program that contains a
147e83
 # configuration script generated by Autoconf, you may include it under
147e83
-# the same distribution terms that you use for the rest of that program.
147e83
-
147e83
-
147e83
-# Originally written by Per Bothner.  Please send patches (context
147e83
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
147e83
-# entry.
147e83
+# the same distribution terms that you use for the rest of that
147e83
+# program.  This Exception is an additional permission under section 7
147e83
+# of the GNU General Public License, version 3 ("GPLv3").
147e83
 #
147e83
-# This script attempts to guess a canonical system name similar to
147e83
-# config.sub.  If it succeeds, it prints the system name on stdout, and
147e83
-# exits with 0.  Otherwise, it exits with 1.
147e83
+# Originally written by Per Bothner.
147e83
 #
147e83
 # You can get the latest version of this script from:
147e83
 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
147e83
+#
147e83
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
147e83
+
147e83
 
147e83
 me=`echo "$0" | sed -e 's,.*/,,'`
147e83
 
147e83
@@ -54,9 +50,7 @@
147e83
 GNU config.guess ($timestamp)
147e83
 
147e83
 Originally written by Per Bothner.
147e83
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
147e83
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
147e83
-Free Software Foundation, Inc.
147e83
+Copyright 1992-2013 Free Software Foundation, Inc.
147e83
 
147e83
 This is free software; see the source for copying conditions.  There is NO
147e83
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
147e83
@@ -138,6 +132,27 @@
147e83
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
147e83
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
147e83
 
147e83
+case "${UNAME_SYSTEM}" in
147e83
+Linux|GNU|GNU/*)
147e83
+	# If the system lacks a compiler, then just pick glibc.
147e83
+	# We could probably try harder.
147e83
+	LIBC=gnu
147e83
+
147e83
+	eval $set_cc_for_build
147e83
+	cat <<-EOF > $dummy.c
147e83
+	#include <features.h>
147e83
+	#if defined(__UCLIBC__)
147e83
+	LIBC=uclibc
147e83
+	#elif defined(__dietlibc__)
147e83
+	LIBC=dietlibc
147e83
+	#else
147e83
+	LIBC=gnu
147e83
+	#endif
147e83
+	EOF
147e83
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
147e83
+	;;
147e83
+esac
147e83
+
147e83
 # Note: order is significant - the case branches are not exclusive.
147e83
 
147e83
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
147e83
@@ -859,21 +874,21 @@
147e83
 	exit ;;
147e83
     *:GNU:*:*)
147e83
 	# the GNU system
147e83
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
147e83
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
147e83
 	exit ;;
147e83
     *:GNU/*:*:*)
147e83
 	# other systems with GNU libc and userland
147e83
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
147e83
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
147e83
 	exit ;;
147e83
     i*86:Minix:*:*)
147e83
 	echo ${UNAME_MACHINE}-pc-minix
147e83
 	exit ;;
147e83
     aarch64:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     aarch64_be:Linux:*:*)
147e83
 	UNAME_MACHINE=aarch64_be
147e83
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     alpha:Linux:*:*)
147e83
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
147e83
@@ -886,59 +901,54 @@
147e83
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
147e83
 	esac
147e83
 	objdump --private-headers /bin/sh | grep -q ld.so.1
147e83
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
147e83
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
147e83
+	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
+	exit ;;
147e83
+    arc:Linux:*:* | arceb:Linux:*:*)
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     arm*:Linux:*:*)
147e83
 	eval $set_cc_for_build
147e83
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
147e83
 	    | grep -q __ARM_EABI__
147e83
 	then
147e83
-	    echo ${UNAME_MACHINE}-unknown-linux-gnu
147e83
+	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
 	else
147e83
 	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
147e83
 		| grep -q __ARM_PCS_VFP
147e83
 	    then
147e83
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
147e83
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
147e83
 	    else
147e83
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
147e83
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
147e83
 	    fi
147e83
 	fi
147e83
 	exit ;;
147e83
     avr32*:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     cris:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-axis-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
147e83
 	exit ;;
147e83
     crisv32:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-axis-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
147e83
 	exit ;;
147e83
     frv:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     hexagon:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     i*86:Linux:*:*)
147e83
-	LIBC=gnu
147e83
-	eval $set_cc_for_build
147e83
-	sed 's/^	//' << EOF >$dummy.c
147e83
-	#ifdef __dietlibc__
147e83
-	LIBC=dietlibc
147e83
-	#endif
147e83
-EOF
147e83
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
147e83
-	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
147e83
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
147e83
 	exit ;;
147e83
     ia64:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     m32r*:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     m68*:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     mips:Linux:*:* | mips64:Linux:*:*)
147e83
 	eval $set_cc_for_build
147e83
@@ -957,54 +967,63 @@
147e83
 	#endif
147e83
 EOF
147e83
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
147e83
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
147e83
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
147e83
 	;;
147e83
+    or1k:Linux:*:*)
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
+	exit ;;
147e83
     or32:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     padre:Linux:*:*)
147e83
-	echo sparc-unknown-linux-gnu
147e83
+	echo sparc-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     parisc64:Linux:*:* | hppa64:Linux:*:*)
147e83
-	echo hppa64-unknown-linux-gnu
147e83
+	echo hppa64-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     parisc:Linux:*:* | hppa:Linux:*:*)
147e83
 	# Look for CPU level
147e83
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
147e83
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
147e83
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
147e83
-	  *)    echo hppa-unknown-linux-gnu ;;
147e83
+	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
147e83
+	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
147e83
+	  *)    echo hppa-unknown-linux-${LIBC} ;;
147e83
 	esac
147e83
 	exit ;;
147e83
     ppc64:Linux:*:*)
147e83
-	echo powerpc64-unknown-linux-gnu
147e83
+	echo powerpc64-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     ppc:Linux:*:*)
147e83
-	echo powerpc-unknown-linux-gnu
147e83
+	echo powerpc-unknown-linux-${LIBC}
147e83
+	exit ;;
147e83
+    ppc64le:Linux:*:*)
147e83
+	echo powerpc64le-unknown-linux-${LIBC}
147e83
+	exit ;;
147e83
+    ppcle:Linux:*:*)
147e83
+	echo powerpcle-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     s390:Linux:*:* | s390x:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-ibm-linux
147e83
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
147e83
 	exit ;;
147e83
     sh64*:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     sh*:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     sparc:Linux:*:* | sparc64:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     tile*:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     vax:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-dec-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
147e83
 	exit ;;
147e83
     x86_64:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     xtensa*:Linux:*:*)
147e83
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
147e83
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
147e83
 	exit ;;
147e83
     i*86:DYNIX/ptx:4*:*)
147e83
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
147e83
@@ -1237,19 +1256,31 @@
147e83
 	exit ;;
147e83
     *:Darwin:*:*)
147e83
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
147e83
-	case $UNAME_PROCESSOR in
147e83
-	    i386)
147e83
-		eval $set_cc_for_build
147e83
-		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
147e83
-		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
147e83
-		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
147e83
-		      grep IS_64BIT_ARCH >/dev/null
147e83
-		  then
147e83
-		      UNAME_PROCESSOR="x86_64"
147e83
-		  fi
147e83
-		fi ;;
147e83
-	    unknown) UNAME_PROCESSOR=powerpc ;;
147e83
-	esac
147e83
+	eval $set_cc_for_build
147e83
+	if test "$UNAME_PROCESSOR" = unknown ; then
147e83
+	    UNAME_PROCESSOR=powerpc
147e83
+	fi
147e83
+	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
147e83
+	    if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
147e83
+		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
147e83
+		    (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
147e83
+		    grep IS_64BIT_ARCH >/dev/null
147e83
+		then
147e83
+		    case $UNAME_PROCESSOR in
147e83
+			i386) UNAME_PROCESSOR=x86_64 ;;
147e83
+			powerpc) UNAME_PROCESSOR=powerpc64 ;;
147e83
+		    esac
147e83
+		fi
147e83
+	    fi
147e83
+	elif test "$UNAME_PROCESSOR" = i386 ; then
147e83
+	    # Avoid executing cc on OS X 10.9, as it ships with a stub
147e83
+	    # that puts up a graphical alert prompting to install
147e83
+	    # developer tools.  Any system running Mac OS X 10.7 or
147e83
+	    # later (Darwin 11 and later) is required to have a 64-bit
147e83
+	    # processor. This is not true of the ARM version of Darwin
147e83
+	    # that Apple uses in portable devices.
147e83
+	    UNAME_PROCESSOR=x86_64
147e83
+	fi
147e83
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
147e83
 	exit ;;
147e83
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
147e83
diff -urN glibc-2.17-c758a686/scripts/config.sub glibc-2.17-c758a686/scripts/config.sub
147e83
--- glibc-2.17-c758a686/scripts/config.sub	2014-05-26 15:59:45.000000000 -0500
147e83
+++ glibc-2.17-c758a686/scripts/config.sub	2014-05-26 16:00:52.000000000 -0500
147e83
@@ -1,24 +1,18 @@
147e83
 #! /bin/sh
147e83
 # Configuration validation subroutine script.
147e83
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
147e83
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
147e83
-#   2011, 2012 Free Software Foundation, Inc.
147e83
-
147e83
-timestamp='2012-08-18'
147e83
-
147e83
-# This file is (in principle) common to ALL GNU software.
147e83
-# The presence of a machine in this file suggests that SOME GNU software
147e83
-# can handle that machine.  It does not imply ALL GNU software can.
147e83
-#
147e83
-# This file is free software; you can redistribute it and/or modify
147e83
-# it under the terms of the GNU General Public License as published by
147e83
-# the Free Software Foundation; either version 2 of the License, or
147e83
+#   Copyright 1992-2013 Free Software Foundation, Inc.
147e83
+
147e83
+timestamp='2013-10-01'
147e83
+
147e83
+# This file is free software; you can redistribute it and/or modify it
147e83
+# under the terms of the GNU General Public License as published by
147e83
+# the Free Software Foundation; either version 3 of the License, or
147e83
 # (at your option) any later version.
147e83
 #
147e83
-# This program is distributed in the hope that it will be useful,
147e83
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
147e83
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
147e83
-# GNU General Public License for more details.
147e83
+# This program is distributed in the hope that it will be useful, but
147e83
+# WITHOUT ANY WARRANTY; without even the implied warranty of
147e83
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
147e83
+# General Public License for more details.
147e83
 #
147e83
 # You should have received a copy of the GNU General Public License
147e83
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
147e83
@@ -26,11 +20,12 @@
147e83
 # As a special exception to the GNU General Public License, if you
147e83
 # distribute this file as part of a program that contains a
147e83
 # configuration script generated by Autoconf, you may include it under
147e83
-# the same distribution terms that you use for the rest of that program.
147e83
+# the same distribution terms that you use for the rest of that
147e83
+# program.  This Exception is an additional permission under section 7
147e83
+# of the GNU General Public License, version 3 ("GPLv3").
147e83
 
147e83
 
147e83
-# Please send patches to <config-patches@gnu.org>.  Submit a context
147e83
-# diff and a properly formatted GNU ChangeLog entry.
147e83
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
147e83
 #
147e83
 # Configuration subroutine to validate and canonicalize a configuration type.
147e83
 # Supply the specified configuration type as an argument.
147e83
@@ -73,9 +68,7 @@
147e83
 version="\
147e83
 GNU config.sub ($timestamp)
147e83
 
147e83
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
147e83
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
147e83
-Free Software Foundation, Inc.
147e83
+Copyright 1992-2013 Free Software Foundation, Inc.
147e83
 
147e83
 This is free software; see the source for copying conditions.  There is NO
147e83
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
147e83
@@ -156,7 +149,7 @@
147e83
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
147e83
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
147e83
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
147e83
-	-apple | -axis | -knuth | -cray | -microblaze)
147e83
+	-apple | -axis | -knuth | -cray | -microblaze*)
147e83
 		os=
147e83
 		basic_machine=$1
147e83
 		;;
147e83
@@ -259,10 +252,12 @@
147e83
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
147e83
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
147e83
 	| am33_2.0 \
147e83
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
147e83
-        | be32 | be64 \
147e83
+	| arc | arceb \
147e83
+	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
147e83
+	| avr | avr32 \
147e83
+	| be32 | be64 \
147e83
 	| bfin \
147e83
-	| c4x | clipper \
147e83
+	| c4x | c8051 | clipper \
147e83
 	| d10v | d30v | dlx | dsp16xx \
147e83
 	| epiphany \
147e83
 	| fido | fr30 | frv \
147e83
@@ -270,10 +265,11 @@
147e83
 	| hexagon \
147e83
 	| i370 | i860 | i960 | ia64 \
147e83
 	| ip2k | iq2000 \
147e83
+	| k1om \
147e83
 	| le32 | le64 \
147e83
 	| lm32 \
147e83
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
147e83
-	| maxq | mb | microblaze | mcore | mep | metag \
147e83
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
147e83
 	| mips | mipsbe | mipseb | mipsel | mipsle \
147e83
 	| mips16 \
147e83
 	| mips64 | mips64el \
147e83
@@ -291,16 +287,17 @@
147e83
 	| mipsisa64r2 | mipsisa64r2el \
147e83
 	| mipsisa64sb1 | mipsisa64sb1el \
147e83
 	| mipsisa64sr71k | mipsisa64sr71kel \
147e83
+	| mipsr5900 | mipsr5900el \
147e83
 	| mipstx39 | mipstx39el \
147e83
 	| mn10200 | mn10300 \
147e83
 	| moxie \
147e83
 	| mt \
147e83
 	| msp430 \
147e83
 	| nds32 | nds32le | nds32be \
147e83
-	| nios | nios2 \
147e83
+	| nios | nios2 | nios2eb | nios2el \
147e83
 	| ns16k | ns32k \
147e83
 	| open8 \
147e83
-	| or32 \
147e83
+	| or1k | or32 \
147e83
 	| pdp10 | pdp11 | pj | pjl \
147e83
 	| powerpc | powerpc64 | powerpc64le | powerpcle \
147e83
 	| pyramid \
147e83
@@ -328,7 +325,7 @@
147e83
 	c6x)
147e83
 		basic_machine=tic6x-unknown
147e83
 		;;
147e83
-	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
147e83
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
147e83
 		basic_machine=$basic_machine-unknown
147e83
 		os=-none
147e83
 		;;
147e83
@@ -370,13 +367,13 @@
147e83
 	| aarch64-* | aarch64_be-* \
147e83
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
147e83
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
147e83
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
147e83
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
147e83
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
147e83
 	| avr-* | avr32-* \
147e83
 	| be32-* | be64-* \
147e83
 	| bfin-* | bs2000-* \
147e83
 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
147e83
-	| clipper-* | craynv-* | cydra-* \
147e83
+	| c8051-* | clipper-* | craynv-* | cydra-* \
147e83
 	| d10v-* | d30v-* | dlx-* \
147e83
 	| elxsi-* \
147e83
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
147e83
@@ -385,11 +382,13 @@
147e83
 	| hexagon-* \
147e83
 	| i*86-* | i860-* | i960-* | ia64-* \
147e83
 	| ip2k-* | iq2000-* \
147e83
+	| k1om-* \
147e83
 	| le32-* | le64-* \
147e83
 	| lm32-* \
147e83
 	| m32c-* | m32r-* | m32rle-* \
147e83
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
147e83
-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
147e83
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
147e83
+	| microblaze-* | microblazeel-* \
147e83
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
147e83
 	| mips16-* \
147e83
 	| mips64-* | mips64el-* \
147e83
@@ -407,12 +406,13 @@
147e83
 	| mipsisa64r2-* | mipsisa64r2el-* \
147e83
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
147e83
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
147e83
+	| mipsr5900-* | mipsr5900el-* \
147e83
 	| mipstx39-* | mipstx39el-* \
147e83
 	| mmix-* \
147e83
 	| mt-* \
147e83
 	| msp430-* \
147e83
 	| nds32-* | nds32le-* | nds32be-* \
147e83
-	| nios-* | nios2-* \
147e83
+	| nios-* | nios2-* | nios2eb-* | nios2el-* \
147e83
 	| none-* | np1-* | ns16k-* | ns32k-* \
147e83
 	| open8-* \
147e83
 	| orion-* \
147e83
@@ -788,7 +788,7 @@
147e83
 		basic_machine=ns32k-utek
147e83
 		os=-sysv
147e83
 		;;
147e83
-	microblaze)
147e83
+	microblaze*)
147e83
 		basic_machine=microblaze-xilinx
147e83
 		;;
147e83
 	mingw64)
147e83
@@ -796,7 +796,7 @@
147e83
 		os=-mingw64
147e83
 		;;
147e83
 	mingw32)
147e83
-		basic_machine=i386-pc
147e83
+		basic_machine=i686-pc
147e83
 		os=-mingw32
147e83
 		;;
147e83
 	mingw32ce)
147e83
@@ -832,7 +832,7 @@
147e83
 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
147e83
 		;;
147e83
 	msys)
147e83
-		basic_machine=i386-pc
147e83
+		basic_machine=i686-pc
147e83
 		os=-msys
147e83
 		;;
147e83
 	mvs)
147e83
@@ -1023,7 +1023,11 @@
147e83
 		basic_machine=i586-unknown
147e83
 		os=-pw32
147e83
 		;;
147e83
-	rdos)
147e83
+	rdos | rdos64)
147e83
+		basic_machine=x86_64-pc
147e83
+		os=-rdos
147e83
+		;;
147e83
+	rdos32)
147e83
 		basic_machine=i386-pc
147e83
 		os=-rdos
147e83
 		;;
147e83
@@ -1350,7 +1354,7 @@
147e83
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
147e83
 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
147e83
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
147e83
-	      | -sym* | -kopensolaris* \
147e83
+	      | -sym* | -kopensolaris* | -plan9* \
147e83
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
147e83
 	      | -aos* | -aros* \
147e83
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
147e83
@@ -1496,9 +1500,6 @@
147e83
 	-aros*)
147e83
 		os=-aros
147e83
 		;;
147e83
-	-kaos*)
147e83
-		os=-kaos
147e83
-		;;
147e83
 	-zvmoe)
147e83
 		os=-zvmoe
147e83
 		;;
147e83
@@ -1547,6 +1548,9 @@
147e83
 	c4x-* | tic4x-*)
147e83
 		os=-coff
147e83
 		;;
147e83
+	c8051-*)
147e83
+		os=-elf
147e83
+		;;
147e83
 	hexagon-*)
147e83
 		os=-elf
147e83
 		;;
147e83
@@ -1590,6 +1594,9 @@
147e83
 	mips*-*)
147e83
 		os=-elf
147e83
 		;;
147e83
+	or1k-*)
147e83
+		os=-elf
147e83
+		;;
147e83
 	or32-*)
147e83
 		os=-coff
147e83
 		;;
147e83
diff -urN glibc-2.17-c758a686/scripts/install-sh glibc-2.17-c758a686/scripts/install-sh
147e83
--- glibc-2.17-c758a686/scripts/install-sh	2014-05-26 15:59:45.000000000 -0500
147e83
+++ glibc-2.17-c758a686/scripts/install-sh	2014-05-26 16:00:34.000000000 -0500
147e83
@@ -1,250 +1,527 @@
147e83
-#! /bin/sh
147e83
-#
147e83
+#!/bin/sh
147e83
 # install - install a program, script, or datafile
147e83
-# This comes from X11R5 (mit/util/scripts/install.sh).
147e83
+
147e83
+scriptversion=2011-11-20.07; # UTC
147e83
+
147e83
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
147e83
+# later released in X11R6 (xc/config/util/install.sh) with the
147e83
+# following copyright and license.
147e83
+#
147e83
+# Copyright (C) 1994 X Consortium
147e83
+#
147e83
+# Permission is hereby granted, free of charge, to any person obtaining a copy
147e83
+# of this software and associated documentation files (the "Software"), to
147e83
+# deal in the Software without restriction, including without limitation the
147e83
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
147e83
+# sell copies of the Software, and to permit persons to whom the Software is
147e83
+# furnished to do so, subject to the following conditions:
147e83
+#
147e83
+# The above copyright notice and this permission notice shall be included in
147e83
+# all copies or substantial portions of the Software.
147e83
+#
147e83
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
147e83
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
147e83
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
147e83
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
147e83
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
147e83
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
147e83
+#
147e83
+# Except as contained in this notice, the name of the X Consortium shall not
147e83
+# be used in advertising or otherwise to promote the sale, use or other deal-
147e83
+# ings in this Software without prior written authorization from the X Consor-
147e83
+# tium.
147e83
 #
147e83
-# Copyright 1991 by the Massachusetts Institute of Technology
147e83
 #
147e83
-# Permission to use, copy, modify, distribute, and sell this software and its
147e83
-# documentation for any purpose is hereby granted without fee, provided that
147e83
-# the above copyright notice appear in all copies and that both that
147e83
-# copyright notice and this permission notice appear in supporting
147e83
-# documentation, and that the name of M.I.T. not be used in advertising or
147e83
-# publicity pertaining to distribution of the software without specific,
147e83
-# written prior permission.  M.I.T. makes no representations about the
147e83
-# suitability of this software for any purpose.  It is provided "as is"
147e83
-# without express or implied warranty.
147e83
+# FSF changes to this file are in the public domain.
147e83
 #
147e83
 # Calling this script install-sh is preferred over install.sh, to prevent
147e83
-# `make' implicit rules from creating a file called install from it
147e83
+# 'make' implicit rules from creating a file called install from it
147e83
 # when there is no Makefile.
147e83
 #
147e83
 # This script is compatible with the BSD install script, but was written
147e83
-# from scratch.  It can only install one file at a time, a restriction
147e83
-# shared with many OS's install programs.
147e83
+# from scratch.
147e83
 
147e83
+nl='
147e83
+'
147e83
+IFS=" ""	$nl"
147e83
 
147e83
 # set DOITPROG to echo to test this script
147e83
 
147e83
 # Don't use :- since 4.3BSD and earlier shells don't like it.
147e83
-doit="${DOITPROG-}"
147e83
-
147e83
-
147e83
-# put in absolute paths if you don't have them in your path; or use env. vars.
147e83
-
147e83
-mvprog="${MVPROG-mv}"
147e83
-cpprog="${CPPROG-cp}"
147e83
-chmodprog="${CHMODPROG-chmod}"
147e83
-chownprog="${CHOWNPROG-chown}"
147e83
-chgrpprog="${CHGRPPROG-chgrp}"
147e83
-stripprog="${STRIPPROG-strip}"
147e83
-rmprog="${RMPROG-rm}"
147e83
-mkdirprog="${MKDIRPROG-mkdir}"
147e83
-
147e83
-transformbasename=""
147e83
-transform_arg=""
147e83
-instcmd="$mvprog"
147e83
-chmodcmd="$chmodprog 0755"
147e83
-chowncmd=""
147e83
-chgrpcmd=""
147e83
-stripcmd=""
147e83
-rmcmd="$rmprog -f"
147e83
-mvcmd="$mvprog"
147e83
-src=""
147e83
-dst=""
147e83
-dir_arg=""
147e83
-
147e83
-while [ x"$1" != x ]; do
147e83
-    case $1 in
147e83
-	-c) instcmd="$cpprog"
147e83
-	    shift
147e83
-	    continue;;
147e83
-
147e83
-	-d) dir_arg=true
147e83
-	    shift
147e83
-	    continue;;
147e83
-
147e83
-	-m) chmodcmd="$chmodprog $2"
147e83
-	    shift
147e83
-	    shift
147e83
-	    continue;;
147e83
-
147e83
-	-o) chowncmd="$chownprog $2"
147e83
-	    shift
147e83
-	    shift
147e83
-	    continue;;
147e83
-
147e83
-	-g) chgrpcmd="$chgrpprog $2"
147e83
-	    shift
147e83
-	    shift
147e83
-	    continue;;
147e83
-
147e83
-	-s) stripcmd="$stripprog"
147e83
-	    shift
147e83
-	    continue;;
147e83
-
147e83
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
147e83
-	    shift
147e83
-	    continue;;
147e83
-
147e83
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
147e83
-	    shift
147e83
-	    continue;;
147e83
-
147e83
-	*)  if [ x"$src" = x ]
147e83
-	    then
147e83
-		src=$1
147e83
-	    else
147e83
-		# this colon is to work around a 386BSD /bin/sh bug
147e83
-		:
147e83
-		dst=$1
147e83
-	    fi
147e83
-	    shift
147e83
-	    continue;;
147e83
-    esac
147e83
-done
147e83
-
147e83
-if [ x"$src" = x ]
147e83
-then
147e83
-	echo "install:	no input file specified"
147e83
-	exit 1
147e83
+doit=${DOITPROG-}
147e83
+if test -z "$doit"; then
147e83
+  doit_exec=exec
147e83
 else
147e83
-	true
147e83
+  doit_exec=$doit
147e83
 fi
147e83
 
147e83
-if [ x"$dir_arg" != x ]; then
147e83
-	dst=$src
147e83
-	src=""
147e83
-	
147e83
-	if [ -d $dst ]; then
147e83
-		instcmd=:
147e83
-	else
147e83
-		instcmd=mkdir
147e83
-	fi
147e83
-else
147e83
+# Put in absolute file names if you don't have them in your path;
147e83
+# or use environment vars.
147e83
 
147e83
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
147e83
-# might cause directories to be created, which would be especially bad 
147e83
-# if $src (and thus $dsttmp) contains '*'.
147e83
-
147e83
-	if [ -f $src -o -d $src ]
147e83
-	then
147e83
-		true
147e83
-	else
147e83
-		echo "install:  $src does not exist"
147e83
-		exit 1
147e83
-	fi
147e83
-	
147e83
-	if [ x"$dst" = x ]
147e83
-	then
147e83
-		echo "install:	no destination specified"
147e83
-		exit 1
147e83
-	else
147e83
-		true
147e83
-	fi
147e83
-
147e83
-# If destination is a directory, append the input filename; if your system
147e83
-# does not like double slashes in filenames, you may need to add some logic
147e83
-
147e83
-	if [ -d $dst ]
147e83
-	then
147e83
-		dst="$dst"/`basename $src`
147e83
-	else
147e83
-		true
147e83
-	fi
147e83
-fi
147e83
-
147e83
-## this sed command emulates the dirname command
147e83
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
147e83
+chgrpprog=${CHGRPPROG-chgrp}
147e83
+chmodprog=${CHMODPROG-chmod}
147e83
+chownprog=${CHOWNPROG-chown}
147e83
+cmpprog=${CMPPROG-cmp}
147e83
+cpprog=${CPPROG-cp}
147e83
+mkdirprog=${MKDIRPROG-mkdir}
147e83
+mvprog=${MVPROG-mv}
147e83
+rmprog=${RMPROG-rm}
147e83
+stripprog=${STRIPPROG-strip}
147e83
+
147e83
+posix_glob='?'
147e83
+initialize_posix_glob='
147e83
+  test "$posix_glob" != "?" || {
147e83
+    if (set -f) 2>/dev/null; then
147e83
+      posix_glob=
147e83
+    else
147e83
+      posix_glob=:
147e83
+    fi
147e83
+  }
147e83
+'
147e83
 
147e83
-# Make sure that the destination directory exists.
147e83
-#  this part is taken from Noah Friedman's mkinstalldirs script
147e83
+posix_mkdir=
147e83
 
147e83
-# Skip lots of stat calls in the usual case.
147e83
-if [ ! -d "$dstdir" ]; then
147e83
-defaultIFS='	
147e83
-'
147e83
-IFS="${IFS-${defaultIFS}}"
147e83
+# Desired mode of installed file.
147e83
+mode=0755
147e83
 
147e83
-oIFS="${IFS}"
147e83
-# Some sh's can't handle IFS=/ for some reason.
147e83
-IFS='%'
147e83
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
147e83
-IFS="${oIFS}"
147e83
-
147e83
-pathcomp=''
147e83
-
147e83
-while [ $# -ne 0 ] ; do
147e83
-	pathcomp="${pathcomp}${1}"
147e83
-	shift
147e83
-
147e83
-	if [ ! -d "${pathcomp}" ] ;
147e83
-        then
147e83
-		$mkdirprog "${pathcomp}"
147e83
-	else
147e83
-		true
147e83
-	fi
147e83
+chgrpcmd=
147e83
+chmodcmd=$chmodprog
147e83
+chowncmd=
147e83
+mvcmd=$mvprog
147e83
+rmcmd="$rmprog -f"
147e83
+stripcmd=
147e83
 
147e83
-	pathcomp="${pathcomp}/"
147e83
+src=
147e83
+dst=
147e83
+dir_arg=
147e83
+dst_arg=
147e83
+
147e83
+copy_on_change=false
147e83
+no_target_directory=
147e83
+
147e83
+usage="\
147e83
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
147e83
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
147e83
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
147e83
+   or: $0 [OPTION]... -d DIRECTORIES...
147e83
+
147e83
+In the 1st form, copy SRCFILE to DSTFILE.
147e83
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
147e83
+In the 4th, create DIRECTORIES.
147e83
+
147e83
+Options:
147e83
+     --help     display this help and exit.
147e83
+     --version  display version info and exit.
147e83
+
147e83
+  -c            (ignored)
147e83
+  -C            install only if different (preserve the last data modification time)
147e83
+  -d            create directories instead of installing files.
147e83
+  -g GROUP      $chgrpprog installed files to GROUP.
147e83
+  -m MODE       $chmodprog installed files to MODE.
147e83
+  -o USER       $chownprog installed files to USER.
147e83
+  -s            $stripprog installed files.
147e83
+  -t DIRECTORY  install into DIRECTORY.
147e83
+  -T            report an error if DSTFILE is a directory.
147e83
+
147e83
+Environment variables override the default commands:
147e83
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
147e83
+  RMPROG STRIPPROG
147e83
+"
147e83
+
147e83
+while test $# -ne 0; do
147e83
+  case $1 in
147e83
+    -c) ;;
147e83
+
147e83
+    -C) copy_on_change=true;;
147e83
+
147e83
+    -d) dir_arg=true;;
147e83
+
147e83
+    -g) chgrpcmd="$chgrpprog $2"
147e83
+	shift;;
147e83
+
147e83
+    --help) echo "$usage"; exit $?;;
147e83
+
147e83
+    -m) mode=$2
147e83
+	case $mode in
147e83
+	  *' '* | *'	'* | *'
147e83
+'*	  | *'*'* | *'?'* | *'['*)
147e83
+	    echo "$0: invalid mode: $mode" >&2
147e83
+	    exit 1;;
147e83
+	esac
147e83
+	shift;;
147e83
+
147e83
+    -o) chowncmd="$chownprog $2"
147e83
+	shift;;
147e83
+
147e83
+    -s) stripcmd=$stripprog;;
147e83
+
147e83
+    -t) dst_arg=$2
147e83
+	# Protect names problematic for 'test' and other utilities.
147e83
+	case $dst_arg in
147e83
+	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
147e83
+	esac
147e83
+	shift;;
147e83
+
147e83
+    -T) no_target_directory=true;;
147e83
+
147e83
+    --version) echo "$0 $scriptversion"; exit $?;;
147e83
+
147e83
+    --)	shift
147e83
+	break;;
147e83
+
147e83
+    -*)	echo "$0: invalid option: $1" >&2
147e83
+	exit 1;;
147e83
+
147e83
+    *)  break;;
147e83
+  esac
147e83
+  shift
147e83
 done
147e83
+
147e83
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
147e83
+  # When -d is used, all remaining arguments are directories to create.
147e83
+  # When -t is used, the destination is already specified.
147e83
+  # Otherwise, the last argument is the destination.  Remove it from $@.
147e83
+  for arg
147e83
+  do
147e83
+    if test -n "$dst_arg"; then
147e83
+      # $@ is not empty: it contains at least $arg.
147e83
+      set fnord "$@" "$dst_arg"
147e83
+      shift # fnord
147e83
+    fi
147e83
+    shift # arg
147e83
+    dst_arg=$arg
147e83
+    # Protect names problematic for 'test' and other utilities.
147e83
+    case $dst_arg in
147e83
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
147e83
+    esac
147e83
+  done
147e83
 fi
147e83
 
147e83
-if [ x"$dir_arg" != x ]
147e83
-then
147e83
-	$doit $instcmd $dst &&
147e83
-
147e83
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
147e83
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
147e83
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
147e83
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
147e83
-else
147e83
+if test $# -eq 0; then
147e83
+  if test -z "$dir_arg"; then
147e83
+    echo "$0: no input file specified." >&2
147e83
+    exit 1
147e83
+  fi
147e83
+  # It's OK to call 'install-sh -d' without argument.
147e83
+  # This can happen when creating conditional directories.
147e83
+  exit 0
147e83
+fi
147e83
 
147e83
-# If we're going to rename the final executable, determine the name now.
147e83
+if test -z "$dir_arg"; then
147e83
+  do_exit='(exit $ret); exit $ret'
147e83
+  trap "ret=129; $do_exit" 1
147e83
+  trap "ret=130; $do_exit" 2
147e83
+  trap "ret=141; $do_exit" 13
147e83
+  trap "ret=143; $do_exit" 15
147e83
+
147e83
+  # Set umask so as not to create temps with too-generous modes.
147e83
+  # However, 'strip' requires both read and write access to temps.
147e83
+  case $mode in
147e83
+    # Optimize common cases.
147e83
+    *644) cp_umask=133;;
147e83
+    *755) cp_umask=22;;
147e83
+
147e83
+    *[0-7])
147e83
+      if test -z "$stripcmd"; then
147e83
+	u_plus_rw=
147e83
+      else
147e83
+	u_plus_rw='% 200'
147e83
+      fi
147e83
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
147e83
+    *)
147e83
+      if test -z "$stripcmd"; then
147e83
+	u_plus_rw=
147e83
+      else
147e83
+	u_plus_rw=,u+rw
147e83
+      fi
147e83
+      cp_umask=$mode$u_plus_rw;;
147e83
+  esac
147e83
+fi
147e83
 
147e83
-	if [ x"$transformarg" = x ] 
147e83
-	then
147e83
-		dstfile=`basename $dst`
147e83
+for src
147e83
+do
147e83
+  # Protect names problematic for 'test' and other utilities.
147e83
+  case $src in
147e83
+    -* | [=\(\)!]) src=./$src;;
147e83
+  esac
147e83
+
147e83
+  if test -n "$dir_arg"; then
147e83
+    dst=$src
147e83
+    dstdir=$dst
147e83
+    test -d "$dstdir"
147e83
+    dstdir_status=$?
147e83
+  else
147e83
+
147e83
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
147e83
+    # might cause directories to be created, which would be especially bad
147e83
+    # if $src (and thus $dsttmp) contains '*'.
147e83
+    if test ! -f "$src" && test ! -d "$src"; then
147e83
+      echo "$0: $src does not exist." >&2
147e83
+      exit 1
147e83
+    fi
147e83
+
147e83
+    if test -z "$dst_arg"; then
147e83
+      echo "$0: no destination specified." >&2
147e83
+      exit 1
147e83
+    fi
147e83
+    dst=$dst_arg
147e83
+
147e83
+    # If destination is a directory, append the input filename; won't work
147e83
+    # if double slashes aren't ignored.
147e83
+    if test -d "$dst"; then
147e83
+      if test -n "$no_target_directory"; then
147e83
+	echo "$0: $dst_arg: Is a directory" >&2
147e83
+	exit 1
147e83
+      fi
147e83
+      dstdir=$dst
147e83
+      dst=$dstdir/`basename "$src"`
147e83
+      dstdir_status=0
147e83
+    else
147e83
+      # Prefer dirname, but fall back on a substitute if dirname fails.
147e83
+      dstdir=`
147e83
+	(dirname "$dst") 2>/dev/null ||
147e83
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
147e83
+	     X"$dst" : 'X\(//\)[^/]' \| \
147e83
+	     X"$dst" : 'X\(//\)$' \| \
147e83
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
147e83
+	echo X"$dst" |
147e83
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
147e83
+		   s//\1/
147e83
+		   q
147e83
+		 }
147e83
+		 /^X\(\/\/\)[^/].*/{
147e83
+		   s//\1/
147e83
+		   q
147e83
+		 }
147e83
+		 /^X\(\/\/\)$/{
147e83
+		   s//\1/
147e83
+		   q
147e83
+		 }
147e83
+		 /^X\(\/\).*/{
147e83
+		   s//\1/
147e83
+		   q
147e83
+		 }
147e83
+		 s/.*/./; q'
147e83
+      `
147e83
+
147e83
+      test -d "$dstdir"
147e83
+      dstdir_status=$?
147e83
+    fi
147e83
+  fi
147e83
+
147e83
+  obsolete_mkdir_used=false
147e83
+
147e83
+  if test $dstdir_status != 0; then
147e83
+    case $posix_mkdir in
147e83
+      '')
147e83
+	# Create intermediate dirs using mode 755 as modified by the umask.
147e83
+	# This is like FreeBSD 'install' as of 1997-10-28.
147e83
+	umask=`umask`
147e83
+	case $stripcmd.$umask in
147e83
+	  # Optimize common cases.
147e83
+	  *[2367][2367]) mkdir_umask=$umask;;
147e83
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
147e83
+
147e83
+	  *[0-7])
147e83
+	    mkdir_umask=`expr $umask + 22 \
147e83
+	      - $umask % 100 % 40 + $umask % 20 \
147e83
+	      - $umask % 10 % 4 + $umask % 2
147e83
+	    `;;
147e83
+	  *) mkdir_umask=$umask,go-w;;
147e83
+	esac
147e83
+
147e83
+	# With -d, create the new directory with the user-specified mode.
147e83
+	# Otherwise, rely on $mkdir_umask.
147e83
+	if test -n "$dir_arg"; then
147e83
+	  mkdir_mode=-m$mode
147e83
 	else
147e83
-		dstfile=`basename $dst $transformbasename | 
147e83
-			sed $transformarg`$transformbasename
147e83
+	  mkdir_mode=
147e83
 	fi
147e83
 
147e83
-# don't allow the sed command to completely eliminate the filename
147e83
+	posix_mkdir=false
147e83
+	case $umask in
147e83
+	  *[123567][0-7][0-7])
147e83
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
147e83
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
147e83
+	    ;;
147e83
+	  *)
147e83
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
147e83
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
147e83
+
147e83
+	    if (umask $mkdir_umask &&
147e83
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
147e83
+	    then
147e83
+	      if test -z "$dir_arg" || {
147e83
+		   # Check for POSIX incompatibilities with -m.
147e83
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
147e83
+		   # other-writable bit of parent directory when it shouldn't.
147e83
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
147e83
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
147e83
+		   case $ls_ld_tmpdir in
147e83
+		     d????-?r-*) different_mode=700;;
147e83
+		     d????-?--*) different_mode=755;;
147e83
+		     *) false;;
147e83
+		   esac &&
147e83
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
147e83
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
147e83
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
147e83
+		   }
147e83
+		 }
147e83
+	      then posix_mkdir=:
147e83
+	      fi
147e83
+	      rmdir "$tmpdir/d" "$tmpdir"
147e83
+	    else
147e83
+	      # Remove any dirs left behind by ancient mkdir implementations.
147e83
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
147e83
+	    fi
147e83
+	    trap '' 0;;
147e83
+	esac;;
147e83
+    esac
147e83
 
147e83
-	if [ x"$dstfile" = x ] 
147e83
-	then
147e83
-		dstfile=`basename $dst`
147e83
+    if
147e83
+      $posix_mkdir && (
147e83
+	umask $mkdir_umask &&
147e83
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
147e83
+      )
147e83
+    then :
147e83
+    else
147e83
+
147e83
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
147e83
+      # or it failed possibly due to a race condition.  Create the
147e83
+      # directory the slow way, step by step, checking for races as we go.
147e83
+
147e83
+      case $dstdir in
147e83
+	/*) prefix='/';;
147e83
+	[-=\(\)!]*) prefix='./';;
147e83
+	*)  prefix='';;
147e83
+      esac
147e83
+
147e83
+      eval "$initialize_posix_glob"
147e83
+
147e83
+      oIFS=$IFS
147e83
+      IFS=/
147e83
+      $posix_glob set -f
147e83
+      set fnord $dstdir
147e83
+      shift
147e83
+      $posix_glob set +f
147e83
+      IFS=$oIFS
147e83
+
147e83
+      prefixes=
147e83
+
147e83
+      for d
147e83
+      do
147e83
+	test X"$d" = X && continue
147e83
+
147e83
+	prefix=$prefix$d
147e83
+	if test -d "$prefix"; then
147e83
+	  prefixes=
147e83
 	else
147e83
-		true
147e83
+	  if $posix_mkdir; then
147e83
+	    (umask=$mkdir_umask &&
147e83
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
147e83
+	    # Don't fail if two instances are running concurrently.
147e83
+	    test -d "$prefix" || exit 1
147e83
+	  else
147e83
+	    case $prefix in
147e83
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
147e83
+	      *) qprefix=$prefix;;
147e83
+	    esac
147e83
+	    prefixes="$prefixes '$qprefix'"
147e83
+	  fi
147e83
 	fi
147e83
+	prefix=$prefix/
147e83
+      done
147e83
 
147e83
-# Make a temp file name in the proper directory.
147e83
-
147e83
-	dsttmp=$dstdir/#inst.$$#
147e83
-
147e83
-# Move or copy the file name to the temp name
147e83
-
147e83
-	$doit $instcmd $src $dsttmp &&
147e83
-
147e83
-	trap "rm -f ${dsttmp}" 0 &&
147e83
-
147e83
-# and set any options; do chmod last to preserve setuid bits
147e83
-
147e83
-# If any of these fail, we abort the whole thing.  If we want to
147e83
-# ignore errors from any of these, just make sure not to ignore
147e83
-# errors from the above "$doit $instcmd $src $dsttmp" command.
147e83
-
147e83
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
147e83
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
147e83
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
147e83
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
147e83
-
147e83
-# Now rename the file to the real destination.
147e83
-
147e83
-	$doit $rmcmd -f $dstdir/$dstfile &&
147e83
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
147e83
-
147e83
-fi &&
147e83
+      if test -n "$prefixes"; then
147e83
+	# Don't fail if two instances are running concurrently.
147e83
+	(umask $mkdir_umask &&
147e83
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
147e83
+	  test -d "$dstdir" || exit 1
147e83
+	obsolete_mkdir_used=true
147e83
+      fi
147e83
+    fi
147e83
+  fi
147e83
+
147e83
+  if test -n "$dir_arg"; then
147e83
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
147e83
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
147e83
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
147e83
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
147e83
+  else
147e83
+
147e83
+    # Make a couple of temp file names in the proper directory.
147e83
+    dsttmp=$dstdir/_inst.$$_
147e83
+    rmtmp=$dstdir/_rm.$$_
147e83
+
147e83
+    # Trap to clean up those temp files at exit.
147e83
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
147e83
+
147e83
+    # Copy the file name to the temp name.
147e83
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
147e83
+
147e83
+    # and set any options; do chmod last to preserve setuid bits.
147e83
+    #
147e83
+    # If any of these fail, we abort the whole thing.  If we want to
147e83
+    # ignore errors from any of these, just make sure not to ignore
147e83
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
147e83
+    #
147e83
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
147e83
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
147e83
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
147e83
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
147e83
+
147e83
+    # If -C, don't bother to copy if it wouldn't change the file.
147e83
+    if $copy_on_change &&
147e83
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
147e83
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
147e83
+
147e83
+       eval "$initialize_posix_glob" &&
147e83
+       $posix_glob set -f &&
147e83
+       set X $old && old=:$2:$4:$5:$6 &&
147e83
+       set X $new && new=:$2:$4:$5:$6 &&
147e83
+       $posix_glob set +f &&
147e83
+
147e83
+       test "$old" = "$new" &&
147e83
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
147e83
+    then
147e83
+      rm -f "$dsttmp"
147e83
+    else
147e83
+      # Rename the file to the real destination.
147e83
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
147e83
+
147e83
+      # The rename failed, perhaps because mv can't rename something else
147e83
+      # to itself, or perhaps because mv is so ancient that it does not
147e83
+      # support -f.
147e83
+      {
147e83
+	# Now remove or move aside any old file at destination location.
147e83
+	# We try this two ways since rm can't unlink itself on some
147e83
+	# systems and the destination file might be busy for other
147e83
+	# reasons.  In this case, the final cleanup might fail but the new
147e83
+	# file should still install successfully.
147e83
+	{
147e83
+	  test ! -f "$dst" ||
147e83
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
147e83
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
147e83
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
147e83
+	  } ||
147e83
+	  { echo "$0: cannot unlink or rename $dst" >&2
147e83
+	    (exit 1); exit 1
147e83
+	  }
147e83
+	} &&
147e83
+
147e83
+	# Now rename the file to the real destination.
147e83
+	$doit $mvcmd "$dsttmp" "$dst"
147e83
+      }
147e83
+    fi || exit 1
147e83
 
147e83
+    trap '' 0
147e83
+  fi
147e83
+done
147e83
 
147e83
-exit 0
147e83
+# Local variables:
147e83
+# eval: (add-hook 'write-file-hooks 'time-stamp)
147e83
+# time-stamp-start: "scriptversion="
147e83
+# time-stamp-format: "%:y-%02m-%02d.%02H"
147e83
+# time-stamp-time-zone: "UTC"
147e83
+# time-stamp-end: "; # UTC"
147e83
+# End:
147e83
diff -urN glibc-2.17-c758a686/scripts/mkinstalldirs glibc-2.17-c758a686/scripts/mkinstalldirs
147e83
--- glibc-2.17-c758a686/scripts/mkinstalldirs	2014-05-26 15:59:45.000000000 -0500
147e83
+++ glibc-2.17-c758a686/scripts/mkinstalldirs	2014-05-26 16:00:34.000000000 -0500
147e83
@@ -1,38 +1,162 @@
147e83
 #! /bin/sh
147e83
 # mkinstalldirs --- make directory hierarchy
147e83
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
147e83
-# Created: 1993-05-16
147e83
-# Public domain
147e83
 
147e83
+scriptversion=2009-04-28.21; # UTC
147e83
+
147e83
+# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
147e83
+# Created: 1993-05-16
147e83
+# Public domain.
147e83
+#
147e83
+# This file is maintained in Automake, please report
147e83
+# bugs to <bug-automake@gnu.org> or send patches to
147e83
+# <automake-patches@gnu.org>.
147e83
+
147e83
+nl='
147e83
+'
147e83
+IFS=" ""	$nl"
147e83
 errstatus=0
147e83
+dirmode=
147e83
+
147e83
+usage="\
147e83
+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
147e83
+
147e83
+Create each directory DIR (with mode MODE, if specified), including all
147e83
+leading file name components.
147e83
+
147e83
+Report bugs to <bug-automake@gnu.org>."
147e83
+
147e83
+# process command line arguments
147e83
+while test $# -gt 0 ; do
147e83
+  case $1 in
147e83
+    -h | --help | --h*)         # -h for help
147e83
+      echo "$usage"
147e83
+      exit $?
147e83
+      ;;
147e83
+    -m)                         # -m PERM arg
147e83
+      shift
147e83
+      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
147e83
+      dirmode=$1
147e83
+      shift
147e83
+      ;;
147e83
+    --version)
147e83
+      echo "$0 $scriptversion"
147e83
+      exit $?
147e83
+      ;;
147e83
+    --)                         # stop option processing
147e83
+      shift
147e83
+      break
147e83
+      ;;
147e83
+    -*)                         # unknown option
147e83
+      echo "$usage" 1>&2
147e83
+      exit 1
147e83
+      ;;
147e83
+    *)                          # first non-opt arg
147e83
+      break
147e83
+      ;;
147e83
+  esac
147e83
+done
147e83
 
147e83
 for file
147e83
 do
147e83
-   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
147e83
-   shift
147e83
+  if test -d "$file"; then
147e83
+    shift
147e83
+  else
147e83
+    break
147e83
+  fi
147e83
+done
147e83
+
147e83
+case $# in
147e83
+  0) exit 0 ;;
147e83
+esac
147e83
+
147e83
+# Solaris 8's mkdir -p isn't thread-safe.  If you mkdir -p a/b and
147e83
+# mkdir -p a/c at the same time, both will detect that a is missing,
147e83
+# one will create a, then the other will try to create a and die with
147e83
+# a "File exists" error.  This is a problem when calling mkinstalldirs
147e83
+# from a parallel make.  We use --version in the probe to restrict
147e83
+# ourselves to GNU mkdir, which is thread-safe.
147e83
+case $dirmode in
147e83
+  '')
147e83
+    if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
147e83
+      echo "mkdir -p -- $*"
147e83
+      exec mkdir -p -- "$@"
147e83
+    else
147e83
+      # On NextStep and OpenStep, the 'mkdir' command does not
147e83
+      # recognize any option.  It will interpret all options as
147e83
+      # directories to create, and then abort because '.' already
147e83
+      # exists.
147e83
+      test -d ./-p && rmdir ./-p
147e83
+      test -d ./--version && rmdir ./--version
147e83
+    fi
147e83
+    ;;
147e83
+  *)
147e83
+    if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
147e83
+       test ! -d ./--version; then
147e83
+      echo "mkdir -m $dirmode -p -- $*"
147e83
+      exec mkdir -m "$dirmode" -p -- "$@"
147e83
+    else
147e83
+      # Clean up after NextStep and OpenStep mkdir.
147e83
+      for d in ./-m ./-p ./--version "./$dirmode";
147e83
+      do
147e83
+        test -d $d && rmdir $d
147e83
+      done
147e83
+    fi
147e83
+    ;;
147e83
+esac
147e83
 
147e83
-   pathcomp=
147e83
-   for d
147e83
-   do
147e83
-     pathcomp="$pathcomp$d"
147e83
-     case "$pathcomp" in
147e83
-       -* ) pathcomp=./$pathcomp ;;
147e83
-     esac
147e83
-
147e83
-     if test ! -d "$pathcomp"; then
147e83
-        echo "mkdir $pathcomp" 1>&2
147e83
-
147e83
-        mkdir "$pathcomp" || lasterr=$?
147e83
-
147e83
-        if test ! -d "$pathcomp"; then
147e83
-  	  errstatus=$lasterr
147e83
-        fi
147e83
-     fi
147e83
+for file
147e83
+do
147e83
+  case $file in
147e83
+    /*) pathcomp=/ ;;
147e83
+    *)  pathcomp= ;;
147e83
+  esac
147e83
+  oIFS=$IFS
147e83
+  IFS=/
147e83
+  set fnord $file
147e83
+  shift
147e83
+  IFS=$oIFS
147e83
+
147e83
+  for d
147e83
+  do
147e83
+    test "x$d" = x && continue
147e83
+
147e83
+    pathcomp=$pathcomp$d
147e83
+    case $pathcomp in
147e83
+      -*) pathcomp=./$pathcomp ;;
147e83
+    esac
147e83
+
147e83
+    if test ! -d "$pathcomp"; then
147e83
+      echo "mkdir $pathcomp"
147e83
+
147e83
+      mkdir "$pathcomp" || lasterr=$?
147e83
+
147e83
+      if test ! -d "$pathcomp"; then
147e83
+	errstatus=$lasterr
147e83
+      else
147e83
+	if test ! -z "$dirmode"; then
147e83
+	  echo "chmod $dirmode $pathcomp"
147e83
+	  lasterr=
147e83
+	  chmod "$dirmode" "$pathcomp" || lasterr=$?
147e83
+
147e83
+	  if test ! -z "$lasterr"; then
147e83
+	    errstatus=$lasterr
147e83
+	  fi
147e83
+	fi
147e83
+      fi
147e83
+    fi
147e83
 
147e83
-     pathcomp="$pathcomp/"
147e83
-   done
147e83
+    pathcomp=$pathcomp/
147e83
+  done
147e83
 done
147e83
 
147e83
 exit $errstatus
147e83
 
147e83
-# mkinstalldirs ends here
147e83
+# Local Variables:
147e83
+# mode: shell-script
147e83
+# sh-indentation: 2
147e83
+# eval: (add-hook 'write-file-hooks 'time-stamp)
147e83
+# time-stamp-start: "scriptversion="
147e83
+# time-stamp-format: "%:y-%02m-%02d.%02H"
147e83
+# time-stamp-time-zone: "UTC"
147e83
+# time-stamp-end: "; # UTC"
147e83
+# End:
147e83
diff -urN glibc-2.17-c758a686/scripts/move-if-change glibc-2.17-c758a686/scripts/move-if-change
147e83
--- glibc-2.17-c758a686/scripts/move-if-change	2014-05-26 15:59:45.000000000 -0500
147e83
+++ glibc-2.17-c758a686/scripts/move-if-change	2014-05-26 16:00:34.000000000 -0500
147e83
@@ -1,17 +1,83 @@
147e83
 #!/bin/sh
147e83
 # Like mv $1 $2, but if the files are the same, just delete $1.
147e83
-# Status is 0 if $2 is changed, 1 otherwise.
147e83
-if
147e83
-test -r $2
147e83
-then
147e83
-if
147e83
-cmp -s $1 $2
147e83
-then
147e83
-echo $2 is unchanged
147e83
-rm -f $1
147e83
+# Status is zero if successful, nonzero otherwise.
147e83
+
147e83
+VERSION='2012-01-06 07:23'; # UTC
147e83
+# The definition above must lie within the first 8 lines in order
147e83
+# for the Emacs time-stamp write hook (at end) to update it.
147e83
+# If you change this file with Emacs, please let the write hook
147e83
+# do its job.  Otherwise, update this string manually.
147e83
+
147e83
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
147e83
+
147e83
+# This program is free software: you can redistribute it and/or modify
147e83
+# it under the terms of the GNU General Public License as published by
147e83
+# the Free Software Foundation, either version 3 of the License, or
147e83
+# (at your option) any later version.
147e83
+
147e83
+# This program is distributed in the hope that it will be useful,
147e83
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
147e83
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
147e83
+# GNU General Public License for more details.
147e83
+
147e83
+# You should have received a copy of the GNU General Public License
147e83
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
147e83
+
147e83
+usage="usage: $0 SOURCE DEST"
147e83
+
147e83
+help="$usage
147e83
+  or:  $0 OPTION
147e83
+If SOURCE is different than DEST, then move it to DEST; else remove SOURCE.
147e83
+
147e83
+  --help     display this help and exit
147e83
+  --version  output version information and exit
147e83
+
147e83
+The variable CMPPROG can be used to specify an alternative to 'cmp'.
147e83
+
147e83
+Report bugs to <bug-gnulib@gnu.org>."
147e83
+
147e83
+version=`expr "$VERSION" : '\([^ ]*\)'`
147e83
+version="move-if-change (gnulib) $version
147e83
+Copyright (C) 2011 Free Software Foundation, Inc.
147e83
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
147e83
+This is free software: you are free to change and redistribute it.
147e83
+There is NO WARRANTY, to the extent permitted by law."
147e83
+
147e83
+cmpprog=${CMPPROG-cmp}
147e83
+
147e83
+for arg
147e83
+do
147e83
+  case $arg in
147e83
+    --help | --hel | --he | --h)
147e83
+      exec echo "$help" ;;
147e83
+    --version | --versio | --versi | --vers | --ver | --ve | --v)
147e83
+      exec echo "$version" ;;
147e83
+    --)
147e83
+      shift
147e83
+      break ;;
147e83
+    -*)
147e83
+      echo "$0: invalid option: $arg" >&2
147e83
+      exit 1 ;;
147e83
+    *)
147e83
+      break ;;
147e83
+  esac
147e83
+done
147e83
+
147e83
+test $# -eq 2 || { echo "$0: $usage" >&2; exit 1; }
147e83
+
147e83
+if test -r "$2" && $cmpprog -- "$1" "$2" >/dev/null; then
147e83
+  rm -f -- "$1"
147e83
 else
147e83
-mv -f $1 $2
147e83
-fi
147e83
-else
147e83
-mv -f $1 $2
147e83
+  if mv -f -- "$1" "$2"; then :; else
147e83
+    # Ignore failure due to a concurrent move-if-change.
147e83
+    test -r "$2" && $cmpprog -- "$1" "$2" >/dev/null && rm -f -- "$1"
147e83
+  fi
147e83
 fi
147e83
+
147e83
+## Local Variables:
147e83
+## eval: (add-hook 'write-file-hooks 'time-stamp)
147e83
+## time-stamp-start: "VERSION='"
147e83
+## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
147e83
+## time-stamp-time-zone: "UTC"
147e83
+## time-stamp-end: "'; # UTC"
147e83
+## End: