Chris Lattner | 526a80e | 2004-02-26 08:01:30 +0000 | [diff] [blame] | 1 | /*===-- Config/sys/resource.h -----------------------------------*- C++ -*-===// |
John Criswell | 4c8472d | 2003-10-20 20:11:43 +0000 | [diff] [blame] | 2 | * |
| 3 | * The LLVM Compiler Infrastructure |
John Criswell | 3ef61af | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 4 | * |
John Criswell | 4c8472d | 2003-10-20 20:11:43 +0000 | [diff] [blame] | 5 | * This file was developed by the LLVM research group and is distributed under |
| 6 | * the University of Illinois Open Source License. See LICENSE.TXT for details. |
| 7 | * |
| 8 | *===----------------------------------------------------------------------===// |
| 9 | * |
John Criswell | 3ef61af | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 10 | * This header file is the autoconf replacement for sys/resource.h (if it |
| 11 | * lives on the system). |
John Criswell | 4c8472d | 2003-10-20 20:11:43 +0000 | [diff] [blame] | 12 | * |
| 13 | *===----------------------------------------------------------------------===// |
John Criswell | 3ef61af | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | #ifndef _CONFIG_SYS_RESOURCE_H |
| 17 | #define _CONFIG_SYS_RESOURCE_H |
| 18 | |
| 19 | #include "Config/config.h" |
| 20 | |
| 21 | #ifdef HAVE_SYS_RESOURCE_H |
| 22 | |
| 23 | /* |
| 24 | * In LLVM, we use sys/resource.h to use getrusage() and maybe some other |
| 25 | * stuff. Some man pages say that you also need sys/time.h and unistd.h. |
| 26 | * So, to be paranoid, we will try to include all three if possible. |
| 27 | */ |
| 28 | #ifdef HAVE_SYS_TIME_H |
| 29 | #include <sys/time.h> |
| 30 | #endif |
| 31 | |
| 32 | #include <sys/resource.h> |
| 33 | |
| 34 | #ifdef HAVE_UNISTD_H |
| 35 | #include <unistd.h> |
| 36 | #endif |
| 37 | |
| 38 | #endif |
| 39 | |
| 40 | #endif |