xref: /titanic_50/usr/src/cmd/ssh/include/xmalloc.h (revision 47b374ff8413339e27ddb691c18d22ffe3482515)
17c478bd9Sstevel@tonic-gate /*	$OpenBSD: xmalloc.h,v 1.9 2002/06/19 00:27:55 deraadt Exp $	*/
27c478bd9Sstevel@tonic-gate 
37c478bd9Sstevel@tonic-gate #ifndef	_XMALLOC_H
47c478bd9Sstevel@tonic-gate #define	_XMALLOC_H
57c478bd9Sstevel@tonic-gate 
67c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
77c478bd9Sstevel@tonic-gate 
87c478bd9Sstevel@tonic-gate #ifdef __cplusplus
97c478bd9Sstevel@tonic-gate extern "C" {
107c478bd9Sstevel@tonic-gate #endif
117c478bd9Sstevel@tonic-gate 
127c478bd9Sstevel@tonic-gate 
137c478bd9Sstevel@tonic-gate /*
147c478bd9Sstevel@tonic-gate  * Author: Tatu Ylonen <ylo@cs.hut.fi>
157c478bd9Sstevel@tonic-gate  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
167c478bd9Sstevel@tonic-gate  *                    All rights reserved
177c478bd9Sstevel@tonic-gate  * Created: Mon Mar 20 22:09:17 1995 ylo
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * Versions of malloc and friends that check their results, and never return
207c478bd9Sstevel@tonic-gate  * failure (they call fatal if they encounter an error).
217c478bd9Sstevel@tonic-gate  *
227c478bd9Sstevel@tonic-gate  * As far as I am concerned, the code I have written for this software
237c478bd9Sstevel@tonic-gate  * can be used freely for any purpose.  Any derived versions of this
247c478bd9Sstevel@tonic-gate  * software must be clearly marked as such, and if the derived work is
257c478bd9Sstevel@tonic-gate  * incompatible with the protocol description in the RFC file, it must be
267c478bd9Sstevel@tonic-gate  * called by a name other than "ssh" or "Secure Shell".
277c478bd9Sstevel@tonic-gate  */
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate void	*xmalloc(size_t);
30*47b374ffSjp161948 void	*xcalloc(size_t, size_t);
317c478bd9Sstevel@tonic-gate void	*xrealloc(void *, size_t);
327c478bd9Sstevel@tonic-gate void     xfree(void *);
337c478bd9Sstevel@tonic-gate char	*xstrdup(const char *);
347c478bd9Sstevel@tonic-gate 
357c478bd9Sstevel@tonic-gate #ifdef __cplusplus
367c478bd9Sstevel@tonic-gate }
377c478bd9Sstevel@tonic-gate #endif
387c478bd9Sstevel@tonic-gate 
397c478bd9Sstevel@tonic-gate #endif /* _XMALLOC_H */
40