<short summary of the patch>
authorCamm Maguire <camm@debian.org>
Sun, 13 Nov 2022 12:55:14 +0000 (12:55 +0000)
committerCamm Maguire <camm@debian.org>
Sun, 13 Nov 2022 12:55:14 +0000 (12:55 +0000)
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.

gcl (2.6.12-120) unstable; urgency=medium

  * Version_2.6.13pre119

Gbp-Pq: Name Version_2_6_13pre120

configure
configure.in
h/compbas.h
h/gclincl.h.in
h/linux.h
h/lu.h
h/type.h
o/usig.c
o/utils.c

index 1a7939acb39a8cb2b8cd7e545074b944710641f8..648020992ed1a57bb5b1d3562bf994f57a30a162 100755 (executable)
--- a/configure
+++ b/configure
@@ -703,8 +703,8 @@ GMPDIR
 GMP
 HAVE_MALLOC_ZONE_MEMALIGN
 MAKEINFO
-AWK
 GCL_CC
+AWK
 CPP
 OBJEXT
 EXEEXT
@@ -4418,11 +4418,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 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() {
 
@@ -4557,6 +4552,56 @@ add_args_to_cflags  -fsigned-char -pipe -fcommon \
 
 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
@@ -4694,6 +4739,12 @@ fi
   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}
index 16260541e681d342552c28b44a7327d5689cde2b..08c145912dbbb9ad705f0ed35bef6adac2855738 100644 (file)
@@ -181,11 +181,6 @@ fi
 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() {
     
@@ -268,6 +263,34 @@ add_args_to_cflags  -fsigned-char -pipe -fcommon \
 
 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([[
@@ -329,6 +352,12 @@ case "$use" in
 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
index 9ee6f69447bbd6d2ce15980d24000a94dd59911a..dc7b0e98526f02e93dde9f32947653efaa3b7595 100755 (executable)
@@ -4,7 +4,7 @@
 #define EXTER extern
 #endif
 #ifndef INLINE
-#if (defined(__GNUC__) && __GNUC__ <= 4) && !defined __clang__
+#ifdef OLD_INLINE
 #define INLINE extern inline
 #else
 #define INLINE inline
index 5465febd7df041456def9abe34e5beac9e6f7c26..4686d4e5399da5f5308b187caa1cb1bfe3efbd0b 100644 (file)
 /* 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
 
@@ -41,7 +36,7 @@
 /* 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 */
index 3c94d8dc3bc61de62797b062a768d0bad6328d77..271310a70770f17269ae37c75392e2a50f96a685 100644 (file)
--- a/h/linux.h
+++ b/h/linux.h
@@ -146,10 +146,10 @@ do { int c = 0; \
 
 /* #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),   \
diff --git a/h/lu.h b/h/lu.h
index 93aed56dbffe9eb86c070ccd6bdeaa8f4f95beaa..d8c2a443c96561e2e3313a2399cb31e09de2846e 100644 (file)
--- a/h/lu.h
+++ b/h/lu.h
@@ -13,6 +13,7 @@ typedef float shortfloat;
 typedef double longfloat;
 
 typedef union lispunion *object;
+typedef union typeunion *hobj;
 
 #ifndef WORDS_BIGENDIAN
 
@@ -431,3 +432,8 @@ union lispunion {
   struct sfarray sfa;
   struct lfarray lfa;
 };
+
+union typeunion {
+  struct dummy d;
+  fixnum fw;
+};
index 707a7cb18f74b4e8c4bfbf9292f3e063e980b3e3..548e87ffdcfc5c83c0efd73368969290c1164504 100644 (file)
--- a/h/type.h
+++ b/h/type.h
@@ -100,7 +100,7 @@ enum smmode {                       /*  stream mode  */
 #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
index 1e64e0849bfb13aa309ecbc0f2bfa07a42baddc4..3495d318f437a3cfba00f5372e0e8b533b07557f 100755 (executable)
--- a/o/usig.c
+++ b/o/usig.c
@@ -214,11 +214,11 @@ DEFUN_NEW("FEDISABLEEXCEPT",object,fSfedisableexcept,SI,0,0,NONE,IO,OO,OO,OO,(vo
 
 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__)
index 14e458cc64accfa269eb59de2ec97dd132b50138..711ccbd8ab6a9baba102b855614af0023fd6674e 100755 (executable)
--- a/o/utils.c
+++ b/o/utils.c
@@ -69,9 +69,7 @@ Ifuncall_n(object fun,int n,...) {
   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);
 }