pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/misc/lv/patches Prefer sigaction instead of sigvec if ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/5d6cdc93075d
branches: trunk
changeset: 504045:5d6cdc93075d
user: christos <christos%pkgsrc.org@localhost>
date: Sat Dec 03 16:46:32 2005 +0000
description:
Prefer sigaction instead of sigvec if it exists, and check if sigvec exists
based on the existance of the macro SV_INTERRUPT.
diffstat:
misc/lv/patches/patch-ab | 46 ++++++++++++++++++++++++++++++++++++++++++++++
misc/lv/patches/patch-ac | 25 +++++++++++++++++++++++++
2 files changed, 71 insertions(+), 0 deletions(-)
diffs (79 lines):
diff -r f139b8de435f -r 5d6cdc93075d misc/lv/patches/patch-ab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/lv/patches/patch-ab Sat Dec 03 16:46:32 2005 +0000
@@ -0,0 +1,46 @@
+$NetBSD: patch-ab,v 1.1 2005/12/03 16:46:32 christos Exp $
+
+--- ../src/console.c.orig 2004-01-05 02:27:46.000000000 -0500
++++ ../src/console.c 2005-12-03 11:37:19.000000000 -0500
+@@ -388,7 +388,22 @@
+ signal( SIGINT, InterruptIgnoreHandler );
+ #endif /* MSDOS */
+
+-#ifdef HAVE_SIGVEC
++#ifdef HAVE_SIGACTION
++ struct sigaction sa;
++
++ sigemptyset( &sa.sa_mask );
++# ifndef SA_RESTART
++ sa.sa_flags = 0;
++# else
++ sa.sa_flags = SA_RESTART;
++# endif
++ sa.sa_handler = WindowChangeHandler;
++ (void)sigaction( SIGWINCH, &sa, NULL );
++
++ sa.sa_handler = InterruptHandler;
++ (void)sigaction( SIGINT, &sa, NULL );
++#else
++# ifdef SV_INTERRUPT
+ struct sigvec sigVec;
+
+ sigVec.sv_handler = WindowChangeHandler;
+@@ -400,12 +415,13 @@
+ sigVec.sv_mask = sigmask( SIGINT );
+ sigVec.sv_flags = SV_INTERRUPT;
+ sigvec( SIGINT, &sigVec, NULL );
+-#else
+-# ifdef SIGWINCH
++# else
++# ifdef SIGWINCH
+ signal( SIGWINCH, WindowChangeHandler );
+-# endif
++# endif
+ signal( SIGINT, InterruptHandler );
+-#endif /* HAVE_SIGVEC */
++# endif /* SV_INTERRUPT */
++#endif /* HAVE_SIGACTION */
+
+ #ifdef UNIX
+ #ifdef HAVE_TERMIOS_H
diff -r f139b8de435f -r 5d6cdc93075d misc/lv/patches/patch-ac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/lv/patches/patch-ac Sat Dec 03 16:46:32 2005 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-ac,v 1.1 2005/12/03 16:46:32 christos Exp $
+
+--- ../src/configure.in.orig 2004-01-05 01:35:44.000000000 -0500
++++ ../src/configure.in 2005-12-03 11:37:40.000000000 -0500
+@@ -34,7 +34,7 @@
+ dnl Checks for typedefs, structures, and compiler characteristics.
+
+ dnl Checks for library functions.
+-AC_CHECK_FUNCS(sigvec tgetnum setlocale)
++AC_CHECK_FUNCS(sigaction tgetnum setlocale)
+ AC_FUNC_GETPGRP
+ AC_PROG_GCC_TRADITIONAL
+ AC_TYPE_SIGNAL
+
+--- ../src/configure.orig 2004-01-05 01:37:17.000000000 -0500
++++ ../src/configure 2005-12-03 11:37:58.000000000 -0500
+@@ -1440,7 +1440,7 @@
+
+
+
+-for ac_func in sigvec tgetnum setlocale
++for ac_func in sigaction tgetnum setlocale
+ do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+ echo "configure:1447: checking for $ac_func" >&5
Home |
Main Index |
Thread Index |
Old Index