xref: /titanic_50/usr/src/cmd/ssh/include/xmalloc.h (revision 7c2fbfb345896881c631598ee3852ce9ce33fb07)
1 /*	$OpenBSD: xmalloc.h,v 1.9 2002/06/19 00:27:55 deraadt Exp $	*/
2 
3 #ifndef	_XMALLOC_H
4 #define	_XMALLOC_H
5 
6 #pragma ident	"%Z%%M%	%I%	%E% SMI"
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 
13 /*
14  * Author: Tatu Ylonen <ylo@cs.hut.fi>
15  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
16  *                    All rights reserved
17  * Created: Mon Mar 20 22:09:17 1995 ylo
18  *
19  * Versions of malloc and friends that check their results, and never return
20  * failure (they call fatal if they encounter an error).
21  *
22  * As far as I am concerned, the code I have written for this software
23  * can be used freely for any purpose.  Any derived versions of this
24  * software must be clearly marked as such, and if the derived work is
25  * incompatible with the protocol description in the RFC file, it must be
26  * called by a name other than "ssh" or "Secure Shell".
27  */
28 
29 void	*xmalloc(size_t);
30 void	*xcalloc(size_t, size_t);
31 void	*xrealloc(void *, size_t);
32 void     xfree(void *);
33 char	*xstrdup(const char *);
34 
35 #ifdef __cplusplus
36 }
37 #endif
38 
39 #endif /* _XMALLOC_H */
40