From: Vadim Zeitlin Date: Thu, 11 Mar 1999 15:16:39 +0000 (+0000) Subject: wxMotif Solaris 2.6 compilation fixes X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1363811bb6338fb0dad6c16cfa47f46fb1eb3b99 wxMotif Solaris 2.6 compilation fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/motif.inc b/src/motif.inc index 1fb0422186..7fd1c95a06 100644 --- a/src/motif.inc +++ b/src/motif.inc @@ -122,11 +122,9 @@ LIB_CPP_SRC=\ motif/stattext.cpp \ motif/taskbar.cpp \ motif/textctrl.cpp \ - motif/thread.cpp \ motif/timer.cpp \ motif/toolbar.cpp \ motif/utils.cpp \ - motif/utilsexc.cpp \ motif/wave.cpp \ motif/window.cpp \ \ @@ -155,7 +153,9 @@ LIB_CPP_SRC=\ generic/statusbr.cpp \ generic/tabg.cpp \ generic/textdlgg.cpp \ - generic/treectrl.cpp + generic/treectrl.cpp \ +\ + unix/utilsunx.cpp LIB_C_SRC=\ \ diff --git a/src/motif/utils.cpp b/src/motif/utils.cpp index e981f6e89d..287774c77b 100644 --- a/src/motif/utils.cpp +++ b/src/motif/utils.cpp @@ -42,6 +42,8 @@ #include +#include "wx/unix/execute.h" + #include "wx/motif/private.h" // ---------------------------------------------------------------------------- @@ -122,7 +124,7 @@ bool wxCheckForInterrupt(wxWindow *wnd) // wxExecute stuff // ---------------------------------------------------------------------------- -static void xt_notify_end_process(XtPointer client, int *fid, +static void xt_notify_end_process(XtPointer data, int *fid, XtInputId *id) { wxEndProcessData *proc_data = (wxEndProcessData *)data; @@ -141,7 +143,7 @@ int wxAddProcessCallback(wxEndProcessData *proc_data, int fd) fd, (XtPointer *) XtInputReadMask, (XtInputCallbackProc) xt_notify_end_process, - (XtPointer) process_data); + (XtPointer) proc_data); return (int)id; } @@ -461,11 +463,9 @@ void wxXMergeDatabases (wxApp * theApp, Display * display) size_t len; environment = GetIniFile (filename, NULL); len = strlen (environment); -#if defined(__SOLARIS__) || defined(__SVR4__) && !defined(__HPUX__) - (void) sysinfo (SI_HOSTNAME, environment + len, 1024 - len); -#else - (void) gethostname (environment + len, 1024 - len); -#endif + wxString hostname; + if ( wxGetHostName(hostname) ) + strncat(environment, hostname, 1024 - len); } homeDB = XrmGetFileDatabase (environment); XrmMergeDatabases (homeDB, &wxResourceDatabase); diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index 2d3aa7ebcb..a0614ab927 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -51,12 +51,17 @@ // many versions of Unices have this function, but it is not defined in system // headers - please add your system here if it is the case for your OS. // SunOS < 5.6 (i.e. Solaris < 2.6) and DG-UX are like this. -#if (defined(__SUN__) && !defined(__SunOs_5_6) && \ +#if !defined(HAVE_USLEEP) && \ + (defined(__SUN__) && !defined(__SunOs_5_6) && \ !defined(__SunOs_5_7) && !defined(__SUNPRO_CC)) || \ defined(__osf__) extern "C" { - void usleep(unsigned long usec); + #ifdef __SUN__ + int usleep(unsigned int usec); + #else // !Sun + void usleep(unsigned long usec); + #endif // Sun/!Sun }; #endif // Unices without usleep()