Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / misc / lv / patches / patch-ab
blob379d695d23a94b6740dafc305e07292b439673a8
1 $NetBSD: patch-ab,v 1.1 2005/12/03 16:46:32 christos Exp $
3 --- src/console.c.orig  2004-01-05 07:27:46.000000000 +0000
4 +++ src/console.c
5 @@ -388,7 +388,22 @@ public void ConsoleSetUp()
6    signal( SIGINT, InterruptIgnoreHandler );
7  #endif /* MSDOS */
8  
9 -#ifdef HAVE_SIGVEC
10 +#ifdef HAVE_SIGACTION
11 +  struct sigaction sa;
13 +  sigemptyset( &sa.sa_mask );
14 +# ifndef SA_RESTART
15 +  sa.sa_flags = 0;
16 +# else
17 +  sa.sa_flags = SA_RESTART;
18 +# endif
19 +  sa.sa_handler = WindowChangeHandler;
20 +  (void)sigaction( SIGWINCH, &sa, NULL );
22 +  sa.sa_handler = InterruptHandler;
23 +  (void)sigaction( SIGINT, &sa, NULL );
24 +#else
25 +# ifdef SV_INTERRUPT
26    struct sigvec sigVec;
28    sigVec.sv_handler = WindowChangeHandler;
29 @@ -400,12 +415,13 @@ public void ConsoleSetUp()
30    sigVec.sv_mask = sigmask( SIGINT );
31    sigVec.sv_flags = SV_INTERRUPT;
32    sigvec( SIGINT, &sigVec, NULL );
33 -#else
34 -# ifdef SIGWINCH
35 +# else
36 +#  ifdef SIGWINCH
37    signal( SIGWINCH, WindowChangeHandler );
38 -# endif 
39 +#  endif 
40    signal( SIGINT, InterruptHandler );
41 -#endif /* HAVE_SIGVEC */
42 +# endif /* SV_INTERRUPT */
43 +#endif /* HAVE_SIGACTION */
45  #ifdef UNIX
46  #ifdef HAVE_TERMIOS_H