[vlc-commits] Win32: try to fix build on some Mingw versions
Rémi Denis-Courmont
git at videolan.org
Mon Oct 22 17:24:58 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Oct 22 18:24:39 2012 +0300| [82e41d14d77c14f733024ac5b1e10a667d52d2fc] | committer: Rémi Denis-Courmont
Win32: try to fix build on some Mingw versions
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=82e41d14d77c14f733024ac5b1e10a667d52d2fc
---
compat/flockfile.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/compat/flockfile.c b/compat/flockfile.c
index f0b61bb..6d6c936 100644
--- a/compat/flockfile.c
+++ b/compat/flockfile.c
@@ -29,6 +29,10 @@
# warning Broken SDK: VLC logs will be garbage.
# define _lock_file(s) ((void)(s))
# define _unlock_file(s) ((void)(s))
+# undef _getc_nolock
+# define _getc_nolock(s) getc(s)
+# undef _putc_nolock
+# define _putc_nolock(s,c) putc(s,c)
# endif
void flockfile (FILE *stream)
@@ -52,21 +56,21 @@ int getc_unlocked (FILE *stream)
return _getc_nolock (stream);
}
-int getchar_unlocked (void)
+int putc_unlocked (int c, FILE *stream)
{
- return _getchar_nolock ();
+ return _putc_nolock (c, stream);
}
-int putc_unlocked (int c, FILE *stream)
+#else
+# error flockfile not implemented on your platform!
+#endif
+
+int getchar_unlocked (void)
{
- return _putc_nolock (c, stream);
+ return getc_unlocked (stdin);
}
int putchar_unlocked (int c)
{
- return _putchar_nolock (c);
+ return putc_unlocked (c, stdout);
}
-
-#else
-# error flockfile not implemented on your platform!
-#endif
More information about the vlc-commits
mailing list