diff options
author | jkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-09-03 16:13:25 +0000 |
---|---|---|
committer | jkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-09-03 16:13:25 +0000 |
commit | f1c78ab01fefbf9a731c9ce5d25accacb2064f57 (patch) | |
tree | ebfcc23bfae586ce2574f9986a5cde35eb3661a3 /Gui/mplayer | |
parent | d1a03c49ba04a0609021271d48aeda6c83f453e2 (diff) |
Some changes to compile the GUI on solaris
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1851 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/mplayer')
-rw-r--r-- | Gui/mplayer/gtk/fs.h | 6 | ||||
-rw-r--r-- | Gui/mplayer/play.c | 6 | ||||
-rw-r--r-- | Gui/mplayer/psignal.h | 7 | ||||
-rw-r--r-- | Gui/mplayer/widgets.c | 6 |
4 files changed, 21 insertions, 4 deletions
diff --git a/Gui/mplayer/gtk/fs.h b/Gui/mplayer/gtk/fs.h index b4998629bd..d03a48eaf7 100644 --- a/Gui/mplayer/gtk/fs.h +++ b/Gui/mplayer/gtk/fs.h @@ -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 @@ GtkWidget * create_FileSelect( void ) return fsFileSelect; } -#endif
\ No newline at end of file +#endif diff --git a/Gui/mplayer/play.c b/Gui/mplayer/play.c index 912b7ee267..8649d4e53b 100644 --- a/Gui/mplayer/play.c +++ b/Gui/mplayer/play.c @@ -97,9 +97,13 @@ void mplResize( unsigned int X,unsigned int Y,unsigned int width,unsigned int he 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 ) diff --git a/Gui/mplayer/psignal.h b/Gui/mplayer/psignal.h index 6eae0db5bb..0b3dd02172 100644 --- a/Gui/mplayer/psignal.h +++ b/Gui/mplayer/psignal.h @@ -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 gtkSendMessage( int msg ); extern void mplErrorHandler( int critical,const char * format, ... ); -#endif
\ No newline at end of file +#endif diff --git a/Gui/mplayer/widgets.c b/Gui/mplayer/widgets.c index c6e7716af2..0910a76775 100644 --- a/Gui/mplayer/widgets.c +++ b/Gui/mplayer/widgets.c @@ -63,6 +63,8 @@ void widgetsCreate( void ) 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 @@ static void gtkThreadProc( int argc,char * argv[] ) gtkPID=getppid(); - signal( SIGTYPE,gtkSigHandler ); + memset(&sa, 0, sizeof(sa)); + sa.sa_handler = gtkSigHandler; + sigaction( SIGTYPE, &sa, NULL ); gtkIsOk=True; gtkSendMessage( evGtkIsOk ); |