[lttng-dev] [Babeltrace PATCH 17/23] Add MinGW implementation of flockfile

Ikaheimonen, JP jp_ikaheimonen at mentor.com
Wed May 22 04:07:21 EDT 2013


Add a dummy implementation of flockfile for MinGW.
The function does not do anything; it only returns.
---
 include/babeltrace/compat/stdio.h | 14 ++++++++++++++
 tests/lib/tap.c                   |  2 +-
 2 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 include/babeltrace/compat/stdio.h

diff --git a/include/babeltrace/compat/stdio.h b/include/babeltrace/compat/stdio.h
new file mode 100644
index 0000000..62ecf97
--- /dev/null
+++ b/include/babeltrace/compat/stdio.h
@@ -0,0 +1,14 @@
+#ifndef _BABELTRACE_COMPAT_STDIO_H
+#define _BABELTRACE_COMPAT_STDIO_H
+
+#include <stdio.h>
+
+#ifdef __MINGW32__
+static inline void flockfile (FILE * filehandle)
+{
+	return;
+}
+
+#endif
+
+#endif
diff --git a/tests/lib/tap.c b/tests/lib/tap.c
index a430951..8bcdf36 100644
--- a/tests/lib/tap.c
+++ b/tests/lib/tap.c
@@ -27,7 +27,7 @@
 #define _GNU_SOURCE
 #include <ctype.h>
 #include <stdarg.h>
-#include <stdio.h>
+#include <babeltrace/compat/stdio.h>
 #include <stdlib.h>
 
 #include "tap.h"
-- 
1.8.1.msysgit.1




More information about the lttng-dev mailing list