From 6ad7927f611590d88d3ffad29e661939b9a00039 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 1 Sep 2021 23:51:15 -0400 Subject: [PATCH] Add `extern "C"` to header Add the necessary declaration to make it possible to use argpar from a C++ program. Change-Id: Ifedffb8c636ab9878e7ef6836ce096c1636257e7 Signed-off-by: Simon Marchi --- argpar/argpar.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/argpar/argpar.h b/argpar/argpar.h index 27503c5..f8575c8 100644 --- a/argpar/argpar.h +++ b/argpar/argpar.h @@ -10,6 +10,10 @@ #include +#if defined(__cplusplus) +extern "C" { +#endif + /*! @mainpage @@ -712,4 +716,8 @@ unsigned int argpar_iter_ingested_orig_args(const struct argpar_iter *iter); /// @} +#if defined(__cplusplus) +} +#endif + #endif /* ARGPAR_ARGPAR_H */ -- 2.34.1