Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
5928b29f
Commit
5928b29f
authored
Nov 02, 2013
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os_support: Add #endif comments for better readability
parent
c68d4c23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
os_support.c
libavformat/os_support.c
+13
-12
No files found.
libavformat/os_support.c
View file @
5928b29f
...
@@ -32,13 +32,13 @@
...
@@ -32,13 +32,13 @@
#if !HAVE_POLL_H
#if !HAVE_POLL_H
#if HAVE_SYS_TIME_H
#if HAVE_SYS_TIME_H
#include <sys/time.h>
#include <sys/time.h>
#endif
#endif
/* HAVE_SYS_TIME_H */
#if HAVE_WINSOCK2_H
#if HAVE_WINSOCK2_H
#include <winsock2.h>
#include <winsock2.h>
#elif HAVE_SYS_SELECT_H
#elif HAVE_SYS_SELECT_H
#include <sys/select.h>
#include <sys/select.h>
#endif
#endif
/* HAVE_WINSOCK2_H */
#endif
#endif
/* !HAVE_POLL_H */
#include "network.h"
#include "network.h"
...
@@ -82,7 +82,7 @@ int ff_getaddrinfo(const char *node, const char *service,
...
@@ -82,7 +82,7 @@ int ff_getaddrinfo(const char *node, const char *service,
win_getaddrinfo
=
GetProcAddress
(
ws2mod
,
"getaddrinfo"
);
win_getaddrinfo
=
GetProcAddress
(
ws2mod
,
"getaddrinfo"
);
if
(
win_getaddrinfo
)
if
(
win_getaddrinfo
)
return
win_getaddrinfo
(
node
,
service
,
hints
,
res
);
return
win_getaddrinfo
(
node
,
service
,
hints
,
res
);
#endif
#endif
/* HAVE_WINSOCK2_H */
*
res
=
NULL
;
*
res
=
NULL
;
sin
=
av_mallocz
(
sizeof
(
struct
sockaddr_in
));
sin
=
av_mallocz
(
sizeof
(
struct
sockaddr_in
));
...
@@ -156,7 +156,7 @@ void ff_freeaddrinfo(struct addrinfo *res)
...
@@ -156,7 +156,7 @@ void ff_freeaddrinfo(struct addrinfo *res)
win_freeaddrinfo
(
res
);
win_freeaddrinfo
(
res
);
return
;
return
;
}
}
#endif
#endif
/* HAVE_WINSOCK2_H */
av_free
(
res
->
ai_canonname
);
av_free
(
res
->
ai_canonname
);
av_free
(
res
->
ai_addr
);
av_free
(
res
->
ai_addr
);
...
@@ -177,7 +177,7 @@ int ff_getnameinfo(const struct sockaddr *sa, int salen,
...
@@ -177,7 +177,7 @@ int ff_getnameinfo(const struct sockaddr *sa, int salen,
win_getnameinfo
=
GetProcAddress
(
ws2mod
,
"getnameinfo"
);
win_getnameinfo
=
GetProcAddress
(
ws2mod
,
"getnameinfo"
);
if
(
win_getnameinfo
)
if
(
win_getnameinfo
)
return
win_getnameinfo
(
sa
,
salen
,
host
,
hostlen
,
serv
,
servlen
,
flags
);
return
win_getnameinfo
(
sa
,
salen
,
host
,
hostlen
,
serv
,
servlen
,
flags
);
#endif
#endif
/* HAVE_WINSOCK2_H */
if
(
sa
->
sa_family
!=
AF_INET
)
if
(
sa
->
sa_family
!=
AF_INET
)
return
EAI_FAMILY
;
return
EAI_FAMILY
;
...
@@ -208,7 +208,7 @@ int ff_getnameinfo(const struct sockaddr *sa, int salen,
...
@@ -208,7 +208,7 @@ int ff_getnameinfo(const struct sockaddr *sa, int salen,
#if HAVE_GETSERVBYPORT
#if HAVE_GETSERVBYPORT
if
(
!
(
flags
&
NI_NUMERICSERV
))
if
(
!
(
flags
&
NI_NUMERICSERV
))
ent
=
getservbyport
(
sin
->
sin_port
,
flags
&
NI_DGRAM
?
"udp"
:
"tcp"
);
ent
=
getservbyport
(
sin
->
sin_port
,
flags
&
NI_DGRAM
?
"udp"
:
"tcp"
);
#endif
#endif
/* HAVE_GETSERVBYPORT */
if
(
ent
)
if
(
ent
)
snprintf
(
serv
,
servlen
,
"%s"
,
ent
->
s_name
);
snprintf
(
serv
,
servlen
,
"%s"
,
ent
->
s_name
);
...
@@ -238,7 +238,7 @@ const char *ff_gai_strerror(int ecode)
...
@@ -238,7 +238,7 @@ const char *ff_gai_strerror(int ecode)
#if EAI_NODATA != EAI_NONAME
#if EAI_NODATA != EAI_NONAME
case
EAI_NODATA
:
case
EAI_NODATA
:
return
"No address associated with hostname"
;
return
"No address associated with hostname"
;
#endif
#endif
/* EAI_NODATA != EAI_NONAME */
case
EAI_NONAME
:
case
EAI_NONAME
:
return
"The name does not resolve for the supplied parameters"
;
return
"The name does not resolve for the supplied parameters"
;
case
EAI_SERVICE
:
case
EAI_SERVICE
:
...
@@ -261,7 +261,7 @@ int ff_socket_nonblock(int socket, int enable)
...
@@ -261,7 +261,7 @@ int ff_socket_nonblock(int socket, int enable)
return
fcntl
(
socket
,
F_SETFL
,
fcntl
(
socket
,
F_GETFL
)
|
O_NONBLOCK
);
return
fcntl
(
socket
,
F_SETFL
,
fcntl
(
socket
,
F_GETFL
)
|
O_NONBLOCK
);
else
else
return
fcntl
(
socket
,
F_SETFL
,
fcntl
(
socket
,
F_GETFL
)
&
~
O_NONBLOCK
);
return
fcntl
(
socket
,
F_SETFL
,
fcntl
(
socket
,
F_GETFL
)
&
~
O_NONBLOCK
);
#endif
#endif
/* HAVE_WINSOCK2_H */
}
}
#if !HAVE_POLL_H
#if !HAVE_POLL_H
...
@@ -279,7 +279,7 @@ int ff_poll(struct pollfd *fds, nfds_t numfds, int timeout)
...
@@ -279,7 +279,7 @@ int ff_poll(struct pollfd *fds, nfds_t numfds, int timeout)
errno
=
EINVAL
;
errno
=
EINVAL
;
return
-
1
;
return
-
1
;
}
}
#endif
#endif
/* HAVE_WINSOCK2_H */
FD_ZERO
(
&
read_set
);
FD_ZERO
(
&
read_set
);
FD_ZERO
(
&
write_set
);
FD_ZERO
(
&
write_set
);
...
@@ -294,7 +294,7 @@ int ff_poll(struct pollfd *fds, nfds_t numfds, int timeout)
...
@@ -294,7 +294,7 @@ int ff_poll(struct pollfd *fds, nfds_t numfds, int timeout)
errno
=
EINVAL
;
errno
=
EINVAL
;
return
-
1
;
return
-
1
;
}
}
#endif
#endif
/* !HAVE_WINSOCK2_H */
if
(
fds
[
i
].
events
&
POLLIN
)
if
(
fds
[
i
].
events
&
POLLIN
)
FD_SET
(
fds
[
i
].
fd
,
&
read_set
);
FD_SET
(
fds
[
i
].
fd
,
&
read_set
);
...
@@ -336,5 +336,6 @@ int ff_poll(struct pollfd *fds, nfds_t numfds, int timeout)
...
@@ -336,5 +336,6 @@ int ff_poll(struct pollfd *fds, nfds_t numfds, int timeout)
return
rc
;
return
rc
;
}
}
#endif
/* HAVE_POLL_H */
#endif
/* !HAVE_POLL_H */
#endif
/* CONFIG_NETWORK */
#endif
/* CONFIG_NETWORK */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment