Build, if that was not necessary blame cartman who told me "sure" :-D
[kdepim.git] / libkdepim / kdepimmacros.h.in
blob07c22d8099232d858cfe7cb50db0d39945977b62
1 /*
2 This file is part of libkdepim
3 Copyright (c) 2002-2003 KDE Team
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
21 #ifndef KDEPIMMACROS_H
22 #define KDEPIMMACROS_H
24 #include <kdeversion.h>
26 /**
27 * The KDE_NO_EXPORT macro marks the symbol of the given variable
28 * to be hidden. A hidden symbol is stripped during the linking step,
29 * so it can't be used from outside the resulting library, which is similar
30 * to static. However, static limits the visibility to the current
31 * compilation unit. hidden symbols can still be used in multiple compilation
32 * units.
34 * \code
35 * int KDE_NO_EXPORT foo;
36 * int KDE_EXPORT bar;
37 * \end
39 #if KDE_IS_VERSION(3,3,2)
40 #include <kdemacros.h>
41 #else
42 #undef KDE_NO_EXPORT
43 #undef KDE_EXPORT
45 #if @HAVE_GCC_VISIBILITY@
46 #define KDE_NO_EXPORT __attribute__ ((visibility("hidden")))
47 #define KDE_EXPORT __attribute__ ((visibility("default")))
48 #elif defined(Q_WS_WIN)
49 #define KDE_NO_EXPORT
50 #define KDE_EXPORT __declspec(dllexport)
51 #else
52 #define KDE_NO_EXPORT
53 #define KDE_EXPORT
54 #endif
56 #endif /* KDE_IS_VERSION */
58 #endif /* KDEPIMMACROS_H */