1 /* stdlib.h <ndf@linux.mit.edu> */ 2 #include <features.h> 3 #include <sys/types.h> 4 5 #ifndef __STDLIB_H 6 #define __STDLIB_H 7 8 /* Don't overwrite user definitions of NULL */ 9 #ifndef NULL 10 #define NULL ((void *) 0) 11 #endif 12 13 /* For program termination */ 14 #define EXIT_FAILURE 1 15 #define EXIT_SUCCESS 0 16 17 #include <malloc.h> 18 19 extern int rand __P ((void)); 20 extern void srand __P ((unsigned int seed)); 21 22 extern long strtol __P ((const char * nptr, char ** endptr, int base)); 23 extern unsigned long strtoul __P ((const char * nptr, 24 char ** endptr, int base)); 25 #ifndef __HAS_NO_FLOATS__ 26 extern double strtod __P ((const char * nptr, char ** endptr)); 27 extern double atof __P ((__const char *__nptr)); 28 #endif 29 30 extern long int atol __P ((__const char *__nptr)); 31 extern int atoi __P ((__const char *__nptr)); 32 33 /* Returned by `div'. */ 34 typedef struct 35 { 36 int quot; /* Quotient. */ 37 int rem; /* Remainder. */ 38 } div_t; 39 40 /* Returned by `ldiv'. */ 41 typedef struct 42 { 43 long int quot; /* Quotient. */ 44 long int rem; /* Remainder. */ 45 } ldiv_t; 46 47 48 extern char *getenv __P ((__const char *__name)); 49 extern char *mktemp __P ((char *__template)); 50 51 #endif /* __STDLIB_H */ 52