We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83c3d7e commit f21ed19Copy full SHA for f21ed19
test/opus_compare_wrapper.c
@@ -1,7 +1,17 @@
1
// A wrapper for opus_compare.c which renames the main symbol to avoid conflits
2
// with Haskell, and which disables the use of fprintf.
3
+
4
+// First, include stdio to prevent the fprintf definition later from breaking
5
+// the definition of fprintf
6
+#include <stdio.h>
7
8
+// Rewrite main to opus_compare_main to prevent conflits when FFI-ed
9
#define main opus_compare_main
10
11
+// Rewrite all fprintf to a no-op
12
#define fprintf(out,fmt,...)
13
#include "opus_compare.c"
14
15
+// Undefine main and fprintf for safety
16
#undef main
17
#undef fprintf
0 commit comments