diff options
-rwxr-xr-x | compile.sh | 5 | ||||
-rw-r--r-- | src/main/cpp/blaze.cc | 22 | ||||
-rw-r--r-- | src/main/cpp/blaze_startup_options.cc | 12 | ||||
-rw-r--r-- | src/main/cpp/blaze_startup_options.h | 2 | ||||
-rw-r--r-- | src/main/cpp/blaze_startup_options_common.cc | 14 | ||||
-rw-r--r-- | src/main/cpp/blaze_util.cc | 18 | ||||
-rw-r--r-- | src/main/cpp/blaze_util.h | 8 | ||||
-rw-r--r-- | src/main/cpp/blaze_util_darwin.cc | 12 | ||||
-rw-r--r-- | src/main/cpp/blaze_util_linux.cc | 12 | ||||
-rw-r--r-- | src/main/cpp/blaze_util_mingw.cc | 12 | ||||
-rw-r--r-- | src/main/cpp/blaze_util_platform.h | 2 | ||||
-rw-r--r-- | src/main/cpp/option_processor.cc | 10 | ||||
-rw-r--r-- | src/main/cpp/option_processor.h | 4 | ||||
-rw-r--r-- | src/main/cpp/util/errors.cc | 2 | ||||
-rw-r--r-- | src/main/cpp/util/errors.h | 2 | ||||
-rw-r--r-- | src/main/cpp/util/file.cc | 8 | ||||
-rw-r--r-- | src/main/cpp/util/md5.cc | 5 | ||||
-rw-r--r-- | src/main/cpp/util/md5.h | 2 | ||||
-rw-r--r-- | src/main/cpp/util/numbers.cc | 4 | ||||
-rw-r--r-- | src/main/cpp/util/strings.cc | 4 | ||||
-rw-r--r-- | src/main/native/localsocket.cc | 3 | ||||
-rw-r--r-- | src/main/native/unix_jni.cc | 9 | ||||
-rw-r--r-- | src/main/native/unix_jni_darwin.cc | 2 | ||||
-rw-r--r-- | src/main/native/unix_jni_linux.cc | 2 |
24 files changed, 85 insertions, 91 deletions
diff --git a/compile.sh b/compile.sh index cf670a797c..09d26d405a 100755 --- a/compile.sh +++ b/compile.sh @@ -322,7 +322,7 @@ function cc_compile() { if [[ ! "${FILE}" =~ ^-.*$ ]]; then local OBJ=$(basename "${FILE}").o "${CPP}" \ - -I src/main/cpp/ \ + -I. \ ${ARCHIVE_CFLAGS} \ ${CFLAGS} \ -std=$CPPSTD \ @@ -407,8 +407,7 @@ if [ ! -z "$JNILIB" ] ; then for FILE in "${NATIVE_CC_FILES[@]}"; do OUT=$(basename "${FILE}").o "${CPP}" \ - -I src/main/cpp/ \ - -I src/main/native/ \ + -I . \ -I "${JAVA_HOME}/include/" \ -I "${JAVA_HOME}/include/${PLATFORM}" \ -std=$CPPSTD \ diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc index f324c950fa..5c4cb4092d 100644 --- a/src/main/cpp/blaze.cc +++ b/src/main/cpp/blaze.cc @@ -53,17 +53,17 @@ #include <utility> #include <vector> -#include "blaze_exit_code.h" -#include "blaze_startup_options.h" -#include "blaze_util.h" -#include "blaze_util_platform.h" -#include "option_processor.h" -#include "util/errors.h" -#include "util/file.h" -#include "util/md5.h" -#include "util/numbers.h" -#include "util/port.h" -#include "util/strings.h" +#include "src/main/cpp/blaze_exit_code.h" +#include "src/main/cpp/blaze_startup_options.h" +#include "src/main/cpp/blaze_util.h" +#include "src/main/cpp/blaze_util_platform.h" +#include "src/main/cpp/option_processor.h" +#include "src/main/cpp/util/errors.h" +#include "src/main/cpp/util/file.h" +#include "src/main/cpp/util/md5.h" +#include "src/main/cpp/util/numbers.h" +#include "src/main/cpp/util/port.h" +#include "src/main/cpp/util/strings.h" #include "archive.h" #include "archive_entry.h" diff --git a/src/main/cpp/blaze_startup_options.cc b/src/main/cpp/blaze_startup_options.cc index ed60add08f..b3602380c4 100644 --- a/src/main/cpp/blaze_startup_options.cc +++ b/src/main/cpp/blaze_startup_options.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#include "blaze_startup_options.h" +#include "src/main/cpp/blaze_startup_options.h" #include <assert.h> #include <errno.h> // errno, ENOENT @@ -20,11 +20,11 @@ #include <cstdio> -#include "blaze_exit_code.h" -#include "blaze_util_platform.h" -#include "blaze_util.h" -#include "util/file.h" -#include "util/strings.h" +#include "src/main/cpp/blaze_exit_code.h" +#include "src/main/cpp/blaze_util_platform.h" +#include "src/main/cpp/blaze_util.h" +#include "src/main/cpp/util/file.h" +#include "src/main/cpp/util/strings.h" namespace blaze { diff --git a/src/main/cpp/blaze_startup_options.h b/src/main/cpp/blaze_startup_options.h index f848814c77..340455aab5 100644 --- a/src/main/cpp/blaze_startup_options.h +++ b/src/main/cpp/blaze_startup_options.h @@ -19,7 +19,7 @@ #include <string> #include <vector> -#include "blaze_exit_code.h" +#include "src/main/cpp/blaze_exit_code.h" namespace blaze { diff --git a/src/main/cpp/blaze_startup_options_common.cc b/src/main/cpp/blaze_startup_options_common.cc index f236b91354..9f2ebcd084 100644 --- a/src/main/cpp/blaze_startup_options_common.cc +++ b/src/main/cpp/blaze_startup_options_common.cc @@ -11,17 +11,17 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#include "blaze_startup_options.h" +#include "src/main/cpp/blaze_startup_options.h" #include <cassert> #include <cstdlib> -#include "blaze_exit_code.h" -#include "blaze_util_platform.h" -#include "blaze_util.h" -#include "util/file.h" -#include "util/numbers.h" -#include "util/strings.h" +#include "src/main/cpp/blaze_exit_code.h" +#include "src/main/cpp/blaze_util_platform.h" +#include "src/main/cpp/blaze_util.h" +#include "src/main/cpp/util/file.h" +#include "src/main/cpp/util/numbers.h" +#include "src/main/cpp/util/strings.h" namespace blaze { diff --git a/src/main/cpp/blaze_util.cc b/src/main/cpp/blaze_util.cc index 4f67533716..d94c048850 100644 --- a/src/main/cpp/blaze_util.cc +++ b/src/main/cpp/blaze_util.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "blaze_util.h" +#include "src/main/cpp/blaze_util.h" #include <errno.h> #include <fcntl.h> @@ -29,10 +29,11 @@ #include <unistd.h> #include <sstream> -#include "util/errors.h" -#include "util/file.h" -#include "util/numbers.h" -#include "util/strings.h" +#include "src/main/cpp/blaze_exit_code.h" +#include "src/main/cpp/util/errors.h" +#include "src/main/cpp/util/file.h" +#include "src/main/cpp/util/numbers.h" +#include "src/main/cpp/util/strings.h" using blaze_util::die; using blaze_util::pdie; @@ -270,17 +271,16 @@ bool GetNullaryOption(const char *arg, const char *key) { return true; } -blaze_exit_code::ExitCode CheckValidPort( - const string &str, const string &option, string *error) { +bool CheckValidPort(const string &str, const string &option, string *error) { int number; if (blaze_util::safe_strto32(str, &number) && number > 0 && number < 65536) { - return blaze_exit_code::SUCCESS; + return true; } blaze_util::StringPrintf(error, "Invalid argument to %s: '%s' (must be a valid port number).", option.c_str(), str.c_str()); - return blaze_exit_code::BAD_ARGV; + return false; } bool VerboseLogging() { diff --git a/src/main/cpp/blaze_util.h b/src/main/cpp/blaze_util.h index 071200c6e8..99ef0e6305 100644 --- a/src/main/cpp/blaze_util.h +++ b/src/main/cpp/blaze_util.h @@ -28,9 +28,8 @@ #include <string> #include <vector> -#include "blaze_exit_code.h" -#include "util/numbers.h" -#include "util/port.h" +#include "src/main/cpp/util/numbers.h" +#include "src/main/cpp/util/port.h" namespace blaze { @@ -95,8 +94,7 @@ const char* GetUnaryOption(const char *arg, const char *next_arg, // Returns NULL otherwise. bool GetNullaryOption(const char *arg, const char *key); -blaze_exit_code::ExitCode CheckValidPort( - const string &str, const string &option, string *error); +bool CheckValidPort(const string &str, const string &option, string *error); // Enable messages mostly of interest to developers. bool VerboseLogging(); diff --git a/src/main/cpp/blaze_util_darwin.cc b/src/main/cpp/blaze_util_darwin.cc index 30b1af578c..67dfd74660 100644 --- a/src/main/cpp/blaze_util_darwin.cc +++ b/src/main/cpp/blaze_util_darwin.cc @@ -19,12 +19,12 @@ #include <unistd.h> #include <cstdio> -#include "blaze_exit_code.h" -#include "blaze_util.h" -#include "blaze_util_platform.h" -#include "util/errors.h" -#include "util/file.h" -#include "util/strings.h" +#include "src/main/cpp/blaze_exit_code.h" +#include "src/main/cpp/blaze_util.h" +#include "src/main/cpp/blaze_util_platform.h" +#include "src/main/cpp/util/errors.h" +#include "src/main/cpp/util/file.h" +#include "src/main/cpp/util/strings.h" namespace blaze { diff --git a/src/main/cpp/blaze_util_linux.cc b/src/main/cpp/blaze_util_linux.cc index 9945ebb37f..52ca52e3ba 100644 --- a/src/main/cpp/blaze_util_linux.cc +++ b/src/main/cpp/blaze_util_linux.cc @@ -19,12 +19,12 @@ #include <sys/types.h> #include <pwd.h> -#include "blaze_exit_code.h" -#include "blaze_util_platform.h" -#include "blaze_util.h" -#include "util/errors.h" -#include "util/file.h" -#include "util/strings.h" +#include "src/main/cpp/blaze_exit_code.h" +#include "src/main/cpp/blaze_util_platform.h" +#include "src/main/cpp/blaze_util.h" +#include "src/main/cpp/util/errors.h" +#include "src/main/cpp/util/file.h" +#include "src/main/cpp/util/strings.h" namespace blaze { diff --git a/src/main/cpp/blaze_util_mingw.cc b/src/main/cpp/blaze_util_mingw.cc index 972857c4f6..79353521d8 100644 --- a/src/main/cpp/blaze_util_mingw.cc +++ b/src/main/cpp/blaze_util_mingw.cc @@ -21,12 +21,12 @@ #include <cstdlib> #include <cstdio> -#include "blaze_exit_code.h" -#include "blaze_util_platform.h" -#include "blaze_util.h" -#include "util/errors.h" -#include "util/file.h" -#include "util/strings.h" +#include "src/main/cpp/blaze_exit_code.h" +#include "src/main/cpp/blaze_util_platform.h" +#include "src/main/cpp/blaze_util.h" +#include "src/main/cpp/util/errors.h" +#include "src/main/cpp/util/file.h" +#include "src/main/cpp/util/strings.h" namespace blaze { diff --git a/src/main/cpp/blaze_util_platform.h b/src/main/cpp/blaze_util_platform.h index 20c7a24e4c..d3c5add162 100644 --- a/src/main/cpp/blaze_util_platform.h +++ b/src/main/cpp/blaze_util_platform.h @@ -16,7 +16,7 @@ #define DEVTOOLS_BLAZE_MAIN_BLAZE_UTIL_PLATFORM_H_ #include <string> -#include "util/numbers.h" +#include "src/main/cpp/util/numbers.h" namespace blaze { diff --git a/src/main/cpp/option_processor.cc b/src/main/cpp/option_processor.cc index ce4cd631e1..5cefdd3dc0 100644 --- a/src/main/cpp/option_processor.cc +++ b/src/main/cpp/option_processor.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "option_processor.h" +#include "src/main/cpp/option_processor.h" #include <stdio.h> #include <stdlib.h> @@ -22,10 +22,10 @@ #include <cassert> #include <utility> -#include "blaze_util.h" -#include "blaze_util_platform.h" -#include "util/file.h" -#include "util/strings.h" +#include "src/main/cpp/blaze_util.h" +#include "src/main/cpp/blaze_util_platform.h" +#include "src/main/cpp/util/file.h" +#include "src/main/cpp/util/strings.h" using std::list; using std::map; diff --git a/src/main/cpp/option_processor.h b/src/main/cpp/option_processor.h index 8246216887..9e391d613b 100644 --- a/src/main/cpp/option_processor.h +++ b/src/main/cpp/option_processor.h @@ -21,8 +21,8 @@ #include <string> #include <vector> -#include "blaze_exit_code.h" -#include "blaze_startup_options.h" +#include "src/main/cpp/blaze_exit_code.h" +#include "src/main/cpp/blaze_startup_options.h" namespace blaze { diff --git a/src/main/cpp/util/errors.cc b/src/main/cpp/util/errors.cc index ceaf93c5f6..ed87f8d483 100644 --- a/src/main/cpp/util/errors.cc +++ b/src/main/cpp/util/errors.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/errors.h" +#include "src/main/cpp/util/errors.h" #include <errno.h> #include <stdarg.h> diff --git a/src/main/cpp/util/errors.h b/src/main/cpp/util/errors.h index 718169fa9f..5079c6123a 100644 --- a/src/main/cpp/util/errors.h +++ b/src/main/cpp/util/errors.h @@ -16,7 +16,7 @@ #ifndef DEVTOOLS_BLAZE_MAIN_UTIL_ERRORS_H_ #define DEVTOOLS_BLAZE_MAIN_UTIL_ERRORS_H_ -#include "util/port.h" +#include "src/main/cpp/util/port.h" namespace blaze_util { diff --git a/src/main/cpp/util/file.cc b/src/main/cpp/util/file.cc index 8e76609484..825265e0a5 100644 --- a/src/main/cpp/util/file.cc +++ b/src/main/cpp/util/file.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#include "util/file.h" +#include "src/main/cpp/util/file.h" #include <errno.h> // EINVAL #include <limits.h> // PATH_MAX @@ -20,9 +20,9 @@ #include <cstdlib> #include <vector> -#include "blaze_exit_code.h" -#include "util/errors.h" -#include "util/strings.h" +#include "src/main/cpp/blaze_exit_code.h" +#include "src/main/cpp/util/errors.h" +#include "src/main/cpp/util/strings.h" using std::pair; diff --git a/src/main/cpp/util/md5.cc b/src/main/cpp/util/md5.cc index b986986f62..4427809939 100644 --- a/src/main/cpp/util/md5.cc +++ b/src/main/cpp/util/md5.cc @@ -37,13 +37,12 @@ documentation and/or software. */ - -#include "util/md5.h" +#include "src/main/cpp/util/md5.h" #include <string.h> // for memcpy #include <stddef.h> // for ofsetof -#include "util/numbers.h" +#include "src/main/cpp/util/numbers.h" #if !_STRING_ARCH_unaligned # ifdef _LP64 diff --git a/src/main/cpp/util/md5.h b/src/main/cpp/util/md5.h index fbab1881c6..9a6fe92e50 100644 --- a/src/main/cpp/util/md5.h +++ b/src/main/cpp/util/md5.h @@ -20,8 +20,6 @@ #include <string> -#include "util/port.h" - namespace blaze_util { using std::string; diff --git a/src/main/cpp/util/numbers.cc b/src/main/cpp/util/numbers.cc index 1a758a8092..f825781a54 100644 --- a/src/main/cpp/util/numbers.cc +++ b/src/main/cpp/util/numbers.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#include "util/numbers.h" +#include "src/main/cpp/util/numbers.h" #include <errno.h> #include <limits.h> @@ -19,7 +19,7 @@ #include <cstdlib> #include <limits> -#include "util/strings.h" +#include "src/main/cpp/util/strings.h" namespace blaze_util { diff --git a/src/main/cpp/util/strings.cc b/src/main/cpp/util/strings.cc index d07f86dfc7..06f8bc0d6b 100644 --- a/src/main/cpp/util/strings.cc +++ b/src/main/cpp/util/strings.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#include "util/strings.h" +#include "src/main/cpp/util/strings.h" #include <stdarg.h> #include <stdio.h> @@ -19,7 +19,7 @@ #include <cassert> -#include "blaze_exit_code.h" +#include "src/main/cpp/blaze_exit_code.h" using std::vector; diff --git a/src/main/native/localsocket.cc b/src/main/native/localsocket.cc index 87fff63e2e..86ecb33c1f 100644 --- a/src/main/native/localsocket.cc +++ b/src/main/native/localsocket.cc @@ -26,8 +26,7 @@ #include <string> -#include "unix_jni.h" - +#include "src/main/native/unix_jni.h" // Returns the field ID for FileDescriptor.fd. static jfieldID GetFileDescriptorField(JNIEnv *env) { diff --git a/src/main/native/unix_jni.cc b/src/main/native/unix_jni.cc index 5e237fd81e..99af2d7310 100644 --- a/src/main/native/unix_jni.cc +++ b/src/main/native/unix_jni.cc @@ -12,8 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include <jni.h> +#include "src/main/native/unix_jni.h" +#include <jni.h> #include <dirent.h> #include <errno.h> #include <fcntl.h> @@ -31,9 +32,9 @@ #include <string> #include <vector> -#include "macros.h" -#include "util/md5.h" -#include "unix_jni.h" +#include "src/main/native/macros.h" +#include "src/main/cpp/util/md5.h" +#include "src/main/cpp/util/port.h" using blaze_util::Md5Digest; diff --git a/src/main/native/unix_jni_darwin.cc b/src/main/native/unix_jni_darwin.cc index 017df43d31..7e3c8e8f6a 100644 --- a/src/main/native/unix_jni_darwin.cc +++ b/src/main/native/unix_jni_darwin.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unix_jni.h" +#include "src/main/native/unix_jni.h" #include <assert.h> #include <errno.h> diff --git a/src/main/native/unix_jni_linux.cc b/src/main/native/unix_jni_linux.cc index 3562adb475..8acc09fe27 100644 --- a/src/main/native/unix_jni_linux.cc +++ b/src/main/native/unix_jni_linux.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unix_jni.h" +#include "src/main/native/unix_jni.h" #include <string.h> #include <stdlib.h> |