author | zecke <zecke> | 2004-10-15 19:23:42 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-10-15 19:23:42 (UTC) |
commit | ac36bfe2794741188da1d6d4b471f96fd15d47ee (patch) (unidiff) | |
tree | 5c1bc264fd554142993be8963aed159f32877d6a /library/qpeglobal.h | |
parent | a979ea08e8f9dbade70a9bf4fdc93dcbebb5f3fa (diff) | |
download | opie-ac36bfe2794741188da1d6d4b471f96fd15d47ee.zip opie-ac36bfe2794741188da1d6d4b471f96fd15d47ee.tar.gz opie-ac36bfe2794741188da1d6d4b471f96fd15d47ee.tar.bz2 |
-Add a QPEGLOBAL that adds define for 'weak', 'used' and unused symbols
Make use of the newly added qpeglobal.h to kill custom versions of
similiar macros
-rw-r--r-- | library/qpeglobal.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/library/qpeglobal.h b/library/qpeglobal.h new file mode 100644 index 0000000..96ce3a6 --- a/dev/null +++ b/library/qpeglobal.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | =. This file is part of the OPIE Project | ||
3 | .=l. Copyright (c) 2002,2003,2004 Holger Hans Peter Freyther <freyther@handhelds.org> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This library is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This library is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
17 | ..}^=.= = ; Library General Public License for more | ||
18 | ++= -. .` .: details. | ||
19 | : = ...= . :.=- | ||
20 | -. .:....=;==+<; You should have received a copy of the GNU | ||
21 | -_. . . )=. = Library General Public License along with | ||
22 | -- :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | ||
24 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | |||
27 | */ | ||
28 | |||
29 | #ifndef QPE_GLOBAL_H | ||
30 | #define QPE_GLOBAL_H | ||
31 | |||
32 | /** | ||
33 | * Defines for used compiler attributes | ||
34 | * | ||
35 | */ | ||
36 | #if defined(Q_OS_MACX) | ||
37 | #define QPE_WEAK_SYMBOL __attribute__((weak_import)) | ||
38 | #define QPE_SYMBOL_USED | ||
39 | #define QPE_SYMBOL_UNUSED | ||
40 | |||
41 | #elif defined(_OS_UNIX_) | ||
42 | #define QPE_WEAK_SYMBOL __attribute__((weak)) | ||
43 | #define QPE_SYMBOL_USED __attribute__((used)) | ||
44 | #define QPE_SYMBOL_UNUSED __attribute__((unused)) | ||
45 | |||
46 | |||
47 | #else // defined(Q_OS_WIN32) | ||
48 | #define QPE_WEAK_SYMBOL | ||
49 | #define QPE_SYMBOL_USED | ||
50 | #define QPE_SYMBOL_UNUSED | ||
51 | #endif | ||
52 | |||
53 | |||
54 | |||
55 | #endif | ||