1 /****************************************************************************** 2 Copyright (c) 1992, 1995, 1996 Xerox Corporation. All rights reserved. 3 Portions of this code were written by Stephen White, aka ghond. 4 Use and copying of this software and preparation of derivative works based 5 upon this software are permitted. Any distribution of this software or 6 derivative works must comply with all applicable United States export 7 control laws. This software is made available AS IS, and Xerox Corporation 8 makes no warranty about the software, its performance or its conformity to 9 any specification. Any person obtaining a copy of this software is requested 10 to send their name and post office or electronic mail address to: 11 Pavel Curtis 12 Xerox PARC 13 3333 Coyote Hill Rd. 14 Palo Alto, CA 94304 15 Pavel@Xerox.Com 16 *****************************************************************************/ 17 18 #ifndef My_Stdlib_H 19 #define My_Stdlib_H 1 20 21 #include "config.h" 22 23 #if HAVE_STDLIB_H 24 25 #include <stdlib.h> 26 27 #if NEED_MALLOC_H 28 #include <malloc.h> 29 #endif 30 31 #else /* !HAVE_STDLIB_H */ 32 33 #include "my-types.h" 34 35 extern void abort(void); 36 extern int abs(int); 37 extern void exit(int); 38 extern void free(void *); 39 extern void *malloc(size_t); 40 extern int rand(void); 41 extern void *realloc(void *, size_t); 42 extern void srand(unsigned); 43 44 #endif /* !HAVE_STDLIB_H */ 45 46 #if NDECL_STRTOD 47 extern double strtod(const char *, char **); 48 #endif 49 50 #if NDECL_STRTOL 51 extern long strtol(const char *, char **, int); 52 #endif 53 54 #if HAVE_STRTOUL 55 # if NDECL_STRTOUL 56 extern unsigned long strtoul(const char *, char **, int); 57 # endif 58 #else 59 # define strtoul strtol 60 #endif 61 62 #if NDECL_RANDOM 63 extern int random(void); 64 #endif 65 66 #if NDECL_SRANDOM 67 extern int srandom(unsigned); 68 #endif 69 70 #endif 71 72 /* 73 * $Log: my-stdlib.h,v $ 74 * Revision 1.3 1998/12/14 13:18:18 nop 75 * Merge UNSAFE_OPTS (ref fixups); fix Log tag placement to fit CVS whims 76 * 77 * Revision 1.2 1997/03/03 04:18:56 nop 78 * GNU Indent normalization 79 * 80 * Revision 1.1.1.1 1997/03/03 03:45:05 nop 81 * LambdaMOO 1.8.0p5 82 * 83 * Revision 2.1 1996/02/08 06:01:42 pavel 84 * Updated copyright notice for 1996. Added strtod(). Release 1.8.0beta1. 85 * 86 * Revision 2.0 1995/11/30 04:58:54 pavel 87 * New baseline version, corresponding to release 1.8.0alpha1. 88 * 89 * Revision 1.10 1993/08/04 01:16:15 pavel 90 * Added default definition for strtoul(), as a synonym for strtol(). 91 * 92 * Revision 1.9 1993/08/04 00:27:53 pavel 93 * Added declaration for strtoul(). 94 * 95 * Revision 1.8 1993/08/04 00:13:30 pavel 96 * Added declarations of random() and srandom(), moved from random.h. 97 * 98 * Revision 1.7 1992/10/23 23:03:47 pavel 99 * Added copyright notice. 100 * 101 * Revision 1.6 1992/10/23 19:31:29 pavel 102 * Added protection against multiple inclusions, for systems that aren't 103 * clever enough to do that for themselves. 104 * Added declaration of realloc(). 105 * Added support for NEED_MALLOC_H. 106 * 107 * Revision 1.5 1992/10/21 03:02:35 pavel 108 * Converted to use new automatic configuration system. 109 * 110 * Revision 1.4 1992/10/17 20:39:19 pavel 111 * Removed apparently-useless declaration of exit()... (*sigh*) 112 * 113 * Revision 1.3 1992/09/27 19:25:12 pavel 114 * Added declaration of exit() for SunOS. 115 * 116 * Revision 1.2 1992/07/30 00:33:28 pavel 117 * Add support for compiling on RISC/os 4.52 and NonStop-UX A22. 118 * 119 * Revision 1.1 1992/07/20 23:23:12 pavel 120 * Initial RCS-controlled version. 121 */ 122