Blame


1 957c2372 2019-11-14 martijn /* $Id: openbsd-compat.h,v 1.51 2010/10/07 10:25:29 djm Exp $ */
2 957c2372 2019-11-14 martijn
3 957c2372 2019-11-14 martijn /*
4 957c2372 2019-11-14 martijn * Copyright (c) 1999-2003 Damien Miller. All rights reserved.
5 957c2372 2019-11-14 martijn * Copyright (c) 2003 Ben Lindstrom. All rights reserved.
6 957c2372 2019-11-14 martijn * Copyright (c) 2002 Tim Rice. All rights reserved.
7 957c2372 2019-11-14 martijn *
8 957c2372 2019-11-14 martijn * Redistribution and use in source and binary forms, with or without
9 957c2372 2019-11-14 martijn * modification, are permitted provided that the following conditions
10 957c2372 2019-11-14 martijn * are met:
11 957c2372 2019-11-14 martijn * 1. Redistributions of source code must retain the above copyright
12 957c2372 2019-11-14 martijn * notice, this list of conditions and the following disclaimer.
13 957c2372 2019-11-14 martijn * 2. Redistributions in binary form must reproduce the above copyright
14 957c2372 2019-11-14 martijn * notice, this list of conditions and the following disclaimer in the
15 957c2372 2019-11-14 martijn * documentation and/or other materials provided with the distribution.
16 957c2372 2019-11-14 martijn *
17 957c2372 2019-11-14 martijn * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 957c2372 2019-11-14 martijn * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 957c2372 2019-11-14 martijn * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 957c2372 2019-11-14 martijn * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 957c2372 2019-11-14 martijn * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 957c2372 2019-11-14 martijn * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 957c2372 2019-11-14 martijn * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 957c2372 2019-11-14 martijn * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 957c2372 2019-11-14 martijn * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 957c2372 2019-11-14 martijn * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 957c2372 2019-11-14 martijn */
28 957c2372 2019-11-14 martijn #include <stdlib.h>
29 957c2372 2019-11-14 martijn
30 8224686b 2019-11-14 martijn #ifdef NEED_EXPLICIT_BZERO
31 8224686b 2019-11-14 martijn void explicit_bzero(void *p, size_t n);
32 8224686b 2019-11-14 martijn #endif
33 957c2372 2019-11-14 martijn #ifdef NEED_RECALLOCARRAY
34 957c2372 2019-11-14 martijn void *recallocarray(void *, size_t, size_t, size_t);
35 957c2372 2019-11-14 martijn #endif
36 8224686b 2019-11-14 martijn #ifdef NEED_REALLOCARRAY
37 8224686b 2019-11-14 martijn void *reallocarray(void *, size_t, size_t);
38 8224686b 2019-11-14 martijn #endif
39 957c2372 2019-11-14 martijn #ifdef NEED_STRLCAT
40 957c2372 2019-11-14 martijn size_t strlcat(char *dst, const char *src, size_t size);
41 957c2372 2019-11-14 martijn #endif
42 957c2372 2019-11-14 martijn #ifdef NEED_STRLCPY
43 957c2372 2019-11-14 martijn size_t strlcpy(char *dst, const char *src, size_t size);
44 957c2372 2019-11-14 martijn #endif
45 957c2372 2019-11-14 martijn #ifdef NEED_STRTONUM
46 957c2372 2019-11-14 martijn long long strtonum(const char *nptr, long long minval, long long maxval, const char **errstr);
47 957c2372 2019-11-14 martijn #endif