Wed May 18 19:44:18 2011 UTC ()
Include err.h to provide prototype for err().


(mellon)
diff -r1.8 -r1.9 src/regress/sys/arch/arm/abort-fixup/abortfixup.c

cvs diff -r1.8 -r1.9 src/regress/sys/arch/arm/abort-fixup/abortfixup.c (expand / switch to unified diff)

--- src/regress/sys/arch/arm/abort-fixup/abortfixup.c 2008/04/28 20:23:05 1.8
+++ src/regress/sys/arch/arm/abort-fixup/abortfixup.c 2011/05/18 19:44:18 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: abortfixup.c,v 1.8 2008/04/28 20:23:05 martin Exp $ */ 1/* $NetBSD: abortfixup.c,v 1.9 2011/05/18 19:44:18 mellon Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2001 The NetBSD Foundation, Inc. 4 * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -22,33 +22,34 @@ @@ -22,33 +22,34 @@
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 * 27 *
28 * 28 *
29 * Trying out if an unhandled instruction pattern in the late abort fixup 29 * Trying out if an unhandled instruction pattern in the late abort fixup
30 * generates a panic or sysfaults like it ought to do. 30 * generates a panic or sysfaults like it ought to do.
31 */ 31 */
32 32
33#include <sys/types.h> 33#include <sys/types.h>
34 34
35__RCSID("$NetBSD: abortfixup.c,v 1.8 2008/04/28 20:23:05 martin Exp $"); 35__RCSID("$NetBSD: abortfixup.c,v 1.9 2011/05/18 19:44:18 mellon Exp $");
36 36
37#include <setjmp.h> 37#include <setjmp.h>
38#include <signal.h> 38#include <signal.h>
39#include <stdio.h> 39#include <stdio.h>
40#include <stdlib.h> 40#include <stdlib.h>
41#include <stdio.h> 41#include <stdio.h>
 42#include <err.h>
42 43
43jmp_buf buf; 44jmp_buf buf;
44 45
45void 46void
46sighandler(int sig) 47sighandler(int sig)
47{ 48{
48 49
49 /* Catching SIGSEGV means the test passed. */ 50 /* Catching SIGSEGV means the test passed. */
50 longjmp(buf, 1); 51 longjmp(buf, 1);
51} 52}
52 53
53int 54int
54main(void) 55main(void)