[lttng-dev] [Babeltrace RFC PATCH 21/28] Add MinGW implementation of flockfile

Ikaheimonen, JP jp_ikaheimonen at mentor.com
Thu May 2 08:02:38 EDT 2013


Add a dummy MinGW implementation of flockfile.
The function does not do anything.
---
 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