From ebe199a301c80c23f9a0db02ff4e1eac0aa193f1 Mon Sep 17 00:00:00 2001 From: Waldo Bastian Date: Thu, 7 Sep 2000 22:46:24 +0000 Subject: [PATCH] WABA: Use kdemain() instead of main() so that closures don't complain about main being defined twice with different symbol sizes. svn path=/trunk/kdebase/kwin/; revision=63094 --- Makefile.am | 2 +- client.cpp | 2 +- main.cpp | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3a32d73bb5..b3c69850a3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -32,5 +32,5 @@ sounddir= $(kde_sounddir) sound_DATA = pop.wav dummy.cpp: - echo > dummy.cpp + echo 'extern "C" { int kdemain(int, char *[]);} int main(int c, char *v[]) { return kdemain(c,v); }' > dummy.cpp diff --git a/client.cpp b/client.cpp index 3e7e1f1bd9..6565f6e7d7 100644 --- a/client.cpp +++ b/client.cpp @@ -2573,7 +2573,7 @@ NoBorderClient::~NoBorderClient() { } -QPixmap * kwin_get_menu_pix_hack() +static QPixmap * kwin_get_menu_pix_hack() { static QPixmap p; if ( p.isNull() ) diff --git a/main.cpp b/main.cpp index 0a08480785..ae77677d2c 100644 --- a/main.cpp +++ b/main.cpp @@ -192,7 +192,9 @@ static void sighandler(int) { static const char *version = "0.5"; static const char *description = I18N_NOOP( "The KDE window manager." ); -int main( int argc, char * argv[] ) +extern "C" { int kdemain(int, char *[]); } + +int kdemain( int argc, char * argv[] ) { KAboutData aboutData( "kwin", I18N_NOOP("KWin"), version, description, KAboutData::License_BSD,