Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
c8778a81
Commit
c8778a81
authored
Feb 09, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement vlc_pipe()
parent
25adb445
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
1 deletion
+28
-1
configure.ac
configure.ac
+1
-1
include/vlc_fs.h
include/vlc_fs.h
+1
-0
src/libvlccore.sym
src/libvlccore.sym
+1
-0
src/misc/filesystem.c
src/misc/filesystem.c
+20
-0
src/win32/filesystem.c
src/win32/filesystem.c
+5
-0
No files found.
configure.ac
View file @
c8778a81
...
...
@@ -557,7 +557,7 @@ AC_CHECK_FUNCS(fdatasync,,
AC_FUNC_STRCOLL
dnl Check for non-standard system calls
AC_CHECK_FUNCS([accept4 dup3 eventfd vmsplice sched_getaffinity])
AC_CHECK_FUNCS([accept4 dup3
pipe2
eventfd vmsplice sched_getaffinity])
AH_BOTTOM([#include <vlc_fixups.h>])
...
...
include/vlc_fs.h
View file @
c8778a81
...
...
@@ -73,4 +73,5 @@ VLC_EXPORT( int, vlc_lstat, ( const char *filename, struct stat *buf ) );
VLC_EXPORT
(
int
,
vlc_mkstemp
,
(
char
*
)
);
VLC_EXPORT
(
int
,
vlc_dup
,
(
int
)
);
VLC_EXPORT
(
int
,
vlc_pipe
,
(
int
[
2
]
)
);
#endif
src/libvlccore.sym
View file @
c8778a81
...
...
@@ -467,6 +467,7 @@ vlc_strcasestr
vlc_unlink
vlc_rename
vlc_dup
vlc_pipe
vlc_accept
utf8_vfprintf
var_AddCallback
...
...
src/misc/filesystem.c
View file @
c8778a81
...
...
@@ -334,6 +334,26 @@ int vlc_dup (int oldfd)
return
newfd
;
}
/**
* Creates a pipe (see "man pipe" for further reference).
*/
int
vlc_pipe
(
int
fds
[
2
])
{
#ifdef HAVE_PIPE2
if
(
pipe2
(
fds
,
O_CLOEXEC
)
==
0
)
return
0
;
if
(
errno
!=
ENOSYS
)
return
-
1
;
#endif
if
(
pipe
(
fds
))
return
-
1
;
fcntl
(
fds
[
0
],
F_SETFD
,
FD_CLOEXEC
);
fcntl
(
fds
[
1
],
F_SETFD
,
FD_CLOEXEC
);
return
0
;
}
#include <vlc_network.h>
/**
...
...
src/win32/filesystem.c
View file @
c8778a81
...
...
@@ -255,6 +255,11 @@ int vlc_dup (int oldfd)
#endif
}
int
vlc_pipe
(
int
fds
[
2
])
{
return
_pipe
(
fds
,
32768
,
O_BINARY
);
}
#include <vlc_network.h>
int
vlc_socket
(
int
pf
,
int
type
,
int
proto
,
bool
nonblock
)
...
...
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