bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* [PATCH] Make it possible to call canonicalize_filename_mode from C++.
@ 2019-05-28 12:21 James Youngman
  2019-05-28 21:06 ` Bruno Haible
  0 siblings, 1 reply; 2+ messages in thread
From: James Youngman @ 2019-05-28 12:21 UTC (permalink / raw)
  To: bug-gnulib; +Cc: James Youngman

* lib/canonicalize.h: use extern "C".
---
 lib/canonicalize.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/canonicalize.h b/lib/canonicalize.h
index 2ffa1f681..d21b5b203 100644
--- a/lib/canonicalize.h
+++ b/lib/canonicalize.h
@@ -21,6 +21,10 @@
 
 #define CAN_MODE_MASK (CAN_EXISTING | CAN_ALL_BUT_LAST | CAN_MISSING)
 
+# ifdef __cplusplus
+extern "C" {
+# endif
+
 enum canonicalize_mode_t
   {
     /* All components must exist.  */
@@ -45,4 +49,8 @@ typedef enum canonicalize_mode_t canonicalize_mode_t;
    The result is malloc'd.  */
 char *canonicalize_filename_mode (const char *, canonicalize_mode_t);
 
+# ifdef __cplusplus
+}
+# endif
+
 #endif /* !CANONICALIZE_H_ */
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Make it possible to call canonicalize_filename_mode from C++.
  2019-05-28 12:21 [PATCH] Make it possible to call canonicalize_filename_mode from C++ James Youngman
@ 2019-05-28 21:06 ` Bruno Haible
  0 siblings, 0 replies; 2+ messages in thread
From: Bruno Haible @ 2019-05-28 21:06 UTC (permalink / raw)
  To: bug-gnulib; +Cc: James Youngman

Hi James,

> diff --git a/lib/canonicalize.h b/lib/canonicalize.h
> index 2ffa1f681..d21b5b203 100644
> --- a/lib/canonicalize.h
> +++ b/lib/canonicalize.h
> @@ -21,6 +21,10 @@
>  
>  #define CAN_MODE_MASK (CAN_EXISTING | CAN_ALL_BUT_LAST | CAN_MISSING)
>  
> +# ifdef __cplusplus
> +extern "C" {
> +# endif
> +
>  enum canonicalize_mode_t
>    {
>      /* All components must exist.  */
> ...

Thanks, applied (with no space after '#', to keep the indentation consistent
in the file).

Likewise for the second patch.

Bruno



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-28 21:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-28 12:21 [PATCH] Make it possible to call canonicalize_filename_mode from C++ James Youngman
2019-05-28 21:06 ` Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).