mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-02-05 17:28:23 +08:00
commit
05ea619cb3
@ -71,7 +71,7 @@ PIKA_WEAK int __platform_recv(int __fd, void* __buf, size_t __n, int __flags) {
|
|||||||
|
|
||||||
/* gethostname */
|
/* gethostname */
|
||||||
PIKA_WEAK int __platform_gethostname(char* __name, size_t __len) {
|
PIKA_WEAK int __platform_gethostname(char* __name, size_t __len) {
|
||||||
#if defined(__linux__)
|
#if defined(__linux__) || PIKA_LWIP_ENABLE
|
||||||
return gethostname(__name, __len);
|
return gethostname(__name, __len);
|
||||||
#else
|
#else
|
||||||
WEAK_FUNCTION_NEED_OVERRIDE_ERROR();
|
WEAK_FUNCTION_NEED_OVERRIDE_ERROR();
|
||||||
@ -110,7 +110,7 @@ PIKA_WEAK int __platform_setsockopt(int __fd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
PIKA_WEAK int __platform_fcntl(int fd, int cmd, long arg) {
|
PIKA_WEAK int __platform_fcntl(int fd, int cmd, long arg) {
|
||||||
#ifdef __linux__
|
#if defined(__linux__) || PIKA_LWIP_ENABLE
|
||||||
return fcntl(fd, cmd, arg);
|
return fcntl(fd, cmd, arg);
|
||||||
#else
|
#else
|
||||||
WEAK_FUNCTION_NEED_OVERRIDE_ERROR();
|
WEAK_FUNCTION_NEED_OVERRIDE_ERROR();
|
||||||
@ -119,7 +119,7 @@ PIKA_WEAK int __platform_fcntl(int fd, int cmd, long arg) {
|
|||||||
|
|
||||||
/* os file API */
|
/* os file API */
|
||||||
PIKA_WEAK int __platform_close(int __fd) {
|
PIKA_WEAK int __platform_close(int __fd) {
|
||||||
#ifdef __linux__
|
#if defined(__linux__) || PIKA_LWIP_ENABLE
|
||||||
return close(__fd);
|
return close(__fd);
|
||||||
#elif PIKA_FREERTOS_ENABLE
|
#elif PIKA_FREERTOS_ENABLE
|
||||||
return closesocket(__fd);
|
return closesocket(__fd);
|
||||||
|
@ -71,7 +71,7 @@ PIKA_WEAK int __platform_recv(int __fd, void* __buf, size_t __n, int __flags) {
|
|||||||
|
|
||||||
/* gethostname */
|
/* gethostname */
|
||||||
PIKA_WEAK int __platform_gethostname(char* __name, size_t __len) {
|
PIKA_WEAK int __platform_gethostname(char* __name, size_t __len) {
|
||||||
#if defined(__linux__)
|
#if defined(__linux__) || PIKA_LWIP_ENABLE
|
||||||
return gethostname(__name, __len);
|
return gethostname(__name, __len);
|
||||||
#else
|
#else
|
||||||
WEAK_FUNCTION_NEED_OVERRIDE_ERROR();
|
WEAK_FUNCTION_NEED_OVERRIDE_ERROR();
|
||||||
@ -110,7 +110,7 @@ PIKA_WEAK int __platform_setsockopt(int __fd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
PIKA_WEAK int __platform_fcntl(int fd, int cmd, long arg) {
|
PIKA_WEAK int __platform_fcntl(int fd, int cmd, long arg) {
|
||||||
#ifdef __linux__
|
#if defined(__linux__) || PIKA_LWIP_ENABLE
|
||||||
return fcntl(fd, cmd, arg);
|
return fcntl(fd, cmd, arg);
|
||||||
#else
|
#else
|
||||||
WEAK_FUNCTION_NEED_OVERRIDE_ERROR();
|
WEAK_FUNCTION_NEED_OVERRIDE_ERROR();
|
||||||
@ -119,7 +119,7 @@ PIKA_WEAK int __platform_fcntl(int fd, int cmd, long arg) {
|
|||||||
|
|
||||||
/* os file API */
|
/* os file API */
|
||||||
PIKA_WEAK int __platform_close(int __fd) {
|
PIKA_WEAK int __platform_close(int __fd) {
|
||||||
#ifdef __linux__
|
#if defined(__linux__) || PIKA_LWIP_ENABLE
|
||||||
return close(__fd);
|
return close(__fd);
|
||||||
#elif PIKA_FREERTOS_ENABLE
|
#elif PIKA_FREERTOS_ENABLE
|
||||||
return closesocket(__fd);
|
return closesocket(__fd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user