Fixup Win32
Nick Ing-Simmons [Wed, 12 Nov 1997 02:45:15 +0000 (02:45 +0000)]
- #undef start_env before re-#defining it
- change pp_specific pp_threadsv in global.sym
- re-build embed.h
- avoid HAVE_THREAD_INTERN - we don't and empty struct
  is a pain. If we did have it it would contain cached
  values of things we can only get at _IN_ the thread
  so new_struct_thread is wrong place to call it.
- add new macro SET_THREAD_SELF - we must (in main thread)
  define in win32thread.h, support in win32thread.c,
  test and call in perl.c

p4raw-id: //depot/ansiperl@237

embed.h
global.sym
perl.c
thread.h
win32/win32thread.c
win32/win32thread.h

diff --git a/embed.h b/embed.h
index 32c2fcc..f911bae 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define pp_socket              Perl_pp_socket
 #define pp_sockpair            Perl_pp_sockpair
 #define pp_sort                        Perl_pp_sort
-#define pp_specific            Perl_pp_specific
 #define pp_splice              Perl_pp_splice
 #define pp_split               Perl_pp_split
 #define pp_sprintf             Perl_pp_sprintf
 #define pp_syswrite            Perl_pp_syswrite
 #define pp_tell                        Perl_pp_tell
 #define pp_telldir             Perl_pp_telldir
+#define pp_threadsv            Perl_pp_threadsv
 #define pp_tie                 Perl_pp_tie
 #define pp_tied                        Perl_pp_tied
 #define pp_time                        Perl_pp_time
index c2c8b0b..178fa29 100644 (file)
@@ -958,7 +958,6 @@ pp_snetent
 pp_socket
 pp_sockpair
 pp_sort
-pp_specific
 pp_splice
 pp_split
 pp_sprintf
@@ -992,6 +991,7 @@ pp_tied
 pp_time
 pp_tms
 pp_trans
+pp_threadsv
 pp_truncate
 pp_uc
 pp_ucfirst
diff --git a/perl.c b/perl.c
index 7264648..7b49b7b 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -2843,6 +2843,10 @@ init_main_thread()
 
 #ifdef HAVE_THREAD_INTERN
     init_thread_intern(thr);
+#endif
+
+#ifdef SET_THREAD_SELF
+    SET_THREAD_SELF(thr);
 #else
     thr->self = pthread_self();
 #endif /* HAVE_THREAD_INTERN */
index 2f81e35..80da097 100644 (file)
--- a/thread.h
+++ b/thread.h
@@ -309,6 +309,7 @@ typedef struct condpair {
 #undef chopset
 #undef formtarget
 #undef bodytarget
+#undef  start_env
 #undef toptarget
 #undef top_env
 #undef runlevel
index dfa9a0c..9219967 100644 (file)
@@ -15,7 +15,7 @@ Perl_alloc_thread_key(void)
 }
 
 void
-init_thread_intern(struct thread *thr)
+Perl_set_thread_self(struct thread *thr)
 {
 #ifdef USE_THREADS
     /* GetCurrentThread() retrurns a pseudo handle, need
index 75aa25b..03b0807 100644 (file)
@@ -105,12 +105,12 @@ typedef THREAD_RET_TYPE thread_func_t(void *);
 START_EXTERN_C
 void Perl_alloc_thread_key _((void));
 int Perl_thread_create _((struct thread *thr, thread_func_t *fn));
-void Perl_init_thread_intern _((struct thread *thr));
+void Perl_set_thread_self _((struct thread *thr));
 END_EXTERN_C
 
 #define INIT_THREADS NOOP
 #define ALLOC_THREAD_KEY Perl_alloc_thread_key()
-#define INIT_THREAD_INTERN(thr) Perl_init_thread_intern(thr)
+#define SET_THREAD_SELF(thr) Perl_set_thread_self(thr)
 
 #define JOIN(t, avp)                                                   \
     STMT_START {                                                       \