1c66bbc91SGabor Kovesdan 2c66bbc91SGabor Kovesdan /*- 3*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 41de7b4b8SPedro F. Giffuni * 5c66bbc91SGabor Kovesdan * Copyright (C) 2009 Gabor Kovesdan <gabor@FreeBSD.org> 6c859c6ddSGabor Kovesdan * Copyright (C) 2012 Oleg Moskalenko <mom040267@gmail.com> 7c66bbc91SGabor Kovesdan * All rights reserved. 8c66bbc91SGabor Kovesdan * 9c66bbc91SGabor Kovesdan * Redistribution and use in source and binary forms, with or without 10c66bbc91SGabor Kovesdan * modification, are permitted provided that the following conditions 11c66bbc91SGabor Kovesdan * are met: 12c66bbc91SGabor Kovesdan * 1. Redistributions of source code must retain the above copyright 13c66bbc91SGabor Kovesdan * notice, this list of conditions and the following disclaimer. 14c66bbc91SGabor Kovesdan * 2. Redistributions in binary form must reproduce the above copyright 15c66bbc91SGabor Kovesdan * notice, this list of conditions and the following disclaimer in the 16c66bbc91SGabor Kovesdan * documentation and/or other materials provided with the distribution. 17c66bbc91SGabor Kovesdan * 18c66bbc91SGabor Kovesdan * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19c66bbc91SGabor Kovesdan * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20c66bbc91SGabor Kovesdan * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21c66bbc91SGabor Kovesdan * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 22c66bbc91SGabor Kovesdan * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23c66bbc91SGabor Kovesdan * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24c66bbc91SGabor Kovesdan * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25c66bbc91SGabor Kovesdan * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26c66bbc91SGabor Kovesdan * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27c66bbc91SGabor Kovesdan * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28c66bbc91SGabor Kovesdan * SUCH DAMAGE. 29c66bbc91SGabor Kovesdan */ 30c66bbc91SGabor Kovesdan 31c66bbc91SGabor Kovesdan #if !defined(__SORT_MEM_H__) 32c66bbc91SGabor Kovesdan #define __SORT_MEM_H__ 33c66bbc91SGabor Kovesdan 34c66bbc91SGabor Kovesdan #include <errno.h> 35c66bbc91SGabor Kovesdan #include <stdbool.h> 36c66bbc91SGabor Kovesdan #include <stdlib.h> 37c66bbc91SGabor Kovesdan 38c66bbc91SGabor Kovesdan /* 39c66bbc91SGabor Kovesdan * mem.c 40c66bbc91SGabor Kovesdan */ 41a312f3e7SBaptiste Daroussin void *sort_calloc(size_t, size_t); 42c66bbc91SGabor Kovesdan void *sort_malloc(size_t); 43c66bbc91SGabor Kovesdan void sort_free(const void *ptr); 44c66bbc91SGabor Kovesdan void *sort_realloc(void *, size_t); 45c66bbc91SGabor Kovesdan char *sort_strdup(const char *); 46c66bbc91SGabor Kovesdan 47c66bbc91SGabor Kovesdan #endif /* __SORT_MEM_H__ */ 48