cross-platformness for signals
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@635 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
		
							parent
							
								
									14671c56a6
								
							
						
					
					
						commit
						ca21225126
					
				
							
								
								
									
										12
									
								
								Makefile.dep
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								Makefile.dep
									
									
									
									
									
								
							@ -1,5 +1,6 @@
 | 
			
		||||
$(OBJDIR)/aide.o: aide.c const.h struct.h global.h divers.h graph.h moteur.h \
 | 
			
		||||
  tables_aide.h aide.h sdlscreen.h texte.h clavier.h windows.h input.h
 | 
			
		||||
  tables_aide.h aide.h sdlscreen.h texte.h clavier.h windows.h input.h \
 | 
			
		||||
  hotkeys.h erreurs.h
 | 
			
		||||
$(OBJDIR)/boutons.o: boutons.c const.h struct.h global.h divers.h graph.h moteur.h \
 | 
			
		||||
  readline.h files.h loadsave.h init.h boutons.h operatio.h pages.h \
 | 
			
		||||
  erreurs.h readini.h saveini.h shade.h io.h aide.h texte.h sdlscreen.h \
 | 
			
		||||
@ -14,12 +15,10 @@ $(OBJDIR)/files.o: files.c const.h struct.h global.h graph.h divers.h erreurs.h
 | 
			
		||||
  io.h windows.h loadsave.h
 | 
			
		||||
$(OBJDIR)/gfxcfg.o: gfxcfg.c SFont.h struct.h const.h clavier.h io.h hotkeys.h \
 | 
			
		||||
  setup.h
 | 
			
		||||
$(OBJDIR)/graph.o: graph.c global.h struct.h const.h moteur.h boutons.h pages.h \
 | 
			
		||||
  erreurs.h sdlscreen.h graph.h divers.h pxsimple.h pxtall.h pxwide.h \
 | 
			
		||||
  windows.h
 | 
			
		||||
$(OBJDIR)/hotkeys.o: hotkeys.c struct.h const.h global.h hotkeys.h
 | 
			
		||||
$(OBJDIR)/init.o: init.c const.h struct.h global.h graph.h boutons.h palette.h \
 | 
			
		||||
  aide.h operatio.h divers.h erreurs.h clavier.h io.h hotkeys.h files.h \
 | 
			
		||||
  setup.h windows.h sdlscreen.h mountlist.h
 | 
			
		||||
  setup.h windows.h sdlscreen.h mountlist.h loadsave.h
 | 
			
		||||
$(OBJDIR)/input.o: input.c global.h struct.h const.h clavier.h graph.h sdlscreen.h \
 | 
			
		||||
  windows.h erreurs.h divers.h input.h
 | 
			
		||||
$(OBJDIR)/io.o: io.c struct.h const.h io.h
 | 
			
		||||
@ -45,10 +44,9 @@ $(OBJDIR)/pxsimple.o: pxsimple.c global.h struct.h const.h sdlscreen.h divers.h
 | 
			
		||||
$(OBJDIR)/pxtall.o: pxtall.c global.h struct.h const.h sdlscreen.h divers.h \
 | 
			
		||||
  pxsimple.h
 | 
			
		||||
$(OBJDIR)/pxwide.o: pxwide.c global.h struct.h const.h sdlscreen.h divers.h
 | 
			
		||||
$(OBJDIR)/pxdouble.o: pxdouble.c global.h struct.h const.h sdlscreen.h divers.h
 | 
			
		||||
$(OBJDIR)/readini.o: readini.c const.h global.h struct.h graph.h windows.h divers.h
 | 
			
		||||
$(OBJDIR)/readline.o: readline.c const.h struct.h global.h graph.h divers.h \
 | 
			
		||||
  erreurs.h sdlscreen.h readline.h windows.h
 | 
			
		||||
  erreurs.h sdlscreen.h readline.h windows.h input.h
 | 
			
		||||
$(OBJDIR)/realpath.o: realpath.c
 | 
			
		||||
$(OBJDIR)/saveini.o: saveini.c const.h global.h struct.h readini.h io.h erreurs.h \
 | 
			
		||||
  graph.h divers.h
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										23
									
								
								init.c
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								init.c
									
									
									
									
									
								
							@ -47,12 +47,13 @@
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef GRAFX2_CATCHES_SIGNALS
 | 
			
		||||
  #include <signal.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(__macosx__)
 | 
			
		||||
    #define __p_sig_fn_t sig_t
 | 
			
		||||
#elif defined(__linux__)
 | 
			
		||||
    #define __p_sig_fn_t sighandler_t
 | 
			
		||||
  #if defined(__WIN32__)
 | 
			
		||||
    #define SIGHANDLER_T __p_sig_fn_t
 | 
			
		||||
  #elif defined(__macosx__)
 | 
			
		||||
    #define SIGHANDLER_T sig_t
 | 
			
		||||
  #else
 | 
			
		||||
    #define SIGHANDLER_T __sighandler_t
 | 
			
		||||
  #endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "const.h"
 | 
			
		||||
@ -2381,11 +2382,11 @@ void Config_par_defaut(void)
 | 
			
		||||
#ifdef GRAFX2_CATCHES_SIGNALS
 | 
			
		||||
 | 
			
		||||
// Memorize the signal handlers of SDL
 | 
			
		||||
__p_sig_fn_t Handler_TERM=SIG_DFL;
 | 
			
		||||
__p_sig_fn_t Handler_INT=SIG_DFL;
 | 
			
		||||
__p_sig_fn_t Handler_ABRT=SIG_DFL;
 | 
			
		||||
__p_sig_fn_t Handler_SEGV=SIG_DFL;
 | 
			
		||||
__p_sig_fn_t Handler_FPE=SIG_DFL;
 | 
			
		||||
SIGHANDLER_T Handler_TERM=SIG_DFL;
 | 
			
		||||
SIGHANDLER_T Handler_INT=SIG_DFL;
 | 
			
		||||
SIGHANDLER_T Handler_ABRT=SIG_DFL;
 | 
			
		||||
SIGHANDLER_T Handler_SEGV=SIG_DFL;
 | 
			
		||||
SIGHANDLER_T Handler_FPE=SIG_DFL;
 | 
			
		||||
 | 
			
		||||
void sig_handler(int sig)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user