1/*
2 * Copyright (C) 2017 The Android Open Source Project
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *  * Redistributions of source code must retain the above copyright
9 *    notice, this list of conditions and the following disclaimer.
10 *  * Redistributions in binary form must reproduce the above copyright
11 *    notice, this list of conditions and the following disclaimer in
12 *    the documentation and/or other materials provided with the
13 *    distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
18 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
19 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
22 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
29#include <string.h>
30
31#include "header_checks.h"
32
33static void string_h() {
34  MACRO(NULL);
35  TYPE(size_t);
36  TYPE(locale_t);
37
38  FUNCTION(memccpy, void* (*f)(void*, const void*, int, size_t));
39  FUNCTION(memchr, void* (*f)(const void*, int, size_t));
40  FUNCTION(memcmp, int (*f)(const void*, const void*, size_t));
41  FUNCTION(memcpy, void* (*f)(void*, const void*, size_t));
42  FUNCTION(memmove, void* (*f)(void*, const void*, size_t));
43  FUNCTION(memset, void* (*f)(void*, int, size_t));
44  FUNCTION(stpcpy, char* (*f)(char*, const char*));
45  FUNCTION(stpncpy, char* (*f)(char*, const char*, size_t));
46  FUNCTION(strcat, char* (*f)(char*, const char*));
47  FUNCTION(strchr, char* (*f)(const char*, int));
48  FUNCTION(strcmp, int (*f)(const char*, const char*));
49  FUNCTION(strcoll, int (*f)(const char*, const char*));
50  FUNCTION(strcoll_l, int (*f)(const char*, const char*, locale_t));
51  FUNCTION(strcpy, char* (*f)(char*, const char*));
52  FUNCTION(strcspn, size_t (*f)(const char*, const char*));
53  FUNCTION(strdup, char* (*f)(const char*));
54  FUNCTION(strerror, char* (*f)(int));
55  FUNCTION(strerror_l, char* (*f)(int, locale_t));
56  FUNCTION(strerror_r, int (*f)(int, char*, size_t));
57  FUNCTION(strlen, size_t (*f)(const char*));
58  FUNCTION(strncat, char* (*f)(char*, const char*, size_t));
59  FUNCTION(strncmp, int (*f)(const char*, const char*, size_t));
60  FUNCTION(strncpy, char* (*f)(char*, const char*, size_t));
61  FUNCTION(strndup, char* (*f)(const char*, size_t));
62  FUNCTION(strnlen, size_t (*f)(const char*, size_t));
63  FUNCTION(strpbrk, char* (*f)(const char*, const char*));
64  FUNCTION(strrchr, char* (*f)(const char*, int));
65  FUNCTION(strsignal, char* (*f)(int));
66  FUNCTION(strspn, size_t (*f)(const char*, const char*));
67  FUNCTION(strstr, char* (*f)(const char*, const char*));
68  FUNCTION(strtok, char* (*f)(char*, const char*));
69  FUNCTION(strtok_r, char* (*f)(char*, const char*, char**));
70  FUNCTION(strxfrm, size_t (*f)(char*, const char*, size_t));
71  FUNCTION(strxfrm_l, size_t (*f)(char*, const char*, size_t, locale_t));
72}
73