1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* configure.in: can't subtract void *.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nari 2011-07-08 05:39:50 +00:00
parent b4582e79d7
commit c3e0526269
2 changed files with 9 additions and 5 deletions

View file

@ -1,3 +1,7 @@
Fri Jul 8 14:29:47 2011 Narihiro Nakamura <authornari@gmail.com>
* configure.in: can't subtract void *.
Fri Jul 8 14:33:26 2011 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/Makefile.sub (config.h): define GC_MARK_STACKFRAME_WORD.

View file

@ -1235,7 +1235,7 @@ AC_CACHE_CHECK(for gc_mark and gc_children stack frame approximate size(word), r
CFLAGS="-O0"
AC_TRY_RUN([
int word;
void *stack_start;
char *stack_start;
void
set_stackframe_word()
@ -1243,11 +1243,11 @@ set_stackframe_word()
int dumy = 42;
int diff;
if (stack_start < (void *)&dumy) {
diff = (int)((void *)&dumy - stack_start);
if (stack_start < (char *)&dumy) {
diff = (int)((char *)&dumy - stack_start);
}
else {
diff = (int)(stack_start - (void *)&dumy);
diff = (int)(stack_start - (char *)&dumy);
}
word = (diff/sizeof(void *));
if ((diff % sizeof(void *)) != 0) {
@ -1275,7 +1275,7 @@ int
main() {
int dumy = 42;
stack_start = (void *)&dumy;
stack_start = (char *)&dumy;
gc_mark(0, 0, 255);
return word;
}