?RCS: $Id: d_bsdjmp.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 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 License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_bsdjmp.U,v $ ?RCS: Revision 3.0.1.2 1997/02/28 15:31:10 ram ?RCS: patch61: added ?F: metalint hint ?RCS: ?RCS: Revision 3.0.1.1 1994/10/29 16:09:09 ram ?RCS: patch36: call ./usg explicitely instead of relying on PATH ?RCS: ?RCS: Revision 3.0 1993/08/18 12:05:45 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:d_bsdjmp: Guess Setvar cat +cc libs rm ?MAKE: -pick add $@ %< ?S:d_bsdjmp: ?S: This variable conditionally defines USE_BSDJMP if BSD _setjmp and ?S: _longjmp routines are available to do non-local gotos without saving ?S: or restoring the signal mask flag. ?S:. ?C:USE_BSDJMP (BSDJMP): ?C: This symbol, if defined, indicates that the BSD _setjmp and _longjmp ?C: routines are available to do non-local gotos wihtout saving or restoring ?C: the signal mask flag. ?C:. ?H:#$d_bsdjmp USE_BSDJMP /**/ ?H:. ?F:!set ?LINT:set d_bsdjmp : see if _setjmp and _longjmp exists echo " " case "$d_bsdjmp" in '') $cat >set.c < jmp_buf env; int set = 1; int main() { if (_setjmp(env)) exit(set); set = 0; _longjmp(env, 1); exit(1); } EOP if $cc -o set set.c $libs >/dev/null 2>&1; then if ./set >/dev/null 2>&1; then echo "Good! You have BSD _setjmp and _longjmp routines." >&4 val="$define" else $cat <&4 else cat <&4;; $undef) echo "You do not have _setjmp and _longjmp, but that's fine." >&4;; esac ;; esac set d_bsdjmp eval $setvar $rm -f set.c set