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
2f899029
Commit
2f899029
authored
Oct 18, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Win32: correctly implement flockfile() et al
This should fix gibberish interlaced log messages.
parent
f6baf564
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
10 deletions
+21
-10
compat/flockfile.c
compat/flockfile.c
+18
-10
configure.ac
configure.ac
+3
-0
No files found.
compat/flockfile.c
View file @
2f899029
/*****************************************************************************
* flockfile.c: POSIX unlocked I/O stream stubs
*****************************************************************************
* Copyright © 2011 Rémi Denis-Courmont
* Copyright © 2011
-2012
Rémi Denis-Courmont
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
...
...
@@ -24,41 +24,49 @@
#include <stdio.h>
/* There is no way to implement this for real. We just pretend it works and
* hope for the best (especially when outputting to stderr). */
#ifdef WIN32
# ifndef HAVE__LOCK_FILE
# warning Broken SDK: VLC logs will be garbage.
# define _lock_file(s) ((void)(s))
# define _unlock_file(s) ((void)(s))
# endif
void
flockfile
(
FILE
*
stream
)
{
(
void
)
stream
;
_lock_file
(
stream
)
;
}
int
ftrylockfile
(
FILE
*
stream
)
{
(
void
)
stream
;
flockfile
(
stream
);
/* Move along people, there is nothing to see here. */
return
0
;
}
void
funlockfile
(
FILE
*
stream
)
{
(
void
)
stream
;
_unlock_file
(
stream
)
;
}
int
getc_unlocked
(
FILE
*
stream
)
{
return
getc
(
stream
);
return
_getc_nolock
(
stream
);
}
int
getchar_unlocked
(
void
)
{
return
getchar
();
return
_getchar_nolock
();
}
int
putc_unlocked
(
int
c
,
FILE
*
stream
)
{
return
putc
(
c
,
stream
);
return
_putc_nolock
(
c
,
stream
);
}
int
putchar_unlocked
(
int
c
)
{
return
putchar
(
c
);
return
_putchar_nolock
(
c
);
}
#else
# error flockfile not implemented on your platform!
#endif
configure.ac
View file @
2f899029
...
...
@@ -535,6 +535,9 @@ case "$SYS" in
"linux")
AC_CHECK_FUNCS([accept4 pipe2 eventfd vmsplice sched_getaffinity])
;;
"mingw32")
AC_CHECK_FUNCS([_lock_file])
;;
esac
AH_BOTTOM([#include <vlc_fixups.h>])
...
...
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