Module Name: src Committed By: chs Date: Fri Nov 2 14:53:04 UTC 2012
Modified Files: src/regress/sys/kern/ras/ras1: ras1.c src/regress/sys/kern/ras/ras2: ras2.c src/regress/sys/kern/ras/ras3: ras3.c Log Message: our current gcc puts the loop after the RAS_END() label on several platforms, adjust the code so that gcc does the right thing again. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/regress/sys/kern/ras/ras1/ras1.c cvs rdiff -u -r1.10 -r1.11 src/regress/sys/kern/ras/ras2/ras2.c cvs rdiff -u -r1.9 -r1.10 src/regress/sys/kern/ras/ras3/ras3.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/regress/sys/kern/ras/ras1/ras1.c diff -u src/regress/sys/kern/ras/ras1/ras1.c:1.8 src/regress/sys/kern/ras/ras1/ras1.c:1.9 --- src/regress/sys/kern/ras/ras1/ras1.c:1.8 Mon Apr 28 20:23:07 2008 +++ src/regress/sys/kern/ras/ras1/ras1.c Fri Nov 2 14:53:03 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ras1.c,v 1.8 2008/04/28 20:23:07 martin Exp $ */ +/* $NetBSD: ras1.c,v 1.9 2012/11/02 14:53:03 chs Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -26,6 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include <stdlib.h> #include <errno.h> #include <inttypes.h> #include <stdio.h> @@ -73,12 +74,11 @@ main(void) RAS_START(main); count++; if (count > COUNT) - goto end; + exit(handled != 0); while (!handled) { continue; } - end: RAS_END(main); return (handled != 0); Index: src/regress/sys/kern/ras/ras2/ras2.c diff -u src/regress/sys/kern/ras/ras2/ras2.c:1.10 src/regress/sys/kern/ras/ras2/ras2.c:1.11 --- src/regress/sys/kern/ras/ras2/ras2.c:1.10 Mon Apr 28 20:23:07 2008 +++ src/regress/sys/kern/ras/ras2/ras2.c Fri Nov 2 14:53:03 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ras2.c,v 1.10 2008/04/28 20:23:07 martin Exp $ */ +/* $NetBSD: ras2.c,v 1.11 2012/11/02 14:53:03 chs Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -26,6 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include <stdlib.h> #include <errno.h> #include <inttypes.h> #include <stdio.h> @@ -81,12 +82,11 @@ main(void) RAS_START(main); count++; if (count > COUNT) - goto end; + exit(handled != 0); while (!handled) { continue; } -end: RAS_END(main); return (handled != 0); Index: src/regress/sys/kern/ras/ras3/ras3.c diff -u src/regress/sys/kern/ras/ras3/ras3.c:1.9 src/regress/sys/kern/ras/ras3/ras3.c:1.10 --- src/regress/sys/kern/ras/ras3/ras3.c:1.9 Mon Apr 28 20:23:07 2008 +++ src/regress/sys/kern/ras/ras3/ras3.c Fri Nov 2 14:53:04 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ras3.c,v 1.9 2008/04/28 20:23:07 martin Exp $ */ +/* $NetBSD: ras3.c,v 1.10 2012/11/02 14:53:04 chs Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -26,6 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include <stdlib.h> #include <errno.h> #include <inttypes.h> #include <stdio.h> @@ -88,12 +89,11 @@ main(int argc, char *argv[]) RAS_START(main); count++; if (count > COUNT) - goto end; + exit(handled != 0); while (!handled) { continue; } -end: RAS_END(main); return (handled != 0);