From 77e7a1dc48e084d1abbc06d5ab9e463d09f9ff51 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Mon, 17 Aug 1998 20:07:50 +0000 Subject: [PATCH] Added IRIX compile fixes Added functions that must be handed down from wxListCtrl to the main window git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/listctrl.h | 22 ++++++++++++++++++---- install/unix/configure.in | 8 ++++---- src/common/dynlib.cpp | 8 ++++---- src/gtk/utilsgtk.cpp | 5 +++++ src/gtk1/utilsgtk.cpp | 5 +++++ 5 files changed, 36 insertions(+), 12 deletions(-) diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h index 44b043c671..6656631d38 100644 --- a/include/wx/generic/listctrl.h +++ b/include/wx/generic/listctrl.h @@ -593,12 +593,26 @@ class wxListCtrl: public wxControl bool SortItems(wxListCtrlCompare fn, long data); bool Update(long item); virtual bool OnListNotify(wxListEvent& WXUNUSED(event)) { return FALSE; } + void OnIdle( wxIdleEvent &event ); + + // We have to hand down a few functions + void SetDropTarget( wxDropTarget *dropTarget ) - { m_mainWin->SetDropTarget( dropTarget ); }; + { m_mainWin->SetDropTarget( dropTarget ); } wxDropTarget *GetDropTarget() const - { return m_mainWin->GetDropTarget(); }; - - void OnIdle( wxIdleEvent &event ); + { return m_mainWin->GetDropTarget(); } + void SetCursor( const wxCursor &cursor ) + { m_mainWin->SetCursor( cursor); } + wxColour GetBackgroundColour() const + { return m_mainWin->GetBackgroundColour(); } + void SetBackgroundColour( const wxColour &colour ) + { m_mainWin->SetBackgroundColour(); } + wxColour GetForegroundColour() const + { return m_mainWin->GetForegroundColour(); } + void SetForegroundColour( const wxColour &colour ) + { return m_mainWin->GetForegroundColour(); } + bool PopupMenu( wxMenu *menu, int x, int y ) + { m_mainWin->PopupMenu( menu, x, y ); } protected: diff --git a/install/unix/configure.in b/install/unix/configure.in index 734d131b0b..5fdad05b7a 100644 --- a/install/unix/configure.in +++ b/install/unix/configure.in @@ -1288,6 +1288,10 @@ if test "$USE_THREADS" = "1"; then THREADS_LINK="-lpthread-0.7" AC_DEFINE(USE_THREADS) ],[ + AC_CHECK_HEADER(sys/prctl.h, [ + UNIX_THREAD="gtk/threadsgi.cpp" + AC_DEFINE(USE_THREADS) + ]) AC_CHECK_LIB(pthread, pthread_create, [ UNIX_THREAD="gtk/threadpsx.cpp" THREADS_LINK="-lpthread" @@ -1299,10 +1303,6 @@ if test "$USE_THREADS" = "1"; then THREADS_LINK="-lpthreads" AC_DEFINE(USE_THREADS) ]) - AC_CHECK_HEADER(sys/prctl.h, [ - UNIX_THREAD="gtk/threadsgi.cpp" - AC_DEFINE(USE_THREADS) - ]) fi AC_SUBST(UNIX_THREAD) diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp index 7a76f087f6..6a49d9bc3a 100644 --- a/src/common/dynlib.cpp +++ b/src/common/dynlib.cpp @@ -22,7 +22,7 @@ // System dependent include // --------------------------------------------------------------------------- -#ifdef linux +#if defined(__LINUX__) || defined(__SGI__) #include #endif @@ -63,7 +63,7 @@ wxLibrary::~wxLibrary() else delete m_liblist; -#ifdef linux +#if defined(__LINUX__) || defined(__SGI__) dlclose(m_handle); #endif #ifdef __WINDOWS__ @@ -79,7 +79,7 @@ wxObject *wxLibrary::CreateObject(const wxString& name) void *wxLibrary::GetSymbol(const wxString& symbname) { -#ifdef linux +#if defined(__LINUX__) || defined(__SGI__) return dlsym(m_handle, WXSTRINGCAST symbname); #endif #ifdef __WINDOWS__ @@ -117,7 +117,7 @@ wxLibrary *wxLibraries::LoadLibrary(const wxString& name) if ( (node = m_loaded.Find(name.GetData())) ) return ((wxLibrary *)node->Data()); -#ifdef linux +#if defined(__LINUX__) || defined(__SGI__) lib_name.Prepend("lib"); lib_name += ".so"; diff --git a/src/gtk/utilsgtk.cpp b/src/gtk/utilsgtk.cpp index 3fdfdfde0f..cd18250aaa 100644 --- a/src/gtk/utilsgtk.cpp +++ b/src/gtk/utilsgtk.cpp @@ -375,7 +375,12 @@ static void GTK_EndProcessDetector(gpointer data, gint source, pid = (proc_data->pid > 0) ? proc_data->pid : -(proc_data->pid); + /* wait4 is not standard, use at own risk */ +#if !defined(__sgi) wait4(proc_data->pid, NULL, 0, NULL); +#else + wait3(NULL, 0, NULL); +#endif close(source); gdk_input_remove(proc_data->tag); diff --git a/src/gtk1/utilsgtk.cpp b/src/gtk1/utilsgtk.cpp index 3fdfdfde0f..cd18250aaa 100644 --- a/src/gtk1/utilsgtk.cpp +++ b/src/gtk1/utilsgtk.cpp @@ -375,7 +375,12 @@ static void GTK_EndProcessDetector(gpointer data, gint source, pid = (proc_data->pid > 0) ? proc_data->pid : -(proc_data->pid); + /* wait4 is not standard, use at own risk */ +#if !defined(__sgi) wait4(proc_data->pid, NULL, 0, NULL); +#else + wait3(NULL, 0, NULL); +#endif close(source); gdk_input_remove(proc_data->tag); -- 2.45.2