* Added sigsetjmp_test to Jamfile.
* Fixed Jamfile (was set to only support libbe_test). * Fixed warnings. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17457 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
SubDir HAIKU_TOP src tests system libroot posix ;
|
SubDir HAIKU_TOP src tests system libroot posix ;
|
||||||
|
|
||||||
SetSubDirSupportedPlatforms libbe_test ;
|
|
||||||
UsePrivateHeaders syslog_daemon ;
|
UsePrivateHeaders syslog_daemon ;
|
||||||
|
|
||||||
SimpleTest SyslogTest
|
SimpleTest SyslogTest
|
||||||
@@ -15,6 +14,10 @@ SimpleTest setjmp_test
|
|||||||
: setjmp_test.c
|
: setjmp_test.c
|
||||||
;
|
;
|
||||||
|
|
||||||
|
SimpleTest sigsetjmp_test
|
||||||
|
: sigsetjmp_test.c
|
||||||
|
;
|
||||||
|
|
||||||
# Tell Jam where to find these sources
|
# Tell Jam where to find these sources
|
||||||
SEARCH on [ FGristFiles
|
SEARCH on [ FGristFiles
|
||||||
syslog.cpp
|
syslog.cpp
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2005, Axel Dörfler, [email protected].
|
* Copyright 2005-2006, Axel Dörfler, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -14,7 +14,7 @@ main(int argc, char **argv)
|
|||||||
jmp_buf state;
|
jmp_buf state;
|
||||||
int value;
|
int value;
|
||||||
|
|
||||||
if (value = setjmp(state)) {
|
if ((value = setjmp(state)) != 0) {
|
||||||
printf("failed with: %d!\n", value);
|
printf("failed with: %d!\n", value);
|
||||||
} else {
|
} else {
|
||||||
printf("here I am: %d\n", value);
|
printf("here I am: %d\n", value);
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2005, Axel Dörfler, [email protected].
|
* Copyright 2005-2006, Axel Dörfler, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
void
|
|
||||||
|
static void
|
||||||
jump_to_top_level(jmp_buf *state, int value)
|
jump_to_top_level(jmp_buf *state, int value)
|
||||||
{
|
{
|
||||||
siglongjmp(*state, value);
|
siglongjmp(*state, value);
|
||||||
@@ -20,7 +21,7 @@ main(int argc, char **argv)
|
|||||||
jmp_buf state;
|
jmp_buf state;
|
||||||
int value;
|
int value;
|
||||||
|
|
||||||
if (value = sigsetjmp(state, 1)) {
|
if ((value = sigsetjmp(state, 1)) != 0) {
|
||||||
printf("failed with: %d!\n", value);
|
printf("failed with: %d!\n", value);
|
||||||
} else {
|
} else {
|
||||||
printf("here I am: %d\n", value);
|
printf("here I am: %d\n", value);
|
||||||
|
|||||||
Reference in New Issue
Block a user