summaryrefslogtreecommitdiff
path: root/mcon/U/d_sigvec.U
diff options
context:
space:
mode:
Diffstat (limited to 'mcon/U/d_sigvec.U')
-rw-r--r--mcon/U/d_sigvec.U70
1 files changed, 45 insertions, 25 deletions
diff --git a/mcon/U/d_sigvec.U b/mcon/U/d_sigvec.U
index fd6e4a0..0aa4958 100644
--- a/mcon/U/d_sigvec.U
+++ b/mcon/U/d_sigvec.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_sigvec.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_sigvec.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_sigvec.U,v $
@@ -17,7 +17,7 @@
?RCS:
?X: d_sigvec.U, from d_ftime.U 1.0
?X:
-?MAKE:d_sigvec d_sigvectr d_sigintrp: Csym Inlibc Setvar
+?MAKE:d_sigvec d_sigvectr d_sigintrp: Trylink cat
?MAKE: -pick add $@ %<
?S:d_sigvec:
?S: This variable conditionally defines the HAS_SIGVEC symbol, which indicates
@@ -49,31 +49,51 @@
?H:#$d_sigvectr HAS_SIGVECTOR /**/
?H:#$d_sigintrp HAS_SIGINTRP /**/
?H:.
-?T:val
-?LINT:set d_sigvec d_sigintrp
+?LINT:set d_sigvec d_sigvectr d_sigintrp
@if d_sigvectr || d_sigvec || HAS_SIGVEC || HAS_SIGVECTOR
-: see if sigvector exists -- since sigvec will match the substring
-echo " "
-if set sigvector val -f d_sigvectr; eval $csym; $val; then
- echo 'sigvector() found--you must be running HP-UX.' >&4
- val="$define"; set d_sigvectr; eval $setvar
- val="$define"; set d_sigvec; eval $setvar
-else
-: try the original name
- d_sigvectr="$undef"
- if set sigvec val -f d_sigvec; eval $csym; $val; then
- echo 'sigvec() found.' >&4
- val="$define"; set d_sigvec; eval $setvar
- else
- echo 'sigvec() not found--race conditions with signals may occur.' >&4
- val="$undef"; set d_sigvec; eval $setvar
- fi
-fi
+: see if sigvector exists
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int ret, sig;
+ struct sigvec vec, ovec;
+ ret |= sigvector(sig, &vec, &ovec);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sigvector
+set d_sigvectr
+eval $trylink
+
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int ret, sig;
+ struct sigvec vec, ovec;
+ ret |= sigvec(sig, &vec, &ovec);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sigvec
+set d_sigvec
+eval $trylink
@end
@if d_sigintrp || HAS_SIGINTRP
: see if we have siginterrupt
-set siginterrupt d_sigintrp
-eval $inlibc
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int ret, sig, flag;
+ ret |= siginterrupt(sig, flag);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=siginterrupt
+set d_sigintrp
+eval $trylink
@end