2013-08-14
2013-08-14 09:23:42 by Marcus Comstedt <marcus@mc.pp.se>
-
9d8034a1eed7721118cb70edf01cc0f9bf71c391
(11 lines)
(+11/-0)
[
Show
| Annotate
]
Branch: 7.9
Runtime: Fix references to threads_disabled if no threads
82: Inside #if defined(COMPILER_DEBUG)
#ifdef COMPILER_DEBUG
#define CDFPRINTF(X) fprintf X
+ #ifndef PIKE_THREADS
+ /* The CDFPRINTF lines wants to print threads_disabled, so fake on of those */
+ static const int threads_disabled = 1;
+ #endif
#else /* !COMPILER_DEBUG */
#define CDFPRINTF(X)
#endif /* COMPILER_DEBUG */
8926:
debug_malloc_touch(c);
debug_malloc_touch(c->placeholder);
#if 0 /* FIXME */
+ #ifdef PIKE_THREADS
if (threads_disabled != c->saved_threads_disabled) {
Pike_fatal("compile(): threads_disabled:%d saved_threads_disabled:%d\n",
threads_disabled, c->saved_threads_disabled);
}
-
+ #endif
#endif /* PIKE_DEBUG */
exit_threads_disable(NULL);
9390:
c->flags |= COMPILER_BUSY;
low_init_threads_disable();
+ #ifdef PIKE_THREADS
c->saved_threads_disabled = threads_disabled;
-
+ #endif
init_supporter(& c->supporter,
(supporter_callback *) call_delayed_pass2,
10348:
#endif
low_init_threads_disable();
+ #ifdef PIKE_THREADS
c->saved_threads_disabled = threads_disabled;
-
+ #endif
init_supporter(& c->supporter,
(supporter_callback *) call_delayed_pass2,