From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Vladislav Shpilevoy Subject: [PATCH 05/11] sio: turn into C Date: Fri, 30 Nov 2018 18:39:37 +0300 Message-Id: <89dc2904293e9c586e572cbebd08b14ad90fd91b.1543590433.git.v.shpilevoy@tarantool.org> In-Reply-To: References: In-Reply-To: References: To: tarantool-patches@freelists.org Cc: vdavydov.dev@gmail.com List-ID: --- src/CMakeLists.txt | 2 +- src/exception.h | 2 +- src/{sio.cc => sio.c} | 0 src/sio.h | 5 ++--- 4 files changed, 4 insertions(+), 5 deletions(-) rename src/{sio.cc => sio.c} (100%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7d0734f55..77353b244 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -88,7 +88,7 @@ set (core_sources fiber_cond.c fiber_channel.c latch.c - sio.cc + sio.c evio.cc coio.cc coio_task.c diff --git a/src/exception.h b/src/exception.h index f08d946b5..e680e40af 100644 --- a/src/exception.h +++ b/src/exception.h @@ -50,6 +50,7 @@ extern const struct type_info type_LuajitError; extern const struct type_info type_IllegalParams; extern const struct type_info type_SystemError; extern const struct type_info type_CollationError; +extern const struct type_info type_SocketError; const char * exception_get_string(struct error *e, const struct method_info *method); @@ -97,7 +98,6 @@ protected: int m_errno; }; -extern const struct type_info type_SocketError; class SocketError: public SystemError { public: SocketError(const char *file, unsigned line, const char *socketname, diff --git a/src/sio.cc b/src/sio.c similarity index 100% rename from src/sio.cc rename to src/sio.c diff --git a/src/sio.h b/src/sio.h index ff383aa36..1978ca56d 100644 --- a/src/sio.h +++ b/src/sio.h @@ -90,9 +90,6 @@ sio_add_to_iov(struct iovec *iov, ssize_t size) iov->iov_base = (char *) iov->iov_base - size; } -#if defined(__cplusplus) -} /* extern "C" */ - /** Pretty format socket name and peer. */ const char * sio_socketname(int fd); @@ -256,6 +253,8 @@ sio_recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen, bool *is_error_fatal); +#if defined(__cplusplus) +} /* extern "C" */ #endif /* defined(__cplusplus) */ #endif /* TARANTOOL_SIO_H_INCLUDED */ -- 2.17.2 (Apple Git-113)