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

* configure.in (rb_cv_rshift_sign, rb_cv_binary_elf): get rid of

AC_TRY_RUN.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-08-09 12:10:54 +00:00
parent b9d3995310
commit cf7ad7e057
2 changed files with 17 additions and 31 deletions

View file

@ -1,3 +1,8 @@
Sat Aug 9 21:10:51 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (rb_cv_rshift_sign, rb_cv_binary_elf): get rid of
AC_TRY_RUN.
Sat Aug 9 19:28:50 2008 Tanaka Akira <akr@fsij.org>
* transcode.c (transcode_char_start): arguments changed.

View file

@ -979,18 +979,9 @@ if test x"$target_cpu" = xia64; then
fi
AC_CACHE_CHECK(whether right shift preserve sign bit, rb_cv_rshift_sign,
[AC_TRY_RUN([
int
main()
{
if (-1==(-1>>1))
return 0;
return 1;
}
],
[AC_COMPILE_IFELSE(AC_LANG_BOOL_COMPILE_TRY([], [(-1==(-1>>1))]),
rb_cv_rshift_sign=yes,
rb_cv_rshift_sign=no,
rb_cv_rshift_sign=yes)])
rb_cv_rshift_sign=no)])
if test "$rb_cv_rshift_sign" = yes; then
AC_DEFINE(RSHIFT(x,y), ((x)>>(int)y))
else
@ -1232,26 +1223,16 @@ AC_ARG_WITH(dln-a-out,
esac], [with_dln_a_out=no])
AC_CACHE_CHECK(whether ELF binaries are produced, rb_cv_binary_elf,
[AC_TRY_RUN([
/* Test for whether ELF binaries are produced */
#include <fcntl.h>
#include <stdlib.h>
main() {
char buffer[4];
int i=open("conftest",O_RDONLY);
if(i==-1)
exit(1); /* fail */
if(read(i,&buffer[0],4)<4)
exit(1); /* fail */
if(buffer[0] != 127 || buffer[1] != 'E' ||
buffer[2] != 'L' || buffer[3] != 'F')
exit(1); /* fail */
exit(0); /* succeed (yes, it's ELF) */
}
],
rb_cv_binary_elf=yes,
rb_cv_binary_elf=no,
rb_cv_binary_elf=yes)])
[AC_TRY_LINK([],[], [
case "`head -1 conftest$EXEEXT | cat -e`" in
dnl (
'^?ELF'*)
rb_cv_binary_elf=yes;;
dnl (
*)
rb_cv_binary_elf=no;;
esac],
rb_cv_binary_elf=no)])
if test "$rb_cv_binary_elf" = yes; then
AC_DEFINE(USE_ELF)