changeset 1850:62b8e85865a2

Some changes to compile the GUI on solaris
author jkeil
date Mon, 03 Sep 2001 16:13:25 +0000
parents 5f246fcc2971
children 2ce062156969
files Gui/mplayer/gtk/fs.h Gui/mplayer/play.c Gui/mplayer/psignal.h Gui/mplayer/widgets.c Gui/wm/ws.c
diffstat 5 files changed, 21 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/mplayer/gtk/fs.h	Sun Sep 02 23:06:21 2001 +0000
+++ b/Gui/mplayer/gtk/fs.h	Mon Sep 03 16:13:25 2001 +0000
@@ -11,6 +11,10 @@
 
 #include "../../language.h"
 
+#ifdef	__SVR4
+#define	get_current_dir_name()	getcwd(NULL, PATH_MAX)
+#endif
+
 #ifndef get_current_dir_name
  extern char * get_current_dir_name( void );
 #endif
@@ -657,4 +661,4 @@
  return fsFileSelect;
 }
 
-#endif
\ No newline at end of file
+#endif
--- a/Gui/mplayer/play.c	Sun Sep 02 23:06:21 2001 +0000
+++ b/Gui/mplayer/play.c	Mon Sep 03 16:13:25 2001 +0000
@@ -97,9 +97,13 @@
 
 void mplMPlayerInit( int argc,char* argv[], char *envp[] )
 {
+ struct sigaction sa;
+
  mplShMem=calloc( 1,sizeof( mplCommStruct ) );
  mplShMem->Balance=50.0f;
- signal( SIGTYPE,mplMainSigHandler );
+ memset(&sa, 0, sizeof(sa));
+ sa.sa_handler = mplMainSigHandler;
+ sigaction( SIGTYPE,&sa,NULL );
 }
 
 float mplGetPosition( void )
--- a/Gui/mplayer/psignal.h	Sun Sep 02 23:06:21 2001 +0000
+++ b/Gui/mplayer/psignal.h	Mon Sep 03 16:13:25 2001 +0000
@@ -39,7 +39,12 @@
 #define mplIncAudioBufferDelay                   28
 #define mplDecAudioBufferDelay                   29
 
+#ifdef	__SVR4
+#define	SIGTYPE SIGUSR2
+#warning should we use SIGUSR1 or SIGUSR2 on linux, bsd, ... too?
+#else
 #define SIGTYPE _NSIG - 1
+#endif
 
 extern int gtkIsOk;
 
@@ -57,4 +62,4 @@
 
 extern void mplErrorHandler( int critical,const char * format, ... );
 
-#endif
\ No newline at end of file
+#endif
--- a/Gui/mplayer/widgets.c	Sun Sep 02 23:06:21 2001 +0000
+++ b/Gui/mplayer/widgets.c	Mon Sep 03 16:13:25 2001 +0000
@@ -63,6 +63,8 @@
 
 static void gtkThreadProc( int argc,char * argv[] )
 {
+ struct sigaction sa;
+
  gtk_set_locale();
  gtk_init( &argc,&argv );
  gdk_set_use_xshm( TRUE );
@@ -71,7 +73,9 @@
 
  gtkPID=getppid();
 
- signal( SIGTYPE,gtkSigHandler );
+ memset(&sa, 0, sizeof(sa));
+ sa.sa_handler = gtkSigHandler;
+ sigaction( SIGTYPE, &sa, NULL );
 
  gtkIsOk=True;
  gtkSendMessage( evGtkIsOk );
--- a/Gui/wm/ws.c	Sun Sep 02 23:06:21 2001 +0000
+++ b/Gui/wm/ws.c	Mon Sep 03 16:13:25 2001 +0000
@@ -17,8 +17,6 @@
 #include "wsconv.h"
 #include "../../config.h"
 
-#include <X11/extensions/xf86dga.h>
-#include <X11/extensions/xf86dgastr.h>
 #include <X11/extensions/XShm.h>
 #include <X11/extensions/shape.h>
 #include <sys/ipc.h>