1 //
2 // Util.h
3 //
4 // Library: Util
5 // Package: Util
6 // Module:  Util
7 //
8 // Basic definitions for the Poco Util library.
9 // This file must be the first file included by every other Util
10 // header file.
11 //
12 // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
13 // and Contributors.
14 //
15 // SPDX-License-Identifier:	BSL-1.0
16 //
17 
18 
19 #ifndef Util_Util_INCLUDED
20 #define Util_Util_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 Util_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 // Util_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(_WIN32) && defined(POCO_DLL)
35 	#if defined(Util_EXPORTS)
36 		#define Util_API __declspec(dllexport)
37 	#else
38 		#define Util_API __declspec(dllimport)
39 	#endif
40 #endif
41 
42 
43 #if !defined(Util_API)
44 	#if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4)
45 		#define Util_API __attribute__ ((visibility ("default")))
46 	#else
47 		#define Util_API
48 	#endif
49 #endif
50 
51 
52 //
53 // Automatically link Util library.
54 //
55 #if defined(_MSC_VER)
56 	#if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(Util_EXPORTS)
57 		#pragma comment(lib, "PocoUtil" POCO_LIB_SUFFIX)
58 	#endif
59 #endif
60 
61 
62 #endif // Util_Util_INCLUDED
63