]>
Commit | Line | Data |
---|---|---|
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) | |
52 | void | |
53 | _platform_bzero(void *s, size_t n); | |
54 | ||
55 | __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0) | |
56 | void * | |
57 | _platform_memchr(const void *s, int c, size_t n); | |
58 | ||
59 | __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0) | |
60 | int | |
61 | _platform_memcmp(const void *s1, const void *s2, size_t n); | |
62 | ||
63 | __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0) | |
64 | void * | |
65 | _platform_memmove(void *dst, const void *src, size_t n); | |
66 | ||
67 | __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0) | |
68 | void * | |
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) | |
72 | void * | |
73 | _platform_memset(void *b, int c, size_t len); | |
74 | ||
75 | __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0) | |
76 | void | |
77 | _platform_memset_pattern4(void *b, const void *pattern4, size_t len); | |
78 | ||
79 | __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0) | |
80 | void | |
81 | _platform_memset_pattern8(void *b, const void *pattern8, size_t len); | |
82 | ||
83 | __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0) | |
84 | void | |
85 | _platform_memset_pattern16(void *b, const void *pattern16, size_t len); | |
86 | ||
87 | __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0) | |
88 | char * | |
89 | _platform_strchr(const char *s, int c); | |
90 | ||
91 | __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0) | |
92 | int | |
93 | _platform_strcmp(const char *s1, const char *s2); | |
94 | ||
95 | __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0) | |
96 | int | |
97 | _platform_strncmp(const char *s1, const char *s2, size_t n); | |
98 | ||
99 | __END_DECLS | |
100 | ||
101 | #endif /* _PLATFORM_STRING_H_ */ |