1 | // |
2 | // Encodings.h |
3 | // |
4 | // Library: Encodings |
5 | // Package: Encodings |
6 | // Module: Encodings |
7 | // |
8 | // Basic definitions for the Poco Encodings library. |
9 | // This file must be the first file included by every other Encodings |
10 | // header file. |
11 | // |
12 | // Copyright (c) 2018, Applied Informatics Software Engineering GmbH. |
13 | // and Contributors. |
14 | // |
15 | // SPDX-License-Identifier: BSL-1.0 |
16 | // |
17 | |
18 | |
19 | #ifndef Encodings_Encodings_INCLUDED |
20 | #define Encodings_Encodings_INCLUDED |
21 | |
22 | |
23 | #include "Poco/Foundation.h" |
24 | |
25 | |
26 | // |
27 | // The following block is the standard way of creating macros which make exporting |
28 | // from a DLL simpler. All files within this DLL are compiled with the Encodings_EXPORTS |
29 | // symbol defined on the command line. this symbol should not be defined on any project |
30 | // that uses this DLL. This way any other project whose source files include this file see |
31 | // Encodings_API functions as being imported from a DLL, whereas this DLL sees symbols |
32 | // defined with this macro as being exported. |
33 | // |
34 | #if defined(POCO_COMPILER_MSVC) && defined(POCO_DLL) |
35 | #if defined(Encodings_EXPORTS) |
36 | #define Encodings_API __declspec(dllexport) |
37 | #else |
38 | #define Encodings_API __declspec(dllimport) |
39 | #endif |
40 | #endif |
41 | |
42 | |
43 | #if !defined(Encodings_API) |
44 | #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4) |
45 | #define Encodings_API __attribute__ ((visibility ("default"))) |
46 | #else |
47 | #define Encodings_API |
48 | #endif |
49 | #endif |
50 | |
51 | |
52 | // |
53 | // Automatically link Encodings library. |
54 | // |
55 | #if defined(POCO_COMPILER_MSVC) |
56 | #if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(Encodings_EXPORTS) |
57 | #pragma comment(lib, "PocoEncodings" POCO_LIB_SUFFIX) |
58 | #endif |
59 | #endif |
60 | |
61 | |
62 | namespace Poco { |
63 | |
64 | |
65 | void Encodings_API (); |
66 | /// Registers the character encodings from the Encodings library |
67 | /// with the TextEncoding class. |
68 | |
69 | |
70 | } // namespace Poco |
71 | |
72 | |
73 | #endif // Encodings_Encodings_INCLUDED |
74 | |