From 13b0be333a66cf138892d21fa0dccb35e7cb7d8a Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 16 Jul 2004 16:09:12 +0000 Subject: [PATCH] Allow use in C++ environment. --- lib/ChangeLog | 5 +++++ lib/mbswidth.h | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/lib/ChangeLog b/lib/ChangeLog index 2c28e44b16..a77eb811e8 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2004-07-16 Bruno Haible + + * mbswidth.h: Add extern "C" for C++. + Reported by Albert Chin-A-Young . + 2004-07-09 Simon Josefsson * getndelim2.c: Include stddef.h, for ptrdiff_t. (FreeBSD 4.9 diff --git a/lib/mbswidth.h b/lib/mbswidth.h index 6fec3f4904..4fcdb2096a 100644 --- a/lib/mbswidth.h +++ b/lib/mbswidth.h @@ -30,6 +30,11 @@ #endif +#ifdef __cplusplus +extern "C" { +#endif + + /* Optional flags to influence mbswidth/mbsnwidth behavior. */ /* If this bit is set, return -1 upon finding an invalid or incomplete @@ -49,3 +54,8 @@ extern int mbswidth (const char *string, int flags); /* Returns the number of screen columns needed for the NBYTES bytes starting at BUF. */ extern int mbsnwidth (const char *buf, size_t nbytes, int flags); + + +#ifdef __cplusplus +} +#endif -- 2.30.2