Add option WITH_GCC_VISIBILITY.

Fix building with hidden visibility.
Add missing definitions to config.h.cmake.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/10/head
Slávek Banko 2 years ago
parent c3d0b8b21f
commit 762bfec2c8
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -41,12 +41,13 @@ tde_setup_paths( )
##### optional stuff ############################ ##### optional stuff ############################
option( WITH_ALL_OPTIONS "Enable all sane optional stuff" OFF ) option( WITH_ALL_OPTIONS "Enable all sane optional stuff" OFF )
option( WITH_ARTS "Enable aRts support" ${WITH_ALL_OPTIONS} ) option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
option( WITH_SDL "Enable SDL support" ${WITH_ALL_OPTIONS} ) option( WITH_ARTS "Enable aRts support" ${WITH_ALL_OPTIONS} )
option( WITH_BERKELEY_DB "Enable Berkeley DB support" ${WITH_ALL_OPTIONS} ) option( WITH_SDL "Enable SDL support" ${WITH_ALL_OPTIONS} )
option( WITH_XMMS "Enable xmms support" OFF ) option( WITH_BERKELEY_DB "Enable Berkeley DB support" ${WITH_ALL_OPTIONS} )
option( WITH_TEST "Build tests" OFF ) option( WITH_XMMS "Enable xmms support" OFF )
option( WITH_TEST "Build tests" OFF )
##### options comments ########################## ##### options comments ##########################

@ -1,3 +1,11 @@
#define VERSION "@VERSION@"
// Defined if you have fvisibility and fvisibility-inlines-hidden support.
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
// kicker-applets // kicker-applets
#cmakedefine HAVE_FCNTL_H 1 #cmakedefine HAVE_FCNTL_H 1

@ -81,11 +81,11 @@ class PluginView : public KXMLGUIClient
extern "C" extern "C"
{ {
void* init_katefiletemplates() KDE_EXPORT void* init_katefiletemplates()
{ {
TDEGlobal::locale()->insertCatalogue("katefiletemplates"); TDEGlobal::locale()->insertCatalogue("katefiletemplates");
return new KatePluginFactory; return new KatePluginFactory;
} }
} }
KatePluginFactory::KatePluginFactory() KatePluginFactory::KatePluginFactory()

@ -38,11 +38,11 @@ class PluginView : public KXMLGUIClient
extern "C" extern "C"
{ {
void* init_katesortplugin() KDE_EXPORT void* init_katesortplugin()
{ {
TDEGlobal::locale()->insertCatalogue("katesort"); TDEGlobal::locale()->insertCatalogue("katesort");
return new KatePluginFactory; return new KatePluginFactory;
} }
} }
KatePluginFactory::KatePluginFactory() KatePluginFactory::KatePluginFactory()

@ -55,11 +55,11 @@ class PluginView : public KXMLGUIClient
extern "C" extern "C"
{ {
void* init_libkatetabbarextensionplugin() KDE_EXPORT void* init_libkatetabbarextensionplugin()
{ {
TDEGlobal::locale()->insertCatalogue("katetabbarextension"); TDEGlobal::locale()->insertCatalogue("katetabbarextension");
return new KatePluginFactory; return new KatePluginFactory;
} }
} }
TQObject* KatePluginFactory::createObject(TQObject *parent, TQObject* KatePluginFactory::createObject(TQObject *parent,

@ -36,24 +36,26 @@ void Metabar::handlePreview(const KFileItemList &items)
} }
extern "C" { extern "C"
bool add_konqsidebar_metabar(TQString* fn, TQString* param, TQMap<TQString,TQString> *map) { {
Q_UNUSED(param); KDE_EXPORT bool add_konqsidebar_metabar(TQString* fn, TQString* param, TQMap<TQString,TQString> *map)
{
map->insert("Type", "Link"); Q_UNUSED(param);
map->insert("Icon", "metabar");
map->insert("Name", "Metabar"); map->insert("Type", "Link");
map->insert("Open", "true"); map->insert("Icon", "metabar");
map->insert("X-TDE-KonqSidebarModule","konqsidebar_metabar"); map->insert("Name", "Metabar");
fn->setLatin1("metabar%1.desktop"); map->insert("Open", "true");
return true; map->insert("X-TDE-KonqSidebarModule","konqsidebar_metabar");
} fn->setLatin1("metabar%1.desktop");
return true;
}
} }
extern "C" extern "C"
{ {
void* create_konqsidebar_metabar(TDEInstance *instance,TQObject *par,TQWidget *widp,TQString &desktopname,const char *name) KDE_EXPORT void* create_konqsidebar_metabar(TDEInstance *instance,TQObject *par,TQWidget *widp,TQString &desktopname,const char *name)
{ {
return new Metabar(instance,par,widp,desktopname,name); return new Metabar(instance,par,widp,desktopname,name);
} }
} }

@ -32,7 +32,7 @@
extern "C" extern "C"
{ {
ThumbCreator * KDE_EXPORT new_creator() KDE_EXPORT ThumbCreator* KDE_EXPORT new_creator()
{ {
return new WebArchiveCreator; return new WebArchiveCreator;
} }

@ -39,10 +39,13 @@
#include "kminutespinbox.h" #include "kminutespinbox.h"
#include "kpercentspinbox.h" #include "kpercentspinbox.h"
extern "C" Plugin *create_plugin() extern "C"
{ {
TDEGlobal::locale()->insertCatalogue("wakeup"); KDE_EXPORT Plugin* create_plugin()
return new Wakeup(); {
TDEGlobal::locale()->insertCatalogue("wakeup");
return new Wakeup();
}
} }
Wakeup *Wakeup::wakeme = 0; Wakeup *Wakeup::wakeme = 0;

@ -25,7 +25,7 @@
extern "C" extern "C"
{ {
Plugin * create_plugin() KDE_EXPORT Plugin* create_plugin()
{ {
TDEGlobal::locale()->insertCatalogue("alsaplayerui"); TDEGlobal::locale()->insertCatalogue("alsaplayerui");
return new AlsaPlayer; return new AlsaPlayer;

@ -29,10 +29,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
extern "C" extern "C"
{ {
Plugin *create_plugin() KDE_EXPORT Plugin* create_plugin()
{ {
return new SDLScope(); return new SDLScope();
} }
} }
SDLScope::SDLScope() SDLScope::SDLScope()

@ -25,7 +25,7 @@
extern "C" extern "C"
{ {
Plugin * create_plugin() KDE_EXPORT Plugin* create_plugin()
{ {
TDEGlobal::locale()->insertCatalogue("charlatanui"); TDEGlobal::locale()->insertCatalogue("charlatanui");
return new Charlatan; return new Charlatan;

@ -24,11 +24,14 @@
#include "dubplaylist.h" #include "dubplaylist.h"
// plugin interface // plugin interface
extern "C" Plugin *create_plugin() extern "C"
{ {
TDEGlobal::locale()->insertCatalogue("dub"); KDE_EXPORT Plugin* create_plugin()
DubPlaylist* dub = new DubPlaylist; {
return dub; TDEGlobal::locale()->insertCatalogue("dub");
DubPlaylist* dub = new DubPlaylist;
return dub;
}
} }
/** Construct playlist object */ /** Construct playlist object */

@ -14,10 +14,13 @@
#include "ffrs.h" #include "ffrs.h"
extern "C" Plugin *create_plugin() extern "C"
{ {
TDEGlobal::locale()->insertCatalogue("ffrs"); KDE_EXPORT Plugin* create_plugin()
return new FFRS(); {
TDEGlobal::locale()->insertCatalogue("ffrs");
return new FFRS();
}
} }

@ -23,9 +23,12 @@
#include "luckytag.h" #include "luckytag.h"
#include "parsedmp3filename.h" #include "parsedmp3filename.h"
extern "C" Plugin *create_plugin() extern "C"
{ {
return new LuckyTagger; KDE_EXPORT Plugin* create_plugin()
{
return new LuckyTagger;
}
} }
LuckyTagger::LuckyTagger(void) : Tags(-10) LuckyTagger::LuckyTagger(void) : Tags(-10)

@ -14,11 +14,11 @@
extern "C" extern "C"
{ {
Plugin *create_plugin() KDE_EXPORT Plugin* create_plugin()
{ {
TDEGlobal::locale()->insertCatalogue("lyrics"); TDEGlobal::locale()->insertCatalogue("lyrics");
return new Lyrics(); return new Lyrics();
} }
} }
Lyrics *lyrics; Lyrics *lyrics;

@ -8,11 +8,11 @@
extern "C" extern "C"
{ {
Plugin *create_plugin() KDE_EXPORT Plugin* create_plugin()
{ {
TDEGlobal::locale()->insertCatalogue("nexscope"); TDEGlobal::locale()->insertCatalogue("nexscope");
return new NexPlugin(); return new NexPlugin();
} }
} }

@ -21,10 +21,10 @@ RMS's novel that I'm supposed to put at the top of every story. He's insane.
extern "C" extern "C"
{ {
Plugin *create_plugin() KDE_EXPORT Plugin* create_plugin()
{ {
return new Madness(); return new Madness();
} }
} }
Madness::Madness() Madness::Madness()

@ -17,13 +17,15 @@
#include <tqtimer.h> #include <tqtimer.h>
extern "C" Plugin *create_plugin() extern "C"
{ {
return new Oblique(); KDE_EXPORT Plugin* create_plugin()
{
return new Oblique();
}
} }
Oblique::Oblique() Oblique::Oblique()
: Playlist(0, 0), mSchemaCollection("oblique/schemas") : Playlist(0, 0), mSchemaCollection("oblique/schemas")
{ {

@ -25,7 +25,7 @@
extern "C" extern "C"
{ {
Plugin *create_plugin() KDE_EXPORT Plugin* create_plugin()
{ {
TDEGlobal::locale()->insertCatalogue("pitchablespeed"); TDEGlobal::locale()->insertCatalogue("pitchablespeed");
return new PitchableSpeed(); return new PitchableSpeed();

@ -15,7 +15,7 @@
extern "C" extern "C"
{ {
Plugin *create_plugin() KDE_EXPORT Plugin* create_plugin()
{ {
TDEGlobal::locale()->insertCatalogue("synaescope"); TDEGlobal::locale()->insertCatalogue("synaescope");
return new SynaeScope(); return new SynaeScope();

@ -19,10 +19,13 @@
#include "syna.h" #include "syna.h"
#include "synaescope.h" #include "synaescope.h"
extern "C" Plugin *create_plugin() extern "C"
{ {
TDEGlobal::locale()->insertCatalogue("tippecanoe"); KDE_EXPORT Plugin* create_plugin()
return new SynaeScope(); {
TDEGlobal::locale()->insertCatalogue("tippecanoe");
return new SynaeScope();
}
} }
SynaeScope::SynaeScope() SynaeScope::SynaeScope()

@ -39,43 +39,62 @@ static TQString getSavePath(void)
return dirs.saveLocation("data", "noatun/") + "tylerstates"; return dirs.saveLocation("data", "noatun/") + "tylerstates";
} }
extern "C" void save_effect(t_effect *effect) extern "C"
{ {
TQFile file(getSavePath()); KDE_EXPORT void save_effect(t_effect *effect)
if(!file.open(IO_WriteOnly)) {
return; TQFile file(getSavePath());
if(!file.open(IO_WriteOnly))
{
return;
}
for(unsigned i = 0; i < sizeof(t_effect); i++) for(unsigned i = 0; i < sizeof(t_effect); i++)
file.putch( *((byte *)effect + i) ); {
file.putch( *((byte *)effect + i) );
}
}
} }
t_effect effects[100]; t_effect effects[100];
int nb_effects=0; int nb_effects=0;
extern "C" void load_effects() extern "C"
{ {
TQFile file(getDataPath()); KDE_EXPORT void load_effects()
if(!file.open(IO_ReadOnly))
exit(1);
unsigned int i;
nb_effects = 0;
while(!file.atEnd())
{ {
byte* ptr_effect = (byte *)&effects[nb_effects++]; TQFile file(getDataPath());
for(i = 0; i < sizeof(t_effect); i++) if(!file.open(IO_ReadOnly))
ptr_effect[i] = file.getch(); {
exit(1);
}
unsigned int i;
nb_effects = 0;
while(!file.atEnd())
{
byte* ptr_effect = (byte *)&effects[nb_effects++];
for(i = 0; i < sizeof(t_effect); i++)
{
ptr_effect[i] = file.getch();
}
}
} }
} }
extern "C" void load_random_effect(t_effect *effect) extern "C"
{ {
if(nb_effects > 0) KDE_EXPORT void load_random_effect(t_effect *effect)
{ {
int num_effect = rand() % nb_effects; if(nb_effects > 0)
unsigned int i; {
int num_effect = rand() % nb_effects;
unsigned int i;
for(i = 0; i < sizeof(t_effect) ; i++) for(i = 0; i < sizeof(t_effect) ; i++)
*((byte*)effect+i)=*((byte*)(&effects[num_effect])+i); {
*((byte*)effect+i) = *((byte*)(&effects[num_effect])+i);
}
}
} }
} }

@ -12,10 +12,13 @@
#include <noatun/app.h> #include <noatun/app.h>
#include <kdebug.h> #include <kdebug.h>
extern "C" Plugin *create_plugin() extern "C"
{ {
TDEGlobal::locale()->insertCatalogue("tyler"); KDE_EXPORT Plugin* create_plugin()
return new Tyler(); {
TDEGlobal::locale()->insertCatalogue("tyler");
return new Tyler();
}
} }
const int Tyler::bufferSize = 512; const int Tyler::bufferSize = 512;

@ -42,7 +42,7 @@
extern "C" extern "C"
{ {
Plugin *create_plugin() KDE_EXPORT Plugin* create_plugin()
{ {
TDEGlobal::locale()->insertCatalogue("wavecapture"); TDEGlobal::locale()->insertCatalogue("wavecapture");
return new WaveCapture(); return new WaveCapture();

Loading…
Cancel
Save