From c6c3d3a1ccecd2611688875962446ddb03ca99b9 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 24 May 2023 12:40:15 -0400 Subject: [PATCH] tests: add extern "C" to tap.h This makes it possible to use it from C++ programs. Change-Id: Ic111f493b0b048b8e491b824af293f0742bda35a Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/10067 Reviewed-by: Philippe Proulx Tested-by: jenkins --- tests/utils/tap/tap.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/utils/tap/tap.h b/tests/utils/tap/tap.h index b3e94450..76e70230 100644 --- a/tests/utils/tap/tap.h +++ b/tests/utils/tap/tap.h @@ -5,6 +5,10 @@ * 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 and requires the caller to add the final comma if they've ommitted the optional arguments */ @@ -80,3 +84,7 @@ void todo_start(const char *, ...); void todo_end(void); int exit_status(void); + +#ifdef __cplusplus +} +#endif -- 2.34.1