From 11c5f57f630bc75f376ba29ced11a03e65bf3848 Mon Sep 17 00:00:00 2001
From: Nate Karstens <webmaster@karstens.us>
Date: Sat, 3 Jan 2009 11:15:06 -0600
Subject: [PATCH 1/2] Updated to better distinguish between options and
 operands

---
 tools/apicheck/etc/apicheck | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/apicheck/etc/apicheck b/tools/apicheck/etc/apicheck
index 9c00e2572..5d0480cf3 100644
--- a/tools/apicheck/etc/apicheck
+++ b/tools/apicheck/etc/apicheck
@@ -38,7 +38,7 @@ libdir=`dirname $progdir`/framework
 
 javaOpts=""
 while expr "x$1" : 'x-J' >/dev/null; do
-    opt=`expr "$1" : '-J\(.*\)'`
+    opt=`expr "x$1" : 'x-J\(.*\)'`
     javaOpts="${javaOpts} -${opt}"
     shift
 done

From 9af5fc4e447863f0961bc60c1cf252c88f1088c2 Mon Sep 17 00:00:00 2001
From: Jey <jey.michael@gmail.com>
Date: Wed, 10 Dec 2008 09:07:28 -0800
Subject: [PATCH 2/2] Support absolute path, in OUT_DIR

---
 tools/atree/fs.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/atree/fs.cpp b/tools/atree/fs.cpp
index 00f44c2c6..997187986 100644
--- a/tools/atree/fs.cpp
+++ b/tools/atree/fs.cpp
@@ -108,6 +108,10 @@ mkdir_recursively(const string& path)
 {
     int err;
     size_t pos = 0;
+    // For absolute pathnames, that starts with leading '/'
+    // use appropriate initial value.
+    if (path.length() != 0 and path[0] == '/') pos++;
+
     while (true) {
         pos = path.find('/', pos);
         string p = path.substr(0, pos);