1 /* 2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * All rights reserved 5 * Versions of malloc and friends that check their results, and never return 6 * failure (they call fatal if they encounter an error). 7 * 8 * As far as I am concerned, the code I have written for this software 9 * can be used freely for any purpose. Any derived versions of this 10 * software must be clearly marked as such, and if the derived work is 11 * incompatible with the protocol description in the RFC file, it must be 12 * called by a name other than "ssh" or "Secure Shell". 13 */ 14 15 #ifndef _SYMON_LIB_XMALLOC_H 16 #define _SYMON_LIB_XMALLOC_H 17 18 #include <sys/types.h> 19 20 /* Like malloc and friends, but these call fatal if something breaks */ 21 __BEGIN_DECLS 22 void *xmalloc(size_t); 23 void *xrealloc(void *, size_t); 24 void xfree(void *); 25 char *xstrdup(const char *); 26 __END_DECLS 27 #endif /* _SYMON_LIB_XMALLOC_H */ 28