Hello Nobuyoshi,


NN> Although your compiler seems to be odd,

Well it's Microsoft, so it's odd by definition ;-)

NN> "thread" is a too common name

The german messages is telling me:
"Konstruktor mit Ergebnistyp oder unzulaessige Neudefinition eines
Klassennamens?" means "Constructor with result type or not allowed
redefinition of a classname"

and "Keine Elemente definiert, die diesen Typ verwenden" means
"no elements that use this type".

The only conclusion is that for some reasons it things that thread
is not the name part of the identifier declaration but the start of a
constructor. This is strange indeed.

But it's okay if you redefined it now. I wait for the first patch to
1.8.6


NN> anyway.  It should have been renamed as "rb_thread" or such when it'd
NN> been exposed, I guess.

NN> 
NN> Index: eval.c NN> =================================================================== NN> --- eval.c (revision 12059) NN> +++ eval.c (working copy) NN> @@ -244,6 +244,6 @@ static int scope_vmode; NN> #define SCOPE_TEST(f) (scope_vmode&(f)) NN> -VALUE (*ruby_sandbox_save)(struct thread *) = NULL; NN> -VALUE (*ruby_sandbox_restore)(struct thread *) = NULL; NN> +VALUE (*ruby_sandbox_save)(rb_thread_t) = NULL; NN> +VALUE (*ruby_sandbox_restore)(rb_thread_t) = NULL; NN> NODE* ruby_current_node; NN> int ruby_safe_level = 0; NN> @@ -9828,6 +9828,4 @@ extern VALUE rb_last_status; NN> #endif NN> -/* typedef struct thread * rb_thread_t; */ NN> - NN> #define THREAD_RAISED 0x200 /* temporary flag */ NN> #define THREAD_TERMINATING 0x400 /* persistent flag */ NN> @@ -9852,5 +9850,5 @@ struct thread_status_t { NN> int safe; NN> - enum thread_status status; NN> + enum rb_thread_status status; NN> int wait_for; NN> int fd; NN> @@ -9954,5 +9952,5 @@ rb_trap_eval(cmd, sig, safe) NN> static const char * NN> thread_status_name(status) NN> - enum thread_status status; NN> + enum rb_thread_status status; NN> { NN> switch (status) { NN> @@ -11012,5 +11010,5 @@ rb_thread_join(th, limit) NN> double limit; NN> { NN> - enum thread_status last_status = THREAD_RUNNABLE; NN> + enum rb_thread_status last_status = THREAD_RUNNABLE; NN> if (rb_thread_critical) rb_thread_deadlock(); NN> @@ -11395,5 +11393,5 @@ VALUE NN> rb_thread_stop() NN> { NN> - enum thread_status last_status = THREAD_RUNNABLE; NN> + enum rb_thread_status last_status = THREAD_RUNNABLE; NN> rb_thread_critical = 0; NN> @@ -11659,5 +11657,5 @@ rb_thread_group(thread) NN> #define THREAD_ALLOC(th) do {\ NN> - th = ALLOC(struct thread);\ NN> + th = ALLOC(struct rb_thread);\ NN> \ NN> th->next = 0;\ NN> @@ -11824,5 +11822,5 @@ rb_thread_start_0(fn, arg, th) NN> volatile VALUE thread = th->thread; NN> struct BLOCK *volatile saved_block = 0; NN> - enum thread_status status; NN> + enum rb_thread_status status; NN> int state; NN> Index: node.h NN> =================================================================== NN> --- node.h (revision 12059) NN> +++ node.h (working copy) NN> @@ -391,5 +391,5 @@ typedef jmp_buf rb_jmpbuf_t; NN> #endif NN> -enum thread_status { NN> +enum rb_thread_status { NN> THREAD_TO_KILL, NN> THREAD_RUNNABLE, NN> @@ -398,8 +398,9 @@ enum thread_status { NN> }; NN> -typedef struct thread * rb_thread_t; NN> +typedef struct rb_thread *rb_thread_t; NN> +struct st_table; NN> -struct thread { NN> - struct thread *next, *prev; NN> +struct rb_thread { NN> + struct rb_thread *next, *prev; NN> rb_jmpbuf_t context; NN> #if (defined _WIN32 && !defined _WIN32_WCE) || defined __CYGWIN__ NN> @@ -442,5 +443,5 @@ struct thread { NN> int safe; NN> - enum thread_status status; NN> + enum rb_thread_status status; NN> int wait_for; NN> int fd; NN> @@ -456,5 +457,5 @@ struct thread { NN> VALUE thgroup; NN> - st_table *locals; NN> + struct st_table *locals; NN> VALUE thread; NN> @@ -463,6 +464,6 @@ struct thread { NN> }; NN> -extern VALUE (*ruby_sandbox_save)(struct thread *); NN> -extern VALUE (*ruby_sandbox_restore)(struct thread *); NN> +extern VALUE (*ruby_sandbox_save)(rb_thread_t); NN> +extern VALUE (*ruby_sandbox_restore)(rb_thread_t); NN> extern rb_thread_t curr_thread; NN> extern rb_thread_t main_thread; NN>
-- Best regards, emailto: scholz at scriptolutions dot com Lothar Scholz http://www.ruby-ide.com CTO Scriptolutions Ruby, PHP, Python IDE 's