1 /* Control of exported symbols from libcharset.
2 Copyright (C) 2005-2023 Free Software Foundation, Inc.
4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 2.1 of the
7 License, or (at your option) any later version.
9 This file is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17 #if @HAVE_VISIBILITY@ && BUILDING_LIBCHARSET
18 # define LIBCHARSET_SHLIB_EXPORTED __attribute__((__visibility__("default")))
19 #elif defined _MSC_VER && BUILDING_LIBCHARSET
20 /* When building with MSVC, exporting a symbol means that the object file
21 contains a "linker directive" of the form /EXPORT:symbol. This can be
22 inspected through the "objdump -s --section=.drectve FILE" or
23 "dumpbin /directives FILE" commands.
24 The symbols from this file should be exported if and only if the object
25 file gets included in a DLL. Libtool, on Windows platforms, defines
26 the C macro DLL_EXPORT (together with PIC) when compiling for a shared
27 library (called DLL under Windows) and does not define it when compiling
28 an object file meant to be linked statically into some executable. */
29 # if defined DLL_EXPORT
30 # define LIBCHARSET_SHLIB_EXPORTED __declspec(dllexport)
32 # define LIBCHARSET_SHLIB_EXPORTED
35 # define LIBCHARSET_SHLIB_EXPORTED