diff options
Diffstat (limited to 'ace/os_include/stdlib.h')
-rw-r--r-- | ace/os_include/stdlib.h | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/ace/os_include/stdlib.h b/ace/os_include/stdlib.h index 220f3ac8c91..270222a4d61 100644 --- a/ace/os_include/stdlib.h +++ b/ace/os_include/stdlib.h @@ -2,19 +2,19 @@ //============================================================================= /** - * @file stdlib.h + * @file os_stdlib.h * * standard library definitions * * $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_STDLIB_H -#define ACE_OS_INCLUDE_STDLIB_H +#ifndef ACE_OS_INCLUDE_OS_STDLIB_H +#define ACE_OS_INCLUDE_OS_STDLIB_H #include "ace/pre.h" @@ -27,9 +27,45 @@ #include "ace/os_include/stddef.h" #include "ace/os_include/sys/wait.h" +#if defined (ACE_HAS_ALLOCA_H) +# include /**/ <alloca.h> +#endif /* ACE_HAS_ALLOCA_H */ + #if !defined (ACE_LACKS_STDLIB_H) -# include /**/ <stdlib.h> +# include /**/ <stdlib.h> #endif /* !ACE_LACKS_STDLIB_H */ +// Place all additions (especially function declarations) within extern "C" {} +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + +#if defined (ACE_HAS_BROKEN_RANDR) + // The SunOS 5.4.X version of rand_r is inconsistent with the header + // files... + typedef u_int ACE_RANDR_TYPE; + int rand_r (ACE_RANDR_TYPE seed); +#else +# if defined (HPUX_10) + // HP-UX 10.x's stdlib.h (long *) doesn't match that man page (u_int *) + typedef long ACE_RANDR_TYPE; +# else + typedef u_int ACE_RANDR_TYPE; +# endif /* HPUX_10 */ +#endif /* ACE_HAS_BROKEN_RANDR */ + +#if defined (ACE_PSOS_SNARFS_HEADER_INFO) + // Header information snarfed from compiler provided header files + // that are not included because there is already an identically + // named file provided with pSOS, which does not have this info + // from compiler supplied header + int putenv (char *); // stdlib.h +#endif /* ACE_PSOS_SNARFS_HEADER_INFO */ + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #include "ace/post.h" -#endif /* ACE_OS_INCLUDE_STDLIB_H */ +#endif /* ACE_OS_INCLUDE_OS_STDLIB_H */ |