]>
git.saurik.com Git - apple/libplatform.git/blob - include/platform/string.h
c4d1c3f8f3e85103a8259f6e79c208663ed7110f
2 * Copyright (c) 2013 Apple Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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
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.
21 * @APPLE_LICENSE_HEADER_END@
24 #ifndef _PLATFORM_STRING_H_
25 #define _PLATFORM_STRING_H_
27 #include <sys/cdefs.h>
28 #include <Availability.h>
29 #include <TargetConditionals.h>
32 #include <sys/types.h>
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
47 /* Primitives used to implement C memory and string routines */
51 __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
)
53 _platform_bzero(void *s
, size_t n
);
55 __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
)
57 _platform_memchr(const void *s
, int c
, size_t n
);
59 __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
)
61 _platform_memcmp(const void *s1
, const void *s2
, size_t n
);
63 __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
)
65 _platform_memmove(void *dst
, const void *src
, size_t n
);
67 __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
)
69 _platform_memccpy(void *restrict dst
, const void *restrict src
, int c
, size_t n
);
71 __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
)
73 _platform_memset(void *b
, int c
, size_t len
);
75 __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
)
77 _platform_memset_pattern4(void *b
, const void *pattern4
, size_t len
);
79 __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
)
81 _platform_memset_pattern8(void *b
, const void *pattern8
, size_t len
);
83 __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
)
85 _platform_memset_pattern16(void *b
, const void *pattern16
, size_t len
);
87 __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
)
89 _platform_strchr(const char *s
, int c
);
91 __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
)
93 _platform_strcmp(const char *s1
, const char *s2
);
95 __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
)
97 _platform_strncmp(const char *s1
, const char *s2
, size_t n
);
101 #endif /* _PLATFORM_STRING_H_ */