aboutsummaryrefslogtreecommitdiffstats
path: root/util/network/init.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /util/network/init.h
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/network/init.h')
-rw-r--r--util/network/init.h76
1 files changed, 38 insertions, 38 deletions
diff --git a/util/network/init.h b/util/network/init.h
index 08a79c0fca..42c6e287ad 100644
--- a/util/network/init.h
+++ b/util/network/init.h
@@ -1,60 +1,60 @@
#pragma once
-#include <util/system/error.h>
+#include <util/system/error.h>
#if defined(_unix_)
- #include <fcntl.h>
- #include <netdb.h>
- #include <time.h>
- #include <unistd.h>
- #include <poll.h>
+ #include <fcntl.h>
+ #include <netdb.h>
+ #include <time.h>
+ #include <unistd.h>
+ #include <poll.h>
- #include <sys/uio.h>
- #include <sys/time.h>
- #include <sys/types.h>
- #include <sys/socket.h>
+ #include <sys/uio.h>
+ #include <sys/time.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netinet/tcp.h>
- #include <arpa/inet.h>
+ #include <netinet/in.h>
+ #include <netinet/tcp.h>
+ #include <arpa/inet.h>
using SOCKET = int;
- #define closesocket(s) close(s)
- #define SOCKET_ERROR -1
- #define INVALID_SOCKET -1
- #define WSAGetLastError() errno
+ #define closesocket(s) close(s)
+ #define SOCKET_ERROR -1
+ #define INVALID_SOCKET -1
+ #define WSAGetLastError() errno
#elif defined(_win_)
- #include <util/system/winint.h>
- #include <io.h>
- #include <winsock2.h>
- #include <ws2tcpip.h>
+ #include <util/system/winint.h>
+ #include <io.h>
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
using nfds_t = ULONG;
+
+ #undef Yield
- #undef Yield
+struct sockaddr_un {
+ short sun_family;
+ char sun_path[108];
+};
-struct sockaddr_un {
- short sun_family;
- char sun_path[108];
-};
-
- #define PF_LOCAL AF_UNIX
- #define NETDB_INTERNAL -1
- #define NETDB_SUCCESS 0
+ #define PF_LOCAL AF_UNIX
+ #define NETDB_INTERNAL -1
+ #define NETDB_SUCCESS 0
#endif
#if defined(_win_) || defined(_darwin_)
- #ifndef MSG_NOSIGNAL
- #define MSG_NOSIGNAL 0
- #endif
+ #ifndef MSG_NOSIGNAL
+ #define MSG_NOSIGNAL 0
+ #endif
#endif // _win_ or _darwin_
void InitNetworkSubSystem();
-static struct TNetworkInitializer {
- inline TNetworkInitializer() {
- InitNetworkSubSystem();
- }
-} NetworkInitializerObject;
+static struct TNetworkInitializer {
+ inline TNetworkInitializer() {
+ InitNetworkSubSystem();
+ }
+} NetworkInitializerObject;