From 750ed35d4bbec0015e2e7e1f4f3543c7217bbcb2 Mon Sep 17 00:00:00 2001 From: gingold Date: Tue, 14 Feb 2006 10:48:56 +0000 Subject: bugs fixes --- translate/grt/Makefile.inc | 3 ++- translate/grt/config/linux.c | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'translate/grt') diff --git a/translate/grt/Makefile.inc b/translate/grt/Makefile.inc index 4df527501..584ed55de 100644 --- a/translate/grt/Makefile.inc +++ b/translate/grt/Makefile.inc @@ -81,6 +81,7 @@ GRT_ADD_OBJS:=$(GRT_TARGET_OBJS) grt-cbinding.o grt-cvpi.o #GRT_USE_PTHREADS=y ifeq ($(GRT_USE_PTHREADS),y) + GRT_CFLAGS+=-DUSE_THREADS GRT_ADD_OBJS+=grt-cthreads.o GRT_EXTRA_LIB+=-lpthread endif @@ -128,7 +129,7 @@ amd64.o: $(GRTSRCDIR)/config/amd64.S $(CC) -c $(GRT_FLAGS) -o $@ $< linux.o: $(GRTSRCDIR)/config/linux.c - $(CC) -c $(GRT_FLAGS) -o $@ $< + $(CC) -c $(GRT_FLAGS) $(GRT_CFLAGS) -o $@ $< win32.o: $(GRTSRCDIR)/config/win32.c $(CC) -c $(GRT_FLAGS) -o $@ $< diff --git a/translate/grt/config/linux.c b/translate/grt/config/linux.c index ab999c0a3..2fe92c0fa 100644 --- a/translate/grt/config/linux.c +++ b/translate/grt/config/linux.c @@ -189,7 +189,12 @@ static void grt_signal_setup (void) #endif /* Context for the main stack. */ -static __thread struct stack_context main_stack_context; +#ifdef USE_THREADS +#define THREAD __thread +#else +#define THREAD +#endif +static THREAD struct stack_context main_stack_context; extern void grt_set_main_stack (struct stack_context *stack); -- cgit v1.2.3