Merge "Clean up unnecessary wrap functions."
This commit is contained in:
@@ -67,23 +67,15 @@ endif
|
|||||||
|
|
||||||
ifeq ($(TARGET_ARCH),arm)
|
ifeq ($(TARGET_ARCH),arm)
|
||||||
libportable_arch_src_files += \
|
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
|
arch-arm/unwind.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(TARGET_ARCH),x86)
|
ifeq ($(TARGET_ARCH),x86)
|
||||||
libportable_arch_src_files += \
|
libportable_arch_src_files += \
|
||||||
arch-x86/epoll.c \
|
arch-x86/epoll.c \
|
||||||
arch-x86/errno.c \
|
|
||||||
arch-x86/fcntl.c \
|
arch-x86/fcntl.c \
|
||||||
arch-x86/ioctl.c \
|
arch-x86/ioctl.c \
|
||||||
arch-x86/open.c \
|
arch-x86/open.c \
|
||||||
arch-x86/socket.c \
|
|
||||||
arch-x86/sockopt.c \
|
|
||||||
arch-x86/stat.c
|
arch-x86/stat.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -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 <portability.h>
|
|
||||||
#include <sys/epoll.h>
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -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 <portability.h>
|
|
||||||
|
|
||||||
extern volatile int* REAL(__errno)(void);
|
|
||||||
volatile int* WRAP(__errno)()
|
|
||||||
{
|
|
||||||
return REAL(__errno)();
|
|
||||||
}
|
|
||||||
@@ -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 <portability.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
|
||||||
|
|
||||||
int WRAP(socket)(int domain, int type, int protocol) {
|
|
||||||
return REAL(socket)(domain, type, protocol);
|
|
||||||
}
|
|
||||||
@@ -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 <portability.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
@@ -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 <portability.h>
|
|
||||||
#include <stat_portable.h>
|
|
||||||
|
|
||||||
/* 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);
|
|
||||||
}
|
|
||||||
@@ -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 <portability.h>
|
|
||||||
|
|
||||||
extern volatile int* REAL(__errno)(void);
|
|
||||||
volatile int* WRAP(__errno)()
|
|
||||||
{
|
|
||||||
return REAL(__errno)();
|
|
||||||
}
|
|
||||||
@@ -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 <portability.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
|
||||||
|
|
||||||
int WRAP(socket)(int domain, int type, int protocol) {
|
|
||||||
return REAL(socket)(domain, type, protocol);
|
|
||||||
}
|
|
||||||
@@ -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 <portability.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user