[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r10002: Disable kqueue on ppc only OSX versions (panther, jaguar, pu (in tor/branches: tor-0_1_1-patches/contrib/osx tor-0_1_2-patches/contrib/osx)



Author: phobos
Date: 2007-04-22 20:14:27 -0400 (Sun, 22 Apr 2007)
New Revision: 10002

Modified:
   tor/branches/tor-0_1_1-patches/contrib/osx/Tor
   tor/branches/tor-0_1_2-patches/contrib/osx/Tor
Log:
Disable kqueue on ppc only OSX versions (panther, jaguar, puma,
cheetah).  Confirmed in bug #371.


Modified: tor/branches/tor-0_1_1-patches/contrib/osx/Tor
===================================================================
--- tor/branches/tor-0_1_1-patches/contrib/osx/Tor	2007-04-22 03:59:55 UTC (rev 10001)
+++ tor/branches/tor-0_1_1-patches/contrib/osx/Tor	2007-04-23 00:14:27 UTC (rev 10002)
@@ -18,6 +18,29 @@
 TORCMD=$TORDIR/tor
 TORLOG=/var/log/tor/tor.log
 
+
+## Determine OSX Version
+# map version to name
+if [ -x /usr/bin/sw_vers ]; then
+# This is poor, yet functional.  We don't care about the 3rd number in
+# the OS version
+  OSVER=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 | cut -d"." -f1,2`
+      case "$OSVER" in
+        "10.5") OS="leopard" ARCH="universal";;
+        "10.4") OS="tiger" ARCH="universal";;
+        "10.3") OS="panther" ARCH="ppc";;
+        "10.2") OS="jaguar" ARCH="ppc";;
+        "10.1") OS="puma" ARCH="ppc";;
+        "10.0") OS="cheetah" ARCH="ppc";;
+      esac
+else  
+        OS="unknown"
+fi    
+
+if [ $ARCH != "universal" ]; then
+        export EVENT_NOKQUEUE=1
+fi
+
 ##
 # Tor Service
 ##

Modified: tor/branches/tor-0_1_2-patches/contrib/osx/Tor
===================================================================
--- tor/branches/tor-0_1_2-patches/contrib/osx/Tor	2007-04-22 03:59:55 UTC (rev 10001)
+++ tor/branches/tor-0_1_2-patches/contrib/osx/Tor	2007-04-23 00:14:27 UTC (rev 10002)
@@ -18,6 +18,29 @@
 TORCMD=$TORDIR/tor
 TORLOG=/var/log/tor/tor.log
 
+## Determine OSX Version
+# map version to name
+if [ -x /usr/bin/sw_vers ]; then
+# This is poor, yet functional.  We don't care about the 3rd number in
+# the OS version
+  OSVER=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 | cut -d"." -f1,2`
+      case "$OSVER" in
+	"10.5") OS="leopard" ARCH="universal";;
+	"10.4") OS="tiger" ARCH="universal";;
+	"10.3") OS="panther" ARCH="ppc";;
+	"10.2") OS="jaguar" ARCH="ppc";;
+	"10.1") OS="puma" ARCH="ppc";;
+	"10.0") OS="cheetah" ARCH="ppc";;
+      esac
+else
+	OS="unknown"
+fi
+
+if [ $ARCH != "universal" ]; then
+	export EVENT_NOKQUEUE=1
+fi
+
+
 ##
 # Tor Service
 ##