Skip to content

Commit 968e124

Browse files
committed
Fix link error regarding _libiconv_version on MSVC in C++ mode.
Reported at <https://savannah.gnu.org/bugs/?64227>. * include/iconv.h.in (_libiconv_version): Enclose in an extern "C" block.
1 parent 6549d20 commit 968e124

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2023-05-21 Bruno Haible <bruno@clisp.org>
2+
3+
Fix link error regarding _libiconv_version on MSVC in C++ mode.
4+
Reported at <https://savannah.gnu.org/bugs/?64227>.
5+
* include/iconv.h.in (_libiconv_version): Enclose in an extern "C"
6+
block.
7+
18
2023-05-20 Bruno Haible <bruno@clisp.org>
29

310
Implement GB18030 version 2022.

include/iconv.h.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,17 @@
2020
#ifndef _LIBICONV_H
2121
#define _LIBICONV_H
2222

23+
#ifdef __cplusplus
24+
extern "C" {
25+
#endif
26+
2327
#define _LIBICONV_VERSION 0x0111 /* version number: (major<<8) + minor */
2428
extern @DLL_VARIABLE@ int _libiconv_version; /* Likewise */
2529

30+
#ifdef __cplusplus
31+
}
32+
#endif
33+
2634
/* We would like to #include any system header file which could define
2735
iconv_t, 1. in order to eliminate the risk that the user gets compilation
2836
errors because some other system header file includes /usr/include/iconv.h

0 commit comments

Comments
 (0)