Misha Brukman | 0abaaf4 | 2003-08-11 22:29:36 +0000 | [diff] [blame] | 1 | /*===- sysutils.h - Utilities to do low-level system stuff -------*- C -*--===*\ |
| 2 | * * |
| 3 | * This file contains functions used to do a variety of low-level, often * |
| 4 | * system-specific, tasks. * |
| 5 | * * |
| 6 | \*===----------------------------------------------------------------------===*/ |
| 7 | |
| 8 | #ifndef SYSUTILS_H |
| 9 | #define SYSUTILS_H |
| 10 | |
| 11 | typedef unsigned bool; |
| 12 | enum { false = 0, true = 1 }; |
| 13 | |
| 14 | /* |
| 15 | * isExecutableFile - This function returns true if the filename specified |
| 16 | * exists and is executable. |
| 17 | */ |
| 18 | bool isExecutableFile(const char *ExeFileName); |
| 19 | |
| 20 | /* |
| 21 | * FindExecutable - Find a named executable, giving the argv[0] of program |
| 22 | * being executed. This allows us to find another LLVM tool if it is built into |
| 23 | * the same directory, but that directory is neither the current directory, nor |
| 24 | * in the PATH. If the executable cannot be found, return an empty string. |
| 25 | */ |
| 26 | char *FindExecutable(const char *ExeName); |
| 27 | |
| 28 | #endif |