#include <Xm/Xm.h>
+#include "wx/unix/execute.h"
+
#include "wx/motif/private.h"
// ----------------------------------------------------------------------------
// 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;
fd,
(XtPointer *) XtInputReadMask,
(XtInputCallbackProc) xt_notify_end_process,
- (XtPointer) process_data);
+ (XtPointer) proc_data);
return (int)id;
}
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);
// 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()