summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/libopie.pro1
-rw-r--r--libopie/sharp_compat.cpp18
2 files changed, 19 insertions, 0 deletions
diff --git a/libopie/libopie.pro b/libopie/libopie.pro
index a80a407..ef82dfd 100644
--- a/libopie/libopie.pro
+++ b/libopie/libopie.pro
@@ -38,6 +38,7 @@ HEADERS = ofontmenu.h \
38 38
39SOURCES = ofontmenu.cc \ 39SOURCES = ofontmenu.cc \
40 ocolorbutton.cpp \ 40 ocolorbutton.cpp \
41 sharp_compat.cpp \
41 xmltree.cc \ 42 xmltree.cc \
42 ofiledialog.cc ofileselector.cc \ 43 ofiledialog.cc ofileselector.cc \
43 ocheckitem.cpp tododb.cpp todoevent.cpp \ 44 ocheckitem.cpp tododb.cpp todoevent.cpp \
diff --git a/libopie/sharp_compat.cpp b/libopie/sharp_compat.cpp
new file mode 100644
index 0000000..1d16a09
--- a/dev/null
+++ b/libopie/sharp_compat.cpp
@@ -0,0 +1,18 @@
1/*
2 * This file contains hacks or workarounds, that make it possible to use a normal
3 * libopie arm build (iPAQ or OZ) directly on the Sharp retail ROM.
4 * This way, we only need one 'official' libopie binary for all platforms.
5 */
6
7
8// 1) Opie's libqpe.so has an additional function in Sound, which is utilized
9// in ODevice:
10
11// ok this is really evil ;), but Sound::isFinished is only needed in the
12// iPAQ part of ODevice, which is never called on Z's
13// we add a "weak" symbol here. This will be used, if ld.so does not find
14// a normal ("hard") symbol of the same name - hence only on the retail Z
15
16struct Sound { bool Sound::isFinished ( ) const __attribute__(( weak )); };
17bool Sound::isFinished ( ) const { return true; }
18