1 /* @(#)stdlib.h 1.12 21/07/19 Copyright 1996-2021 J. Schilling */ 2 /* 3 * Definitions for stdlib 4 * 5 * Copyright (c) 1996-2021 J. Schilling 6 */ 7 /* 8 * The contents of this file are subject to the terms of the 9 * Common Development and Distribution License, Version 1.0 only 10 * (the "License"). You may not use this file except in compliance 11 * with the License. 12 * 13 * See the file CDDL.Schily.txt in this distribution for details. 14 * A copy of the CDDL is also available via the Internet at 15 * http://www.opensource.org/licenses/cddl1.txt 16 * 17 * When distributing Covered Code, include this CDDL HEADER in each 18 * file and include the License file CDDL.Schily.txt from this distribution. 19 */ 20 21 #ifndef _SCHILY_STDLIB_H 22 #define _SCHILY_STDLIB_H 23 24 #ifndef _SCHILY_MCONFIG_H 25 #include <schily/mconfig.h> 26 #endif 27 28 #ifdef HAVE_STDLIB_H 29 #ifndef _INCL_STDLIB_H 30 #include <stdlib.h> 31 #define _INCL_STDLIB_H 32 #endif 33 #endif /* HAVE_STDLIB_H */ 34 35 36 #ifdef HAVE_POSIX_MALLOC_H /* Haiku */ 37 #ifndef _INCL_POSIX_MALLOC_H 38 #include <posix/malloc.h> 39 #define _INCL_POSIX_MALLOC_H 40 #endif 41 #endif /* HAVE_POSIX_MALLOC_H */ 42 43 #ifdef __cplusplus 44 extern "C" { 45 #endif 46 47 #if !defined(_INCL_STDLIB_H) && !defined(_INCL_POSIX_MALLOC_H) 48 extern char *malloc(); 49 extern char *realloc(); 50 #endif 51 52 #if defined(OS390) || defined(__MVS__) 53 extern void *valloc __PR((size_t)); 54 #endif 55 56 #ifndef _INCL_STDLIB_H 57 extern double atof(); 58 #endif 59 60 #ifdef __cplusplus 61 } 62 #endif 63 64 65 66 #ifndef EXIT_FAILURE 67 #define EXIT_FAILURE 1 68 #endif 69 #ifndef EXIT_SUCCESS 70 #define EXIT_SUCCESS 0 71 #endif 72 #ifndef RAND_MAX 73 #define RAND_MAX 32767 74 #endif 75 76 #endif /* _SCHILY_STDLIB_H */ 77