configure.in: Remove NO_GETENV definition for win32.
* configure.in: Remove NO_GETENV definition for win32. * mach_dep.c (GC_generic_push_regs): Prevent tail call optimization. * misc.c (GC_init_inner): Call GC_thr_init for win32. (GC_set_warn_proc): Add assertion. * win32_threads.c: Import 6.3alpha2 version. * include/private/gc_priv.h: Add support for EMPTY_GETENV_RESULTS. From-SVN: r72074
This commit is contained in:
parent
f451eeefad
commit
aa44273b85
6 changed files with 390 additions and 443 deletions
|
@ -1,3 +1,12 @@
|
|||
2003-10-03 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* configure.in: Remove NO_GETENV definition for win32.
|
||||
* mach_dep.c (GC_generic_push_regs): Prevent tail call optimization.
|
||||
* misc.c (GC_init_inner): Call GC_thr_init for win32.
|
||||
(GC_set_warn_proc): Add assertion.
|
||||
* win32_threads.c: Import 6.3alpha2 version.
|
||||
* include/private/gc_priv.h: Add support for EMPTY_GETENV_RESULTS.
|
||||
|
||||
2003-09-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
|
||||
|
||||
* configure.in: Remove wildcard from Solaris 8-9/Intel and Solaris
|
||||
|
|
|
@ -137,8 +137,8 @@ case "$THREADS" in
|
|||
;;
|
||||
win32)
|
||||
AC_DEFINE(GC_WIN32_THREADS)
|
||||
dnl Wine getenv may not return NULL for missing entry
|
||||
AC_DEFINE(NO_GETENV)
|
||||
dnl Old wine getenv may not return NULL for missing entry.
|
||||
dnl Define EMPTY_GETENV_RESULTS here to work around the bug.
|
||||
;;
|
||||
dgux386)
|
||||
THREADS=dgux386
|
||||
|
|
|
@ -448,7 +448,19 @@ extern GC_warn_proc GC_current_warn_proc;
|
|||
|
||||
/* Get environment entry */
|
||||
#if !defined(NO_GETENV)
|
||||
# define GETENV(name) getenv(name)
|
||||
# if defined(EMPTY_GETENV_RESULTS)
|
||||
/* Workaround for a reputed Wine bug. */
|
||||
static inline char * fixed_getenv(const char *name)
|
||||
{
|
||||
char * tmp = getenv(name);
|
||||
if (tmp == 0 || strlen(tmp) == 0)
|
||||
return 0;
|
||||
return tmp;
|
||||
}
|
||||
# define GETENV(name) fixed_getenv(name)
|
||||
# else
|
||||
# define GETENV(name) getenv(name)
|
||||
# endif
|
||||
#else
|
||||
# define GETENV(name) 0
|
||||
#endif
|
||||
|
|
|
@ -405,6 +405,8 @@ void GC_generic_push_regs(cold_gc_frame)
|
|||
ptr_t cold_gc_frame;
|
||||
{
|
||||
{
|
||||
word dummy;
|
||||
|
||||
# ifdef HAVE_BUILTIN_UNWIND_INIT
|
||||
/* This was suggested by Richard Henderson as the way to */
|
||||
/* force callee-save registers and register windows onto */
|
||||
|
@ -448,6 +450,10 @@ ptr_t cold_gc_frame;
|
|||
}
|
||||
# endif
|
||||
GC_push_current_stack(cold_gc_frame);
|
||||
/* Strongly discourage the compiler from treating the above */
|
||||
/* as a tail-call, since that would pop the register */
|
||||
/* contents before we get a chance to look at them. */
|
||||
GC_noop1((word)(&dummy));
|
||||
}
|
||||
}
|
||||
#endif /* USE_GENERIC_PUSH_REGS */
|
||||
|
|
|
@ -638,7 +638,8 @@ void GC_init_inner()
|
|||
# if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__)
|
||||
GC_init_netbsd_elf();
|
||||
# endif
|
||||
# if defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS)
|
||||
# if defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) \
|
||||
|| defined(GC_WIN32_THREADS)
|
||||
GC_thr_init();
|
||||
# endif
|
||||
# ifdef GC_SOLARIS_THREADS
|
||||
|
@ -1002,6 +1003,9 @@ GC_warn_proc GC_current_warn_proc = GC_default_warn_proc;
|
|||
{
|
||||
GC_warn_proc result;
|
||||
|
||||
# ifdef GC_WIN32_THREADS
|
||||
GC_ASSERT(GC_is_initialized);
|
||||
# endif
|
||||
LOCK();
|
||||
result = GC_current_warn_proc;
|
||||
GC_current_warn_proc = p;
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue