diff options
Diffstat (limited to 'ace/os_include/sys/resource.h')
-rw-r--r-- | ace/os_include/sys/resource.h | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/ace/os_include/sys/resource.h b/ace/os_include/sys/resource.h index b9d29f5f6f2..d6060869588 100644 --- a/ace/os_include/sys/resource.h +++ b/ace/os_include/sys/resource.h @@ -2,19 +2,19 @@ //============================================================================= /** - * @file resource.h + * @file os_resource.h * * definitions for XSI resource operations * * $Id$ * - * @author Don Hinton <dhinton@ieee.org> + * @author Don Hinton <dhinton@dresystems.com> * @author This code was originally in various places including ace/OS.h. */ //============================================================================= -#ifndef ACE_OS_INCLUDE_SYS_RESOURCE_H -#define ACE_OS_INCLUDE_SYS_RESOURCE_H +#ifndef ACE_OS_INCLUDE_SYS_OS_RESOURCE_H +#define ACE_OS_INCLUDE_SYS_OS_RESOURCE_H #include "ace/pre.h" @@ -28,8 +28,35 @@ #include "ace/os_include/sys/types.h" #if !defined (ACE_LACKS_SYS_RESOURCE_H) -# include /**/ <sys/resource.h> +# include /**/ <sys/resource.h> #endif /* !ACE_LACKS_SYS_RESOURCE_H */ +// Place all additions (especially function declarations) within extern "C" {} +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + +#if defined (ACE_HAS_BROKEN_SETRLIMIT) + typedef struct rlimit ACE_SETRLIMIT_TYPE; +#else + typedef const struct rlimit ACE_SETRLIMIT_TYPE; +#endif /* ACE_HAS_BROKEN_SETRLIMIT */ + +#if defined (ACE_WIN32) +# define RUSAGE_SELF 1 + /// Fake the UNIX rusage structure. Perhaps we can add more to this + /// later on? + struct rusage + { + FILETIME ru_utime; + FILETIME ru_stime; + }; +#endif /* ACE_WIN32 */ + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #include "ace/post.h" -#endif /* ACE_OS_INCLUDE_SYS_RESOURCE_H */ +#endif /* ACE_OS_INCLUDE_SYS_OS_RESOURCE_H */ |