blob: 5827a82dd6db8abcc326283260fa9c9b627110e1 [file] [log] [blame]
Elliott Hughes01339442014-02-20 18:04:58 -08001/*
2 * Copyright (C) 2014 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 _BIONIC_OPENBSD_COMPAT_H_included
18#define _BIONIC_OPENBSD_COMPAT_H_included
19
Dan Albertf79ee062014-07-01 22:41:50 +000020#include <sys/cdefs.h>
21
Elliott Hughesad41e9a2014-03-11 15:05:50 -070022#define __USE_BSD
Elliott Hughes01339442014-02-20 18:04:58 -080023
Elliott Hughesf3c73902014-04-18 10:29:16 -070024/* OpenBSD's <ctype.h> uses these names, which conflicted with stlport.
25 * Additionally, we changed the numeric/digit type from N to D for libcxx.
26 */
27#define _U _CTYPE_U
28#define _L _CTYPE_L
29#define _N _CTYPE_D
30#define _S _CTYPE_S
31#define _P _CTYPE_P
32#define _C _CTYPE_C
33#define _X _CTYPE_X
34#define _B _CTYPE_B
35
Elliott Hughesb4e099c2014-05-29 16:04:53 -070036/* OpenBSD has this, but we can't really implement it correctly on Linux. */
37#define issetugid() 0
38
Dan Albertf79ee062014-07-01 22:41:50 +000039/* LP32 NDK ctype.h contained references to these. */
Elliott Hughesa167eef2014-07-14 14:41:47 -070040__LIBC64_HIDDEN__ extern const short* _tolower_tab_;
41__LIBC64_HIDDEN__ extern const short* _toupper_tab_;
Dan Albertf79ee062014-07-01 22:41:50 +000042
Elliott Hughesa167eef2014-07-14 14:41:47 -070043__LIBC_HIDDEN__ extern struct atexit* __atexit;
44__LIBC_HIDDEN__ extern const char _C_ctype_[];
45__LIBC_HIDDEN__ extern const short _C_toupper_[];
46__LIBC_HIDDEN__ extern const short _C_tolower_[];
47__LIBC_HIDDEN__ extern char* __findenv(const char*, int, int*);
48__LIBC_HIDDEN__ extern char* _mktemp(char*);
49
50/* TODO: hide this when android_support.a is fixed (http://b/16298580).*/
51/*__LIBC_HIDDEN__*/ extern int __isthreaded;
Dmitriy Ivanov53c3c272014-07-11 12:59:16 -070052
Elliott Hughes01339442014-02-20 18:04:58 -080053#endif