]> git.saurik.com Git - apple/libplatform.git/blame - include/platform/string.h
libplatform-126.1.2.tar.gz
[apple/libplatform.git] / include / platform / string.h
CommitLineData
ada7c492
A
1/*
2 * Copyright (c) 2013 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24#ifndef _PLATFORM_STRING_H_
25#define _PLATFORM_STRING_H_
26
27#include <sys/cdefs.h>
28#include <Availability.h>
29#include <TargetConditionals.h>
30
31#include <stdint.h>
32#include <sys/types.h>
33
34#define _PLATFORM_OPTIMIZED_BZERO 0
35#define _PLATFORM_OPTIMIZED_MEMCCPY 0
36#define _PLATFORM_OPTIMIZED_MEMCHR 0
37#define _PLATFORM_OPTIMIZED_MEMCMP 0
38#define _PLATFORM_OPTIMIZED_MEMMOVE 0
39#define _PLATFORM_OPTIMIZED_MEMSET 0
40#define _PLATFORM_OPTIMIZED_MEMSET_PATTERN4 0
41#define _PLATFORM_OPTIMIZED_MEMSET_PATTERN8 0
42#define _PLATFORM_OPTIMIZED_MEMSET_PATTERN16 0
43#define _PLATFORM_OPTIMIZED_STRCHR 0
44#define _PLATFORM_OPTIMIZED_STRCMP 0
45#define _PLATFORM_OPTIMIZED_STRNCMP 0
46
47/* Primitives used to implement C memory and string routines */
48
49__BEGIN_DECLS
50
51__OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0)
52void
53_platform_bzero(void *s, size_t n);
54
55__OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0)
56void *
57_platform_memchr(const void *s, int c, size_t n);
58
59__OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0)
60int
61_platform_memcmp(const void *s1, const void *s2, size_t n);
62
63__OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0)
64void *
65_platform_memmove(void *dst, const void *src, size_t n);
66
67__OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0)
68void *
69_platform_memccpy(void *restrict dst, const void *restrict src, int c, size_t n);
70
71__OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0)
72void *
73_platform_memset(void *b, int c, size_t len);
74
75__OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0)
76void
77_platform_memset_pattern4(void *b, const void *pattern4, size_t len);
78
79__OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0)
80void
81_platform_memset_pattern8(void *b, const void *pattern8, size_t len);
82
83__OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0)
84void
85_platform_memset_pattern16(void *b, const void *pattern16, size_t len);
86
87__OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0)
88char *
89_platform_strchr(const char *s, int c);
90
91__OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0)
92int
93_platform_strcmp(const char *s1, const char *s2);
94
95__OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0)
96int
97_platform_strncmp(const char *s1, const char *s2, size_t n);
98
99__END_DECLS
100
101#endif /* _PLATFORM_STRING_H_ */