blob: 6b711d76f9d6723838e32b9b99445c2fe24d26d5 [file] [log] [blame]
Dan Albert6576a372016-09-21 01:16:13 -07001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_LEGACY_STRING_INLINES_H
18#define ANDROID_LEGACY_STRING_INLINES_H
19
20#include <string.h>
21#include <sys/cdefs.h>
22
23__BEGIN_DECLS
24
25#if __ANDROID_API__ < 21
26
27static __inline int strcoll_l(const char* _Nonnull s1, const char* _Nonnull s2,
28 locale_t l __unused) __purefunc {
29 return strcoll(s1, s2);
30}
31
32size_t strxfrm_l(char* __restrict dest, const char* _Nonnull __restrict src, size_t n,
33 locale_t l __unused) {
34 return strxfrm(dest, src, n);
35}
36
37#endif /* __ANDROID_API__ < 21 */
38
39__END_DECLS
40
41#endif /* ANDROID_LEGACY_STRING_INLINES_H */