diff options
| author | Dan Albert <danalbert@google.com> | 2014-06-16 20:15:41 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-06-16 15:34:52 +0000 |
| commit | a217a0cdb3ff78f6b59d64fd4356f87643ad9d1e (patch) | |
| tree | 8066a42ec9e07537607254deb91195fb9d102a88 | |
| parent | 4fb0d4fb312ed696081200e65ce9bf643928e5e6 (diff) | |
| parent | 891dedb935b50f1abb39eedfe33049a1e49283cb (diff) | |
| download | bionic-a217a0cdb3ff78f6b59d64fd4356f87643ad9d1e.zip bionic-a217a0cdb3ff78f6b59d64fd4356f87643ad9d1e.tar.gz bionic-a217a0cdb3ff78f6b59d64fd4356f87643ad9d1e.tar.bz2 | |
Merge "libc: Fix 'index' symbol export."
| -rw-r--r-- | libc/arch-arm/arm.mk | 1 | ||||
| -rw-r--r-- | libc/arch-mips/mips.mk | 1 | ||||
| -rw-r--r-- | libc/arch-x86/atom/atom.mk | 1 | ||||
| -rw-r--r-- | libc/arch-x86/atom/string/sse2-index-atom.S | 32 | ||||
| -rw-r--r-- | libc/arch-x86/generic/generic.mk | 1 | ||||
| -rw-r--r-- | libc/arch-x86/silvermont/silvermont.mk | 1 | ||||
| -rw-r--r-- | libc/bionic/index.cpp | 35 | ||||
| -rw-r--r-- | libc/bionic/ndk_cruft.cpp | 6 |
8 files changed, 6 insertions, 72 deletions
diff --git a/libc/arch-arm/arm.mk b/libc/arch-arm/arm.mk index 26690ce..38301bc 100644 --- a/libc/arch-arm/arm.mk +++ b/libc/arch-arm/arm.mk @@ -12,7 +12,6 @@ libc_bionic_src_files_arm := \ bionic/mmap.cpp libc_common_src_files_arm += \ - bionic/index.cpp \ bionic/memchr.c \ bionic/memrchr.c \ bionic/strchr.cpp \ diff --git a/libc/arch-mips/mips.mk b/libc/arch-mips/mips.mk index 529e284..fe5e24d 100644 --- a/libc/arch-mips/mips.mk +++ b/libc/arch-mips/mips.mk @@ -12,7 +12,6 @@ libc_bionic_src_files_mips += \ bionic/mmap.cpp libc_common_src_files_mips += \ - bionic/index.cpp \ bionic/memchr.c \ bionic/memcmp.c \ bionic/memmove.c \ diff --git a/libc/arch-x86/atom/atom.mk b/libc/arch-x86/atom/atom.mk index abe940d..3f28fb2 100644 --- a/libc/arch-x86/atom/atom.mk +++ b/libc/arch-x86/atom/atom.mk @@ -1,6 +1,5 @@ libc_bionic_src_files_x86 += \ arch-x86/atom/string/sse2-bzero-atom.S \ - arch-x86/atom/string/sse2-index-atom.S \ arch-x86/atom/string/sse2-memchr-atom.S \ arch-x86/atom/string/sse2-memrchr-atom.S \ arch-x86/atom/string/sse2-memset-atom.S \ diff --git a/libc/arch-x86/atom/string/sse2-index-atom.S b/libc/arch-x86/atom/string/sse2-index-atom.S deleted file mode 100644 index d51e1d4..0000000 --- a/libc/arch-x86/atom/string/sse2-index-atom.S +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright (c) 2011, Intel Corporation -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. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - -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. -*/ - -#define strchr index -#include "sse2-strchr-atom.S" diff --git a/libc/arch-x86/generic/generic.mk b/libc/arch-x86/generic/generic.mk index 62e81b7..4aee5dc 100644 --- a/libc/arch-x86/generic/generic.mk +++ b/libc/arch-x86/generic/generic.mk @@ -1,5 +1,4 @@ libc_bionic_src_files_x86 += \ - arch-x86/atom/string/sse2-index-atom.S \ arch-x86/atom/string/sse2-memchr-atom.S \ arch-x86/atom/string/sse2-memrchr-atom.S \ arch-x86/atom/string/sse2-strchr-atom.S \ diff --git a/libc/arch-x86/silvermont/silvermont.mk b/libc/arch-x86/silvermont/silvermont.mk index 9640a24..176bee3 100644 --- a/libc/arch-x86/silvermont/silvermont.mk +++ b/libc/arch-x86/silvermont/silvermont.mk @@ -17,7 +17,6 @@ libc_bionic_src_files_x86 += \ arch-x86/atom/string/sse2-memrchr-atom.S \ arch-x86/atom/string/sse2-strchr-atom.S \ arch-x86/atom/string/sse2-strrchr-atom.S \ - arch-x86/atom/string/sse2-index-atom.S \ arch-x86/atom/string/sse2-strnlen-atom.S \ arch-x86/atom/string/sse2-wcschr-atom.S \ arch-x86/atom/string/sse2-wcsrchr-atom.S \ diff --git a/libc/bionic/index.cpp b/libc/bionic/index.cpp deleted file mode 100644 index cc22d81..0000000 --- a/libc/bionic/index.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -#undef _FORTIFY_SOURCE -#include <string.h> - -char* index(const char* p, int ch) { - return __strchr_chk(p, ch, __BIONIC_FORTIFY_UNKNOWN_SIZE); -} diff --git a/libc/bionic/ndk_cruft.cpp b/libc/bionic/ndk_cruft.cpp index 1ae388b..e3e640a 100644 --- a/libc/bionic/ndk_cruft.cpp +++ b/libc/bionic/ndk_cruft.cpp @@ -36,6 +36,7 @@ #include <signal.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <sys/resource.h> #include <sys/syscall.h> #include <sys/time.h> @@ -296,4 +297,9 @@ extern "C" int ftime(struct timeb* tb) { return 0; } +// This was removed from POSIX 2008. +extern "C" char* index(const char* str, int ch) { + return strchr(str, ch); +} + #endif |
