A lot of changes were suggested by Chris.
ExecveHandler.c:
* Use "" instead of <> for LLVM include files
* Use raw I/O, we don't need buffering
* Set errno = 0 before using open()
* strlen() doesn't count NULL terminator in its size
* Use memcmp() instead of strcmp()
* Return result of the real execve(), not 0
* Search for path to bytecode file if not absolute/relative path
SysUtils.c:
* Convert all comments to C-style
* Stop using `bool', use `unsigned' instead
SysUtils.h:
* Stop using `bool', use `unsigned' instead
* Updated comment to FindExecutable()
README.txt:
* Describe the goal of LLEE and an application
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7911 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/llee/SysUtils.h b/tools/llee/SysUtils.h
index 89b6479..84e7f9d 100644
--- a/tools/llee/SysUtils.h
+++ b/tools/llee/SysUtils.h
@@ -1,4 +1,4 @@
-/*===- sysutils.h - Utilities to do low-level system stuff -------*- C -*--===*\
+/*===- SysUtils.h - Utilities to do low-level system stuff -------*- C -*--===*\
* *
* This file contains functions used to do a variety of low-level, often *
* system-specific, tasks. *
@@ -8,20 +8,14 @@
#ifndef SYSUTILS_H
#define SYSUTILS_H
-typedef unsigned bool;
-enum { false = 0, true = 1 };
-
/*
* isExecutableFile - This function returns true if the filename specified
* exists and is executable.
*/
-bool isExecutableFile(const char *ExeFileName);
+unsigned isExecutableFile(const char *ExeFileName);
/*
- * FindExecutable - Find a named executable, giving the argv[0] of program
- * being executed. This allows us to find another LLVM tool if it is built into
- * the same directory, but that directory is neither the current directory, nor
- * in the PATH. If the executable cannot be found, return an empty string.
+ * FindExecutable - Find a named executable in the path.
*/
char *FindExecutable(const char *ExeName);