diff options
author | Elliott Hughes <enh@google.com> | 2017-10-12 15:37:46 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2017-10-12 15:37:46 -0700 |
commit | d169850bafef052db4a33f9a452e655ac858c38b (patch) | |
tree | af79b7aa1e3a49ee88d254da630979a78fde5120 /sources | |
parent | 87e3b4db0522ac656a5d5d66792d3e6dc86e5c73 (diff) | |
download | ndk-d169850bafef052db4a33f9a452e655ac858c38b.tar.gz |
Make iswblank a static inline.
This way it won't affect anyone who's targeting a new enough API level.
Bug: https://issuetracker.google.com/64451478
Test: python checkbuild.py
Change-Id: I64ca915a4f2f7cc98242018fa191f084e321fbca
Diffstat (limited to 'sources')
-rw-r--r-- | sources/android/support/Android.mk | 1 | ||||
-rw-r--r-- | sources/android/support/include/wctype.h | 3 | ||||
-rw-r--r-- | sources/android/support/src/iswblank.cpp | 33 |
3 files changed, 2 insertions, 35 deletions
diff --git a/sources/android/support/Android.mk b/sources/android/support/Android.mk index d5479bf26..56315c61c 100644 --- a/sources/android/support/Android.mk +++ b/sources/android/support/Android.mk @@ -117,7 +117,6 @@ android_support_sources := \ $(BIONIC_PATH)/libm/upstream-freebsd/lib/msun/src/s_sin.c \ $(BIONIC_PATH)/libm/upstream-freebsd/lib/msun/src/s_tan.c \ $(BIONIC_PATH)/libm/upstream-freebsd/lib/msun/src/s_tanh.c \ - src/iswblank.cpp \ src/posix_memalign.cpp \ src/swprintf.cpp \ src/wcstox.cpp \ diff --git a/sources/android/support/include/wctype.h b/sources/android/support/include/wctype.h index 9801811a5..31d015d12 100644 --- a/sources/android/support/include/wctype.h +++ b/sources/android/support/include/wctype.h @@ -34,7 +34,8 @@ __BEGIN_DECLS #if __ANDROID_API__ < __ANDROID_API_L__ -int iswblank(wint_t); +#include <ctype.h> +static __inline int iswblank(wint_t ch) { return isblank(ch); } #endif __END_DECLS diff --git a/sources/android/support/src/iswblank.cpp b/sources/android/support/src/iswblank.cpp deleted file mode 100644 index f51d1886a..000000000 --- a/sources/android/support/src/iswblank.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#include <ctype.h> -#include <wctype.h> - -int iswblank(wint_t ch) { - return isblank(ch); -} |