hi,

i would like to check something which, if it is the case,
may make porting FreeDCE to wine a no-brainer.

i notice that there exists pthread emulation in Wine: it
says so at the top of wine/dlls/kernel/pthread.c

can i therefore expect the following things:

1) the attached test program to compile and work under wine,
with a few macros and/or simple wrapper functions e.g. redirect
RAISE to RaiseException?

2) a program that uses posix threads to also at the same time
be able to use Wine Exception routines/macros, try/except/catch?


... wouldn't it be ironic if Wine's pthreads emulation turned
out to provide exactly the posix draft 4 threading semantics
that FreeDCE programs expect?

l.

-- 
--
<a href="http://lkcl.net";>http://lkcl.net</a>
--
/*
 * 
 * Exception Test RERAISE.
 *
 * RERAISE in the inner TRY block should dispatch to the
 * outer TRY block.
 *
 * This test insures that TRY block context is properly popped, 
 * as well as scope rules work on RERAISE.
 *
 *
 *
 */


#include <dce/pthread_exc.h>
#include <stdio.h>
#include <string.h>

static EXCEPTION e1, e2;

int main()
{

	printf ("test1:  General test of EXC_MATCH and RERAISE.\n");
	EXCEPTION_INIT(e1);
	EXCEPTION_INIT(e2);


	TRY
	{
		TRY
		{
			printf("about to raise e1\n");
			RAISE(e1);
		}
		CATCH(e2)
		{
			printf("\t... caught e2 in inner CATCH block. reraising.\n");
			RERAISE;
		}
		CATCH(e1)
		{
			printf("\t... caught e1 in inner CATCH block. reraising.\n");
			RERAISE;
		}
		CATCH_ALL
		{
			printf("\t... caught e1 in CATCH_ALL block. reraising.\n");
			RERAISE;
		}
		ENDTRY
	}
	CATCH(e2)
	{
		printf("\t... caught e2 in outer CATCH block.\n");
	}
	CATCH(e1)
	{
		printf("\t... caught e1 in outer CATCH block.\n");
	}
	CATCH_ALL
	{
		printf("\t... caught e1 in outer CATCH_ALL block.\n");
	}
	ENDTRY;

	printf("done. normal exit. \n");
	return 0;
}

Reply via email to