diff --git a/ndk/sources/android/libportable/Android.mk b/ndk/sources/android/libportable/Android.mk index 2f254212d..a0593be6a 100644 --- a/ndk/sources/android/libportable/Android.mk +++ b/ndk/sources/android/libportable/Android.mk @@ -67,23 +67,15 @@ endif ifeq ($(TARGET_ARCH),arm) libportable_arch_src_files += \ - arch-arm/epoll.c \ - arch-arm/errno.c \ - arch-arm/socket.c \ - arch-arm/sockopt.c \ - arch-arm/stat.c \ arch-arm/unwind.c endif ifeq ($(TARGET_ARCH),x86) libportable_arch_src_files += \ arch-x86/epoll.c \ - arch-x86/errno.c \ arch-x86/fcntl.c \ arch-x86/ioctl.c \ arch-x86/open.c \ - arch-x86/socket.c \ - arch-x86/sockopt.c \ arch-x86/stat.c endif diff --git a/ndk/sources/android/libportable/arch-arm/epoll.c b/ndk/sources/android/libportable/arch-arm/epoll.c deleted file mode 100644 index ef75695df..000000000 --- a/ndk/sources/android/libportable/arch-arm/epoll.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2012, The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -int WRAP(epoll_ctl)(int epfd, int op, int fd, struct epoll_event *event) -{ - return REAL(epoll_ctl)(epfd, op, fd, event); -} - -int WRAP(epoll_wait)(int epfd, struct epoll_event *events, int max, int timeout) -{ - return REAL(epoll_wait)(epfd, events, max, timeout); -} - diff --git a/ndk/sources/android/libportable/arch-arm/errno.c b/ndk/sources/android/libportable/arch-arm/errno.c deleted file mode 100644 index 776b12edc..000000000 --- a/ndk/sources/android/libportable/arch-arm/errno.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2012, The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -extern volatile int* REAL(__errno)(void); -volatile int* WRAP(__errno)() -{ - return REAL(__errno)(); -} diff --git a/ndk/sources/android/libportable/arch-arm/socket.c b/ndk/sources/android/libportable/arch-arm/socket.c deleted file mode 100644 index 72211c94b..000000000 --- a/ndk/sources/android/libportable/arch-arm/socket.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2012, The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include -#include - -int WRAP(socket)(int domain, int type, int protocol) { - return REAL(socket)(domain, type, protocol); -} diff --git a/ndk/sources/android/libportable/arch-arm/sockopt.c b/ndk/sources/android/libportable/arch-arm/sockopt.c deleted file mode 100644 index a9d208476..000000000 --- a/ndk/sources/android/libportable/arch-arm/sockopt.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2012, The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include - -extern int setsockopt(int, int, int, const void *, socklen_t); -int WRAP(setsockopt)(int s, int level, int optname, const void *optval, socklen_t optlen) -{ - return REAL(setsockopt)(s, level, optname, optval, optlen); -} - -extern int getsockopt (int, int, int, void *, socklen_t *); -int WRAP(getsockopt)(int s, int level, int optname, void *optval, socklen_t *optlen) -{ - return REAL(getsockopt)(s, level, optname, optval, optlen); -} diff --git a/ndk/sources/android/libportable/arch-arm/stat.c b/ndk/sources/android/libportable/arch-arm/stat.c deleted file mode 100644 index be9ca6276..000000000 --- a/ndk/sources/android/libportable/arch-arm/stat.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2012, The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -/* Note: The Portable Header will define stat to stat_portable */ -int WRAP(stat)(const char *path, struct stat_portable *s) -{ - return REAL(stat)(path, s); -} - -int WRAP(fstat)(int fd, struct stat_portable *s) -{ - return REAL(fstat)(fd, s); -} - -int WRAP(lstat)(const char *path, struct stat_portable *s) -{ - return REAL(lstat)(path, s); -} - -int WRAP(fstatat)(int dirfd, const char *path, struct stat_portable *s, int flags) -{ - return REAL(fstatat)(dirfd, path, s, flags); -} diff --git a/ndk/sources/android/libportable/arch-x86/errno.c b/ndk/sources/android/libportable/arch-x86/errno.c deleted file mode 100644 index 776b12edc..000000000 --- a/ndk/sources/android/libportable/arch-x86/errno.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2012, The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -extern volatile int* REAL(__errno)(void); -volatile int* WRAP(__errno)() -{ - return REAL(__errno)(); -} diff --git a/ndk/sources/android/libportable/arch-x86/socket.c b/ndk/sources/android/libportable/arch-x86/socket.c deleted file mode 100644 index 72211c94b..000000000 --- a/ndk/sources/android/libportable/arch-x86/socket.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2012, The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include -#include - -int WRAP(socket)(int domain, int type, int protocol) { - return REAL(socket)(domain, type, protocol); -} diff --git a/ndk/sources/android/libportable/arch-x86/sockopt.c b/ndk/sources/android/libportable/arch-x86/sockopt.c deleted file mode 100644 index 87d8b2fdc..000000000 --- a/ndk/sources/android/libportable/arch-x86/sockopt.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2012, The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include - -extern int REAL(setsockopt)(int, int, int, const void *, socklen_t); -int WRAP(setsockopt)(int s, int level, int optname, const void *optval, socklen_t optlen) -{ - return REAL(setsockopt)(s, level, optname, optval, optlen); -} - -extern int REAL(getsockopt)(int, int, int, void *, socklen_t *); -int WRAP(getsockopt)(int s, int level, int optname, void *optval, socklen_t *optlen) -{ - return REAL(getsockopt)(s, level, optname, optval, optlen); -}