mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-13 23:20:32 +02:00
* gc_os_dep.c: fix various preprocessor usages of new public
symbols to expect 0 or 1 values rather than 1 or undefined. i.e. change #ifdef to #if, etc. (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
This commit is contained in:
parent
ca74704af0
commit
91b17416c6
1 changed files with 9 additions and 7 deletions
|
@ -1078,7 +1078,7 @@ typedef int GC_bool;
|
||||||
# define STACKBOTTOM ((ptr_t)environ)
|
# define STACKBOTTOM ((ptr_t)environ)
|
||||||
# endif
|
# endif
|
||||||
# ifndef SCM_STACK_GROWS_UP /* don't fight with scmconfig.h */
|
# ifndef SCM_STACK_GROWS_UP /* don't fight with scmconfig.h */
|
||||||
# define SCM_STACK_GROWS_UP
|
# define SCM_STACK_GROWS_UP 1
|
||||||
# endif
|
# endif
|
||||||
# define DYNAMIC_LOADING
|
# define DYNAMIC_LOADING
|
||||||
# ifndef HPUX_THREADS
|
# ifndef HPUX_THREADS
|
||||||
|
@ -1265,9 +1265,11 @@ typedef int GC_bool;
|
||||||
# define DATASTART ((ptr_t)(&__data_start != 0? &__data_start : &data_start))
|
# define DATASTART ((ptr_t)(&__data_start != 0? &__data_start : &data_start))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# ifndef SCM_STACK_GROWS_UP
|
# if SCM_STACK_GROWS_UP
|
||||||
# define STACK_GROWS_DOWN
|
# define STACK_GROWS_DOWN 0
|
||||||
# endif
|
# else
|
||||||
|
# define STACK_GROWS_DOWN 1
|
||||||
|
#endif
|
||||||
|
|
||||||
# ifndef CPP_WORDSZ
|
# ifndef CPP_WORDSZ
|
||||||
# define CPP_WORDSZ 32
|
# define CPP_WORDSZ 32
|
||||||
|
@ -1864,7 +1866,7 @@ void *scm_get_stack_base()
|
||||||
return(STACKBOTTOM);
|
return(STACKBOTTOM);
|
||||||
# else
|
# else
|
||||||
# ifdef HEURISTIC1
|
# ifdef HEURISTIC1
|
||||||
# ifdef STACK_GROWS_DOWN
|
# if STACK_GROWS_DOWN
|
||||||
result = (ptr_t)((((word)(&dummy))
|
result = (ptr_t)((((word)(&dummy))
|
||||||
+ STACKBOTTOM_ALIGNMENT_M1)
|
+ STACKBOTTOM_ALIGNMENT_M1)
|
||||||
& ~STACKBOTTOM_ALIGNMENT_M1);
|
& ~STACKBOTTOM_ALIGNMENT_M1);
|
||||||
|
@ -1877,7 +1879,7 @@ void *scm_get_stack_base()
|
||||||
result = GC_linux_stack_base();
|
result = GC_linux_stack_base();
|
||||||
# endif
|
# endif
|
||||||
# ifdef HEURISTIC2
|
# ifdef HEURISTIC2
|
||||||
# ifdef STACK_GROWS_DOWN
|
# if STACK_GROWS_DOWN
|
||||||
result = GC_find_limit((ptr_t)(&dummy), TRUE);
|
result = GC_find_limit((ptr_t)(&dummy), TRUE);
|
||||||
# ifdef HEURISTIC2_LIMIT
|
# ifdef HEURISTIC2_LIMIT
|
||||||
if (result > HEURISTIC2_LIMIT
|
if (result > HEURISTIC2_LIMIT
|
||||||
|
@ -1896,7 +1898,7 @@ void *scm_get_stack_base()
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# endif /* HEURISTIC2 */
|
# endif /* HEURISTIC2 */
|
||||||
# ifdef STACK_GROWS_DOWN
|
# if STACK_GROWS_DOWN
|
||||||
if (result == 0) result = (ptr_t)(signed_word)(-sizeof(ptr_t));
|
if (result == 0) result = (ptr_t)(signed_word)(-sizeof(ptr_t));
|
||||||
# endif
|
# endif
|
||||||
return(result);
|
return(result);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue