]> git.ipfire.org Git - thirdparty/squid.git/blob - compat/memrchr.h
SourceFormat Enforcement
[thirdparty/squid.git] / compat / memrchr.h
1 /*
2 * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 /*
10 * Copyright (c) 2007 Todd C. Miller <Todd.Miller@courtesan.com>
11 *
12 * Permission to use, copy, modify, and distribute this software for any
13 * purpose with or without fee is hereby granted, provided that the above
14 * copyright notice and this permission notice appear in all copies.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
17 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
18 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
19 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
20 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
21 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
22 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 */
24
25 #ifndef SQUID_COMPAT_MEMRCHR_H
26 #define SQUID_COMPAT_MEMRCHR_H
27
28 #if !HAVE_MEMRCHR
29
30 /**
31 * Reverse memchr()
32 * Find the last occurrence of 'c' in the buffer 's' of size 'n'.
33 */
34 void *memrchr(const void *s, int c, size_t n);
35
36 #endif
37 #endif /* SQUID_COMPAT_MEMRCHR_H */
38