From: Keith Marshall Date: Fri, 19 Jun 2020 12:52:56 +0000 (+0100) Subject: Force "C" linkage for setup key definitions. X-Git-Url: http://git.osdn.net/view?p=mingw%2Fmingw-get.git;a=commitdiff_plain;h=3baebf76b515bd551b91bd54b06ed888faceb127 Force "C" linkage for setup key definitions. --- diff --git a/ChangeLog b/ChangeLog index 1e62af5..b27b578 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2020-06-19 Keith Marshall + Force "C" linkage for setup key definitions. + + * src/setup.cpp (uri_key, mirror_key, value_none): Wrap them... + (BEGIN_C_DECLS, END_C_DECLS): ...between these. + +2020-06-19 Keith Marshall + Support all-static linking with recent GCC versions. * Makefile.in (LDFLAGS): Add "-static" unconditionally. diff --git a/src/setup.cpp b/src/setup.cpp index 9e76778..b7a6a45 100644 --- a/src/setup.cpp +++ b/src/setup.cpp @@ -3,8 +3,8 @@ * * $Id$ * - * Written by Keith Marshall - * Copyright (C) 2013, MinGW.org Project + * Written by Keith Marshall + * Copyright (C) 2013, 2020, MinGW.org Project * * * Implementation of the mingw-get setup tool's dialogue controller. @@ -138,11 +138,18 @@ static inline void BrowseLicenceDocument( HWND dlg, long x = 0, long y = 0 ) /* The following string constants are abstracted from pkgkeys.c; * we redefine this minimal subset here, to avoid the overhead of * importing the entire content of the pkgkeys module. + * + * Note: All of these must be defined with "C" linkage, to comply + * with their original declarations in "pkgkeys.h". */ +BEGIN_C_DECLS + static const char *uri_key = "uri"; static const char *mirror_key = "mirror"; static const char *value_none = "none"; +END_C_DECLS + class SetupTool { /* Top level class, implementing the controlling features