GMP
HAVE_MALLOC_ZONE_MEMALIGN
MAKEINFO
-AWK
GCL_CC
+AWK
CPP
OBJEXT
EXEEXT
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-GCL_CC=`basename $CC`
-if echo $GCL_CC |grep gcc |grep -q win; then
- GCL_CC=gcc
-fi
-
add_arg_to_cflags() {
add_args_to_ldflags -no-pie # -Wl,-z,lazy
+CC=gcc
+GCL_CC=gcc
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline semantics" >&5
+printf %s "checking for inline semantics... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ extern inline int foo(int i) {return i;}
+
+ int
+ bar(int i) {return foo(i);}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if ! `nm conftest.o |grep -q "T foo"` ; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: old" >&5
+printf "%s\n" "old" >&6; }
+
+printf "%s\n" "#define OLD_INLINE 1" >>confdefs.h
+
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ inline int foo(int i) {return i;}
+
+ int
+ bar(int i) {return foo(i);}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if ! `nm conftest.o |grep -q "T foo"` ; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: new" >&5
+printf "%s\n" "new" >&6; }
+ else
+ as_fn_error $? "need working inline semantics" "$LINENO" 5
+ fi
+else $as_nop
+ as_fn_error $? "need to probe inline semantics" "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+else $as_nop
+ as_fn_error $? "need to probe inline semantics" "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clang" >&5
printf %s "checking for clang... " >&6; }
if test "$cross_compiling" = yes
test -n "$AWK" && break
done
+GCL_CC_ARGS=`echo $CC | ${AWK} '{$1="";print}'`
+GCL_CC="`basename $CC` $GCL_CC_ARGS"
+if echo $GCL_CC |grep gcc |grep -q win; then
+ GCL_CC=gcc
+fi
+
# Check whether --enable-gprof was given.
if test ${enable_gprof+y}
AC_PROG_CC
AC_PROG_CPP
AC_SUBST(CC)
-GCL_CC=`basename $CC`
-if echo $GCL_CC |grep gcc |grep -q win; then
- GCL_CC=gcc
-fi
-AC_SUBST(GCL_CC)
add_arg_to_cflags() {
add_args_to_ldflags -no-pie # -Wl,-z,lazy
+AC_MSG_CHECKING([for inline semantics])
+AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([[
+ extern inline int foo(int i) {return i;}
+
+ int
+ bar(int i) {return foo(i);}
+ ]])],
+ [if ! `nm conftest.o |grep -q "T foo"` ; then
+ AC_MSG_RESULT([old])
+ AC_DEFINE([OLD_INLINE],[1],[extern inline semantics])
+ else
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([[
+ inline int foo(int i) {return i;}
+
+ int
+ bar(int i) {return foo(i);}
+ ]])],
+ [if ! `nm conftest.o |grep -q "T foo"` ; then
+ AC_MSG_RESULT([new])
+ else
+ AC_MSG_ERROR([need working inline semantics])
+ fi],
+ [AC_MSG_ERROR([need to probe inline semantics])])
+ fi],
+ [AC_MSG_ERROR([need to probe inline semantics])])
+
AC_MSG_CHECKING([for clang])
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
esac
AC_CHECK_PROGS(AWK,[gawk nawk awk])
+GCL_CC_ARGS=`echo $CC | ${AWK} '{$1="";print}'`
+GCL_CC="`basename $CC` $GCL_CC_ARGS"
+if echo $GCL_CC |grep gcc |grep -q win; then
+ GCL_CC=gcc
+fi
+AC_SUBST(GCL_CC)
AC_ARG_ENABLE([gprof],[ --enable-gprof builds gcl with -pg in CFLAGS to enable profiling with gprof],
[if test "$enableval" = "yes" ; then
#define EXTER extern
#endif
#ifndef INLINE
-#if (defined(__GNUC__) && __GNUC__ <= 4) && !defined __clang__
+#ifdef OLD_INLINE
#define INLINE extern inline
#else
#define INLINE inline
/* running clang compiler */
#undef CLANG
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
- systems. This function is required for `alloca.c' support on those systems.
- */
-#undef CRAY_STACKSEG_END
-
/* cstack max */
#undef CSTACKMAX
/* whether C stack grows up or down */
#undef CSTACK_DIRECTION
-/* Define to 1 if using `alloca.c'. */
+/* Define to 1 if using 'alloca.c'. */
#undef C_ALLOCA
/* debug safecdr code */
/* using gmp */
#undef GMP
-/* Define to 1 if you have `alloca', as a function or macro. */
+/* Define to 1 if you have 'alloca', as a function or macro. */
#undef HAVE_ALLOCA
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- */
+/* Define to 1 if <alloca.h> works. */
#undef HAVE_ALLOCA_H
/* Define to 1 if you have the <asm/sigcontext.h> header file. */
/* Define to 1 if you have the <math.h> header file. */
#undef HAVE_MATH_H
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
/* Define to 1 if you have the `mprotect' function. */
#undef HAVE_MPROTECT
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* needed object alignment bytes */
#undef OBJ_ALIGNMENT
+/* extern inline semantics */
+#undef OLD_INLINE
+
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* staticly linked images */
#undef STATIC_LINKING
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+ required in a freestanding environment). This macro is provided for
+ backward compatibility; new code need not use it. */
#undef STDC_HEADERS
/* have _cleanup function */
/* #define FPE_CODE(i_) make_fixnum((fixnum)SF(i_)->si_code) */
#ifdef __i386__
-#define FPE_CODE(i_,v_) make_fixnum(FFN(fSfpe_code)(UC(v_)->uc_mcontext.fpregs->sw,((struct _fpstate *)UC(v_)->uc_mcontext.fpregs)->mxcsr))
+#define FPE_CODE(i_,v_) make_fixnum((long)FFN(fSfpe_code)(UC(v_)->uc_mcontext.fpregs->sw,((struct _fpstate *)UC(v_)->uc_mcontext.fpregs)->mxcsr))
#define FPE_ADDR(i_,v_) make_fixnum((UC(v_)->uc_mcontext.fpregs->tag!=-1) ? UC(v_)->uc_mcontext.fpregs->ipoff : (fixnum)SF(i_)->si_addr)
#else
-#define FPE_CODE(i_,v_) make_fixnum(FFN(fSfpe_code)(UC(v_)->uc_mcontext.fpregs->swd,((struct _fpstate *)UC(v_)->uc_mcontext.fpregs)->mxcsr))
+#define FPE_CODE(i_,v_) make_fixnum((long)FFN(fSfpe_code)(UC(v_)->uc_mcontext.fpregs->swd,((struct _fpstate *)UC(v_)->uc_mcontext.fpregs)->mxcsr))
#define FPE_ADDR(i_,v_) make_fixnum(UC(v_)->uc_mcontext.fpregs->fop ? UC(v_)->uc_mcontext.fpregs->rip : (fixnum)SF(i_)->si_addr)
#endif
#define FPE_CTXT(v_) list(3,make_fixnum((fixnum)&UC(v_)->uc_mcontext.gregs), \
typedef double longfloat;
typedef union lispunion *object;
+typedef union typeunion *hobj;
#ifndef WORDS_BIGENDIAN
struct sfarray sfa;
struct lfarray lfa;
};
+
+union typeunion {
+ struct dummy d;
+ fixnum fw;
+};
#endif
/*Note preserve sgc flag here VVV*/
-#define set_type_of(x,y) ({object _x=(object)(x);enum type _y=(y);_x->d.f=0;\
+#define set_type_of(x,y) ({hobj _x=(hobj)(x);enum type _y=(y);_x->d.f=0; \
if (TYPEWORD_TYPE_P(_y)) {_x->d.e=1;_x->d.t=_y;_x->fw|=(fixnum)OBJNULL;}})
#ifndef WIDE_CONS
DEFUN_NEW("FPE_CODE",object,fSfpe_code,SI,2,2,NONE,II,OO,OO,OO,(fixnum x87sw,fixnum mxcsr),"") {
- RETURN1((object)(FE_TEST(x87sw,mxcsr,FE_INVALID) ? FPE_FLTINV :
- (FE_TEST(x87sw,mxcsr,FE_DIVBYZERO) ? FPE_FLTDIV :
- (FE_TEST(x87sw,mxcsr,FE_OVERFLOW) ? FPE_FLTOVF :
- (FE_TEST(x87sw,mxcsr,FE_UNDERFLOW) ? FPE_FLTUND :
- (FE_TEST(x87sw,mxcsr,FE_INEXACT) ? FPE_FLTRES : 0))))));
+ RETURN1((object)(long)(FE_TEST(x87sw,mxcsr,FE_INVALID) ? FPE_FLTINV :
+ (FE_TEST(x87sw,mxcsr,FE_DIVBYZERO) ? FPE_FLTDIV :
+ (FE_TEST(x87sw,mxcsr,FE_OVERFLOW) ? FPE_FLTOVF :
+ (FE_TEST(x87sw,mxcsr,FE_UNDERFLOW) ? FPE_FLTUND :
+ (FE_TEST(x87sw,mxcsr,FE_INEXACT) ? FPE_FLTRES : 0))))));
}
#if defined(__MINGW32__) || defined(__CYGWIN__)
va_list ap;
object *new;
va_start(ap,n);
- {
- COERCE_VA_LIST(new,ap,n);
- }
+ COERCE_VA_LIST(new,ap,n);
va_end(ap);
return IapplyVector(fun,n,new);
}