summaryrefslogtreecommitdiff
path: root/library/qpeglobal.h
authorzecke <zecke>2004-10-15 19:23:42 (UTC)
committer zecke <zecke>2004-10-15 19:23:42 (UTC)
commitac36bfe2794741188da1d6d4b471f96fd15d47ee (patch) (side-by-side diff)
tree5c1bc264fd554142993be8963aed159f32877d6a /library/qpeglobal.h
parenta979ea08e8f9dbade70a9bf4fdc93dcbebb5f3fa (diff)
downloadopie-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
Diffstat (limited to 'library/qpeglobal.h') (more/less context) (show whitespace changes)
-rw-r--r--library/qpeglobal.h55
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 @@
+/*
+               =. This file is part of the OPIE Project
+             .=l. Copyright (c) 2002,2003,2004 Holger Hans Peter Freyther <freyther@handhelds.org>
+           .>+-=
+ _;:,     .>    :=|. This library is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; either version 2 of the License,
+     ._= =}       : or (at your option) any later version.
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This library is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+    : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef QPE_GLOBAL_H
+#define QPE_GLOBAL_H
+
+/**
+ * Defines for used compiler attributes
+ *
+ */
+#if defined(Q_OS_MACX)
+#define QPE_WEAK_SYMBOL __attribute__((weak_import))
+#define QPE_SYMBOL_USED
+#define QPE_SYMBOL_UNUSED
+
+#elif defined(_OS_UNIX_)
+#define QPE_WEAK_SYMBOL __attribute__((weak))
+#define QPE_SYMBOL_USED __attribute__((used))
+#define QPE_SYMBOL_UNUSED __attribute__((unused))
+
+
+#else // defined(Q_OS_WIN32)
+#define QPE_WEAK_SYMBOL
+#define QPE_SYMBOL_USED
+#define QPE_SYMBOL_UNUSED
+#endif
+
+
+
+#endif