diff options
Diffstat (limited to 'include/llvm/Config/sys')
-rw-r--r-- | include/llvm/Config/sys/mman.h | 24 | ||||
-rw-r--r-- | include/llvm/Config/sys/resource.h | 33 | ||||
-rw-r--r-- | include/llvm/Config/sys/stat.h | 19 | ||||
-rw-r--r-- | include/llvm/Config/sys/time.h | 18 | ||||
-rw-r--r-- | include/llvm/Config/sys/types.h | 19 | ||||
-rw-r--r-- | include/llvm/Config/sys/wait.h | 19 |
6 files changed, 132 insertions, 0 deletions
diff --git a/include/llvm/Config/sys/mman.h b/include/llvm/Config/sys/mman.h new file mode 100644 index 0000000000..af7affd940 --- /dev/null +++ b/include/llvm/Config/sys/mman.h @@ -0,0 +1,24 @@ +/* + * Header file: mman.h + * + * Description: + * This header file includes the headers needed for the mmap() system/ + * function call. It also defines some macros so that all of our calls + * to mmap() can act (more or less) the same, regardless of platform. + */ + +#ifndef _CONFIG_MMAN_H +#define _CONFIG_MMAN_H + +#include "Config/config.h" + +#ifdef HAVE_SYS_MMAN_H +#include <sys/mman.h> +#endif + +#ifndef HAVE_MMAP_ANONYMOUS +#define MAP_ANONYMOUS MAP_ANON +#endif + +#endif + diff --git a/include/llvm/Config/sys/resource.h b/include/llvm/Config/sys/resource.h new file mode 100644 index 0000000000..00979b2a89 --- /dev/null +++ b/include/llvm/Config/sys/resource.h @@ -0,0 +1,33 @@ +/* + * Header file: resource.h + * + * Description: + * This header file is the autoconf replacement for sys/resource.h (if it + * lives on the system). + */ + +#ifndef _CONFIG_SYS_RESOURCE_H +#define _CONFIG_SYS_RESOURCE_H + +#include "Config/config.h" + +#ifdef HAVE_SYS_RESOURCE_H + +/* + * In LLVM, we use sys/resource.h to use getrusage() and maybe some other + * stuff. Some man pages say that you also need sys/time.h and unistd.h. + * So, to be paranoid, we will try to include all three if possible. + */ +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif + +#include <sys/resource.h> + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#endif + +#endif diff --git a/include/llvm/Config/sys/stat.h b/include/llvm/Config/sys/stat.h new file mode 100644 index 0000000000..7bf33d3f24 --- /dev/null +++ b/include/llvm/Config/sys/stat.h @@ -0,0 +1,19 @@ +/* + * Header file: stat.h + * + * Description: + * This header file includes the headers needed for the stat() system + * call. + */ + +#ifndef _CONFIG_SYS_STAT_H +#define _CONFIG_SYS_STAT_H + +#include "Config/config.h" + +#ifdef HAVE_SYS_STAT_H +#include <sys/stat.h> +#endif + +#endif + diff --git a/include/llvm/Config/sys/time.h b/include/llvm/Config/sys/time.h new file mode 100644 index 0000000000..c982b8e0e1 --- /dev/null +++ b/include/llvm/Config/sys/time.h @@ -0,0 +1,18 @@ +/* + * Header file: time.h + * + * Description: + * This header file is the autoconf replacement for sys/time.h (if it + * lives on the system). + */ + +#ifndef _CONFIG_SYS_TIME_H +#define _CONFIG_SYS_TIME_H + +#include "Config/config.h" + +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif + +#endif diff --git a/include/llvm/Config/sys/types.h b/include/llvm/Config/sys/types.h new file mode 100644 index 0000000000..08ec22df28 --- /dev/null +++ b/include/llvm/Config/sys/types.h @@ -0,0 +1,19 @@ +/* + * Header file: types.h + * + * Description: + * This header file is the autoconf substitute for sys/types.h. It + * includes it for us if it exists on this system. + */ + +#ifndef _CONFIG_SYS_TYPES_H +#define _CONFIG_SYS_TYPES_H + +#include "Config/config.h" + +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif + +#endif + diff --git a/include/llvm/Config/sys/wait.h b/include/llvm/Config/sys/wait.h new file mode 100644 index 0000000000..5d69fa1ca4 --- /dev/null +++ b/include/llvm/Config/sys/wait.h @@ -0,0 +1,19 @@ +/* + * Header file: wait.h + * + * Description: + * This header file includes the headers needed for the wait() system + * call. + */ + +#ifndef _CONFIG_SYS_WAIT_H +#define _CONFIG_SYS_WAIT_H + +#include "Config/config.h" + +#ifdef HAVE_SYS_WAIT_H +#include <sys/wait.h> +#endif + +#endif + |