mirror of
https://github.com/openssh/libopenssh
synced 2026-04-19 03:06:31 +00:00
38 lines
1.2 KiB
C
38 lines
1.2 KiB
C
/*
|
|
* Copyright (c) 2012 Damien Miller <djm@mindrot.org>
|
|
*
|
|
* Permission to use, copy, modify, and distribute this software for any
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
* copyright notice and this permission notice appear in all copies.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
|
|
#ifndef _LEAKMALLOC_H
|
|
#define _LEAKMALLOC_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
char *leak_strdup(const char *s);
|
|
void *leak_malloc(size_t len);
|
|
void *leak_calloc(size_t nmemb, size_t size);
|
|
void *leak_realloc(void *s, size_t len);
|
|
void leak_free(void *s);
|
|
|
|
#ifndef LEAKMALLOC_NO_REDIRECT
|
|
#define malloc leak_malloc
|
|
#define strdup leak_strdup
|
|
#define calloc leak_calloc
|
|
#define realloc leak_realloc
|
|
#define free leak_free
|
|
#endif /* LEAKMALLOC_NO_REDIRECT */
|
|
|
|
#endif /* _LEAKMALLOC_H */
|
|
|