From aaa0b858e44908f18b881c96a3f451d37a542483 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 14 Oct 2017 11:50:16 +0900 Subject: [PATCH] Amend some macro comments --- src/asio_common.cc | 2 +- src/memchunk.h | 4 ++-- src/network.h | 4 ++-- src/util.cc | 16 ++++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/asio_common.cc b/src/asio_common.cc index 9250229c..590e931f 100644 --- a/src/asio_common.cc +++ b/src/asio_common.cc @@ -24,8 +24,8 @@ */ #include "asio_common.h" -#include #include +#include #include "util.h" #include "template.h" diff --git a/src/memchunk.h b/src/memchunk.h index 84602619..6f76b492 100644 --- a/src/memchunk.h +++ b/src/memchunk.h @@ -34,9 +34,9 @@ struct iovec { void *iov_base; /* Pointer to data. */ size_t iov_len; /* Length of data. */ }; -#else +#else // !_WIN32 #include -#endif // _WIN32 +#endif // !_WIN32 #include #include diff --git a/src/network.h b/src/network.h index 44786a91..02dda099 100644 --- a/src/network.h +++ b/src/network.h @@ -35,9 +35,9 @@ #endif // HAVE_SYS_SOCKET_H #ifdef _WIN32 #include -#else +#else // !_WIN32 #include -#endif // _WIN32 +#endif // !_WIN32 #ifdef HAVE_NETINET_IN_H #include #endif // HAVE_NETINET_IN_H diff --git a/src/util.cc b/src/util.cc index 6686149a..b498c2d1 100644 --- a/src/util.cc +++ b/src/util.cc @@ -44,9 +44,9 @@ #ifdef _WIN32 #include #include -#else +#else // !_WIN32 #include -#endif // _WIN32 +#endif // !_WIN32 #ifdef HAVE_ARPA_INET_H #include #endif // HAVE_ARPA_INET_H @@ -397,14 +397,14 @@ time_t parse_http_date(const StringRef &s) { return 0; return boost::posix_time::to_time_t(ltime); -#else +#else // !_WIN32 tm tm{}; char *r = strptime(s.c_str(), "%a, %d %b %Y %H:%M:%S GMT", &tm); if (r == 0) { return 0; } return nghttp2_timegm_without_yday(&tm); -#endif // _WIN32 +#endif // !_WIN32 } char upcase(char c) { @@ -869,7 +869,7 @@ int make_socket_closeonexec(int fd) { #ifdef _WIN32 (void)fd; return 0; -#else +#else // !_WIN32 int flags; int rv; while ((flags = fcntl(fd, F_GETFD)) == -1 && errno == EINTR) @@ -877,7 +877,7 @@ int make_socket_closeonexec(int fd) { while ((rv = fcntl(fd, F_SETFD, flags | FD_CLOEXEC)) == -1 && errno == EINTR) ; return rv; -#endif // _WIN32 +#endif // !_WIN32 } int make_socket_nonblocking(int fd) { @@ -887,13 +887,13 @@ int make_socket_nonblocking(int fd) { u_long mode = 1; rv = ioctlsocket(fd, FIONBIO, &mode); -#else +#else // !_WIN32 int flags; while ((flags = fcntl(fd, F_GETFL, 0)) == -1 && errno == EINTR) ; while ((rv = fcntl(fd, F_SETFL, flags | O_NONBLOCK)) == -1 && errno == EINTR) ; -#endif // _WIN32 +#endif // !_WIN32 return rv; }