Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
207baf6c
Commit
207baf6c
authored
Oct 11, 2011
by
KO Myung-Hun
Committed by
Rémi Denis-Courmont
Oct 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement select()-able pipes for OS/2
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
c77a99a3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
+20
-12
src/misc/objects.c
src/misc/objects.c
+20
-12
No files found.
src/misc/objects.c
View file @
207baf6c
...
@@ -52,10 +52,15 @@
...
@@ -52,10 +52,15 @@
# include <search.h>
# include <search.h>
#endif
#endif
#ifndef WIN32
#ifdef __OS2__
# include <vlc_fs.h>
# include <sys/socket.h>
# include <unistd.h>
# include <netinet/in.h>
#else
typedef
struct
sockaddr_in
SOCKADDR_IN
;
typedef
struct
sockaddr
*
PSOCKADDR
;
# define closesocket soclose
#elif defined(WIN32)
# include <io.h>
# include <io.h>
# include <winsock2.h>
# include <winsock2.h>
# include <ws2tcpip.h>
# include <ws2tcpip.h>
...
@@ -65,6 +70,9 @@
...
@@ -65,6 +70,9 @@
# define write( a, b, c ) send (a, b, c, 0)
# define write( a, b, c ) send (a, b, c, 0)
# undef close
# undef close
# define close( a ) closesocket (a)
# define close( a ) closesocket (a)
#else
# include <vlc_fs.h>
# include <unistd.h>
#endif
#endif
#include <limits.h>
#include <limits.h>
...
@@ -287,7 +295,7 @@ static void vlc_object_destroy( vlc_object_t *p_this )
...
@@ -287,7 +295,7 @@ static void vlc_object_destroy( vlc_object_t *p_this )
}
}
#if
def WIN32
#if
defined(WIN32) || defined(__OS2__)
/**
/**
* select()-able pipes emulated using Winsock
* select()-able pipes emulated using Winsock
*/
*/
...
@@ -297,9 +305,9 @@ static int selectable_pipe (int fd[2])
...
@@ -297,9 +305,9 @@ static int selectable_pipe (int fd[2])
SOCKADDR_IN
addr
;
SOCKADDR_IN
addr
;
int
addrlen
=
sizeof
(
addr
);
int
addrlen
=
sizeof
(
addr
);
SOCKET
l
=
socket
(
PF_INET
,
SOCK_STREAM
,
IPPROTO_TCP
),
a
,
int
l
=
socket
(
PF_INET
,
SOCK_STREAM
,
IPPROTO_TCP
),
a
,
c
=
socket
(
PF_INET
,
SOCK_STREAM
,
IPPROTO_TCP
);
c
=
socket
(
PF_INET
,
SOCK_STREAM
,
IPPROTO_TCP
);
if
((
l
==
INVALID_SOCKET
)
||
(
c
==
INVALID_SOCKET
))
if
((
l
==
-
1
)
||
(
c
==
-
1
))
goto
error
;
goto
error
;
memset
(
&
addr
,
0
,
sizeof
(
addr
));
memset
(
&
addr
,
0
,
sizeof
(
addr
));
...
@@ -312,7 +320,7 @@ static int selectable_pipe (int fd[2])
...
@@ -312,7 +320,7 @@ static int selectable_pipe (int fd[2])
goto
error
;
goto
error
;
a
=
accept
(
l
,
NULL
,
NULL
);
a
=
accept
(
l
,
NULL
,
NULL
);
if
(
a
==
INVALID_SOCKET
)
if
(
a
==
-
1
)
goto
error
;
goto
error
;
closesocket
(
l
);
closesocket
(
l
);
...
@@ -323,13 +331,13 @@ static int selectable_pipe (int fd[2])
...
@@ -323,13 +331,13 @@ static int selectable_pipe (int fd[2])
return
0
;
return
0
;
error:
error:
if
(
l
!=
INVALID_SOCKET
)
if
(
l
!=
-
1
)
closesocket
(
l
);
closesocket
(
l
);
if
(
c
!=
INVALID_SOCKET
)
if
(
c
!=
-
1
)
closesocket
(
c
);
closesocket
(
c
);
return
-
1
;
return
-
1
;
}
}
#endif
/* WIN32 */
#endif
/* WIN32
|| __OS2__
*/
static
vlc_mutex_t
pipe_lock
=
VLC_STATIC_MUTEX
;
static
vlc_mutex_t
pipe_lock
=
VLC_STATIC_MUTEX
;
...
...
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