* 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:
parent
f190c6255e
commit
9b28f8873c
@ -1,6 +1,5 @@
|
||||
SubDir HAIKU_TOP src tests system libroot posix ;
|
||||
|
||||
SetSubDirSupportedPlatforms libbe_test ;
|
||||
UsePrivateHeaders syslog_daemon ;
|
||||
|
||||
SimpleTest SyslogTest
|
||||
@ -15,6 +14,10 @@ SimpleTest setjmp_test
|
||||
: setjmp_test.c
|
||||
;
|
||||
|
||||
SimpleTest sigsetjmp_test
|
||||
: sigsetjmp_test.c
|
||||
;
|
||||
|
||||
# Tell Jam where to find these sources
|
||||
SEARCH on [ FGristFiles
|
||||
syslog.cpp
|
||||
|
@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright 2005, Axel Dörfler, axeld@pinc-software.de.
|
||||
* Copyright 2005-2006, Axel Dörfler, axeld@pinc-software.de.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
int
|
||||
@ -14,7 +14,7 @@ main(int argc, char **argv)
|
||||
jmp_buf state;
|
||||
int value;
|
||||
|
||||
if (value = setjmp(state)) {
|
||||
if ((value = setjmp(state)) != 0) {
|
||||
printf("failed with: %d!\n", value);
|
||||
} else {
|
||||
printf("here I am: %d\n", value);
|
||||
|
@ -1,13 +1,14 @@
|
||||
/*
|
||||
* Copyright 2005, Axel Dörfler, axeld@pinc-software.de.
|
||||
* Copyright 2005-2006, Axel Dörfler, axeld@pinc-software.de.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void
|
||||
|
||||
static void
|
||||
jump_to_top_level(jmp_buf *state, int value)
|
||||
{
|
||||
siglongjmp(*state, value);
|
||||
@ -20,7 +21,7 @@ main(int argc, char **argv)
|
||||
jmp_buf state;
|
||||
int value;
|
||||
|
||||
if (value = sigsetjmp(state, 1)) {
|
||||
if ((value = sigsetjmp(state, 1)) != 0) {
|
||||
printf("failed with: %d!\n", value);
|
||||
} else {
|
||||
printf("here I am: %d\n", value);
|
||||
|
Loading…
Reference in New Issue
Block a user