From 66e196c3a7c99700e45be87b9cd493f95eca6322 Mon Sep 17 00:00:00 2001
From: Ben Elliston <bje@gnu.org>
Date: Wed, 11 Aug 2004 01:26:11 +0000
Subject: [PATCH] 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>

	* config.guess (*:Darwin:*:*): If uname -p reports "unknown",
	assume the processor is a powerpc.  This is because coreutils
	uname (at least versions 4.5.7 through 5.2.1) outputs "unknown"
	in this case, due to a MacOS X bug that causes
	sysctl ((int[]) {CTL_HW, HW_MACHINE_ARCH}, 2, buffer, &bufsize, 0, 0)
	to return a negative number.
	Problem reported by Petter Reinholdtsen in:
	http://lists.gnu.org/archive/html/bug-gnu-utils/2003-02/msg00201.html
---
 ChangeLog    | 11 +++++++++++
 config.guess |  7 ++++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c389d10..6599042 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+	* config.guess (*:Darwin:*:*): If uname -p reports "unknown",
+	assume the processor is a powerpc.  This is because coreutils
+	uname (at least versions 4.5.7 through 5.2.1) outputs "unknown"
+	in this case, due to a MacOS X bug that causes
+	sysctl ((int[]) {CTL_HW, HW_MACHINE_ARCH}, 2, buffer, &bufsize, 0, 0)
+	to return a negative number.
+	Problem reported by Petter Reinholdtsen in:
+	http://lists.gnu.org/archive/html/bug-gnu-utils/2003-02/msg00201.html
+
 2004-07-19  Ben Elliston  <bje@gnu.org>
 
 	* config.guess (S7501:*:4.0:3.0): Handle NCR System V UNIX machine.
diff --git a/config.guess b/config.guess
index 6641456..6be7a69 100755
--- a/config.guess
+++ b/config.guess
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #   2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 
-timestamp='2004-07-19'
+timestamp='2004-08-11'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -1179,9 +1179,10 @@ EOF
 	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
 	exit 0 ;;
     *:Darwin:*:*)
-	case `uname -p` in
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
 	    *86) UNAME_PROCESSOR=i686 ;;
-	    powerpc) UNAME_PROCESSOR=powerpc ;;
+	    unknown) UNAME_PROCESSOR=powerpc ;;
 	esac
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
 	exit 0 ;;