diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-11-02 12:00:42 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2013-11-02 13:57:03 +0100 |
commit | 5928b29f53997f05d01330d05f4f51a850831855 (patch) | |
tree | 08965faa70230ef3cd87c5a3fc98b9ccc4a2f2b6 /libavformat/os_support.c | |
parent | c68d4c230ad8ca85af3999a6af8e582c43620d58 (diff) | |
download | ffmpeg-5928b29f53997f05d01330d05f4f51a850831855.tar.gz |
os_support: Add #endif comments for better readability
Diffstat (limited to 'libavformat/os_support.c')
-rw-r--r-- | libavformat/os_support.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/libavformat/os_support.c b/libavformat/os_support.c index 4ae5ac1bf0..650baea0d0 100644 --- a/libavformat/os_support.c +++ b/libavformat/os_support.c @@ -32,13 +32,13 @@ #if !HAVE_POLL_H #if HAVE_SYS_TIME_H #include <sys/time.h> -#endif +#endif /* HAVE_SYS_TIME_H */ #if HAVE_WINSOCK2_H #include <winsock2.h> #elif HAVE_SYS_SELECT_H #include <sys/select.h> -#endif -#endif +#endif /* HAVE_WINSOCK2_H */ +#endif /* !HAVE_POLL_H */ #include "network.h" @@ -82,7 +82,7 @@ int ff_getaddrinfo(const char *node, const char *service, win_getaddrinfo = GetProcAddress(ws2mod, "getaddrinfo"); if (win_getaddrinfo) return win_getaddrinfo(node, service, hints, res); -#endif +#endif /* HAVE_WINSOCK2_H */ *res = NULL; sin = av_mallocz(sizeof(struct sockaddr_in)); @@ -156,7 +156,7 @@ void ff_freeaddrinfo(struct addrinfo *res) win_freeaddrinfo(res); return; } -#endif +#endif /* HAVE_WINSOCK2_H */ av_free(res->ai_canonname); av_free(res->ai_addr); @@ -177,7 +177,7 @@ int ff_getnameinfo(const struct sockaddr *sa, int salen, win_getnameinfo = GetProcAddress(ws2mod, "getnameinfo"); if (win_getnameinfo) return win_getnameinfo(sa, salen, host, hostlen, serv, servlen, flags); -#endif +#endif /* HAVE_WINSOCK2_H */ if (sa->sa_family != AF_INET) return EAI_FAMILY; @@ -208,7 +208,7 @@ int ff_getnameinfo(const struct sockaddr *sa, int salen, #if HAVE_GETSERVBYPORT if (!(flags & NI_NUMERICSERV)) ent = getservbyport(sin->sin_port, flags & NI_DGRAM ? "udp" : "tcp"); -#endif +#endif /* HAVE_GETSERVBYPORT */ if (ent) snprintf(serv, servlen, "%s", ent->s_name); @@ -238,7 +238,7 @@ const char *ff_gai_strerror(int ecode) #if EAI_NODATA != EAI_NONAME case EAI_NODATA: return "No address associated with hostname"; -#endif +#endif /* EAI_NODATA != EAI_NONAME */ case EAI_NONAME: return "The name does not resolve for the supplied parameters"; case EAI_SERVICE: @@ -261,7 +261,7 @@ int ff_socket_nonblock(int socket, int enable) return fcntl(socket, F_SETFL, fcntl(socket, F_GETFL) | O_NONBLOCK); else return fcntl(socket, F_SETFL, fcntl(socket, F_GETFL) & ~O_NONBLOCK); -#endif +#endif /* HAVE_WINSOCK2_H */ } #if !HAVE_POLL_H @@ -279,7 +279,7 @@ int ff_poll(struct pollfd *fds, nfds_t numfds, int timeout) errno = EINVAL; return -1; } -#endif +#endif /* HAVE_WINSOCK2_H */ FD_ZERO(&read_set); FD_ZERO(&write_set); @@ -294,7 +294,7 @@ int ff_poll(struct pollfd *fds, nfds_t numfds, int timeout) errno = EINVAL; return -1; } -#endif +#endif /* !HAVE_WINSOCK2_H */ if (fds[i].events & POLLIN) FD_SET(fds[i].fd, &read_set); @@ -336,5 +336,6 @@ int ff_poll(struct pollfd *fds, nfds_t numfds, int timeout) return rc; } -#endif /* HAVE_POLL_H */ +#endif /* !HAVE_POLL_H */ + #endif /* CONFIG_NETWORK */ |