tap: import some changes master
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 15 Mar 2024 15:36:49 +0000 (11:36 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 18 Mar 2024 15:23:18 +0000 (11:23 -0400)
Import some changes from:

  http://git.efficios.com/?p=babeltrace.git;a=tree;f=tests/utils/tap;h=fa181570e8d9b79801d8a8358aca00633856994e;hb=a165a5742a2b173e59900e515caa3b37a0afb42f

Most importantly, the `extern "C"` allowing the use of this file in C++.

Change-Id: I796dd0e07fe89ba84db97b8735705bae7e39d43c
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
tests/tap/tap.c
tests/tap/tap.h

index 9f41408bd4c4dd25a729b607b4c276bb115ab27b..5fa9482b25f369ece77d338444a5da46bdec0391 100644 (file)
@@ -44,12 +44,12 @@ static void _cleanup(void);
 
 #ifdef __MINGW32__
 static inline
 
 #ifdef __MINGW32__
 static inline
-void flockfile (FILE * filehandle) {
+void flockfile (FILE * filehandle __attribute__((unused))) {
        return;
 }
 
 static inline
        return;
 }
 
 static inline
-void funlockfile(FILE * filehandle) {
+void funlockfile(FILE * filehandle __attribute__((unused))) {
        return;
 }
 #endif
        return;
 }
 #endif
index b3e94450541e203ba38bb9c5b2c3a71fd0869252..f07c1dbbabf309765085f576158be0b60d078779 100644 (file)
@@ -5,8 +5,12 @@
  * Copyright (C) 2017 Jérémie Galarneau
  */
 
  * Copyright (C) 2017 Jérémie Galarneau
  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* '## __VA_ARGS__' is a gcc'ism. C99 doesn't allow the token pasting
 /* '## __VA_ARGS__' is a gcc'ism. C99 doesn't allow the token pasting
-   and requires the caller to add the final comma if they've ommitted
+   and requires the caller to add the final comma if they've omitted
    the optional arguments */
 #ifdef __GNUC__
 # define ok(e, test, ...) ((e) ?                                       \
    the optional arguments */
 #ifdef __GNUC__
 # define ok(e, test, ...) ((e) ?                                       \
@@ -80,3 +84,7 @@ void todo_start(const char *, ...);
 void todo_end(void);
 
 int exit_status(void);
 void todo_end(void);
 
 int exit_status(void);
+
+#ifdef __cplusplus
+}
+#endif
This page took 0.024068 seconds and 4 git commands to generate.