<short summary of the patch>
authorCamm Maguire <camm@debian.org>
Thu, 11 Aug 2022 17:16:42 +0000 (18:16 +0100)
committerCamm Maguire <camm@debian.org>
Thu, 11 Aug 2022 17:16:42 +0000 (18:16 +0100)
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-99) unstable; urgency=medium

  * Version_2.6.13pre95

Gbp-Pq: Name Version_2.6.13pre96

cmpnew/gcl_cmpmulti.lsp
configure
configure.in
h/gclincl.h.in
h/include.h
h/prelink.h
o/file.d
o/gcl_readline.d
o/main.c
o/prelink.c

index 39a9a86ee1553707ee231dce1d64b5a2b948044d..729c75942129d764a463d351e89b9ef1998300a2 100755 (executable)
   (let ((*value-to-go* 'top)*top-data*)
     (c2expr* form) (setq top-data *top-data*))
   (and *record-call-info* (record-call-info nil (car top-data)))
-  (wt-nl "if(vs_base>vs_top) vs_top=vs_base;*vs_top=Cnil;")
+  (wt-nl "if(vs_base>vs_top) vs_top=vs_base;")
+  (wt-nl "*vs_top=Cnil;")
   (do ((vs vrefs (cdr vs)))
       ((endp vs))
       (let ((vref (car vs)))
        (set-var 'fun-val (car vref) (cadr vref))
        (unless (endp (cdr vs)) (wt-nl "if(vs_base<vs_top) vs_base++;"))))
   (cond ((null vrefs)
-         (wt-nl "if(vs_base==vs_top){vs_base[0]=Cnil;vs_top=vs_base+1;}")
+         (wt-nl "if(vs_base==vs_top){vs_base[0]=Cnil;}")
+         (wt-nl "vs_top=vs_base+1;}")
          (unwind-exit 'fun-val))
         (t (unless (eq *exit* 'return) (wt-nl) (reset-top))
            (unwind-exit (cons 'var (car vrefs))))))
 
   (and *record-call-info* (record-call-info nil (car top-data)))
 
-  (wt-nl "if(vs_base>vs_top) vs_top=vs_base;*vs_top=Cnil;")
+  (wt-nl "if(vs_base>vs_top) vs_top=vs_base;")
+  (wt-nl "*vs_top=Cnil;")
   (do ((vs vars (cdr vs)))
       ((endp vs))
       (c2bind-loc (car vs) '(vs-base 0))
index cb2d6b7257a5c1d285a1a27bbc0920c338ffe72e..02210e050c76d248257fb0a7d095e342c2e2830d 100755 (executable)
--- a/configure
+++ b/configure
@@ -3979,7 +3979,7 @@ add_args_to_cflags -fsigned-char -pipe -fcommon \
                     -fno-PIE -fno-pie -fno-PIC -fno-pic \
                    -Wall \
                    -Wno-builtin-requires-header -Wno-empty-body -Wno-self-assign \
-                   -Wno-unused-but-set-variable -Wno-misleading-indentation
+                   -Wno-unused-but-set-variable
 
 add_args_to_ldflags -no-pie -Wl,-z,lazy
 
@@ -7946,19 +7946,10 @@ fi
 $as_echo "$ac_cv_lib_readline_rl_initialize" >&6; }
 if test "x$ac_cv_lib_readline_rl_initialize" = xyes; then :
 
-$as_echo "#define HAVE_READLINE 1" >>confdefs.h
+$as_echo "#define USE_READLINE 1" >>confdefs.h
 
-                                  TLIBS="$TLIBS -lreadline" #some machines don't link this, e.g. Slackware
-                                  RL_OBJS=gcl_readline.o
-fi
-
-fi
-
-done
-
-
-    # These tests discover differences between readline 4.1 and 4.3
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
+                                # These tests discover differences between readline 4.1 and 4.3
+                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
 $as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
 if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -8003,6 +7994,14 @@ $as_echo "#define HAVE_RL_COMPENTRY_FUNC_T 1" >>confdefs.h
 
 fi
 
+                                TLIBS="$TLIBS -lreadline" #some machines don't link this, e.g. Slackware
+                                RL_OBJS=gcl_readline.o
+fi
+
+fi
+
+done
+
 fi
 
 
index 9bfd2bc628cb4e819a4089002e8f55afd39c119b..ce24405d3f804eae4227611d8c5d980b27e52822 100644 (file)
@@ -263,7 +263,7 @@ add_args_to_cflags -fsigned-char -pipe -fcommon \
                     -fno-PIE -fno-pie -fno-PIC -fno-pic \
                    -Wall \
                    -Wno-builtin-requires-header -Wno-empty-body -Wno-self-assign \
-                   -Wno-unused-but-set-variable -Wno-misleading-indentation
+                   -Wno-unused-but-set-variable
 
 add_args_to_ldflags -no-pie -Wl,-z,lazy
 
@@ -1713,15 +1713,14 @@ fi
 
 if test "$enable_readline" != "no" ; then
     AC_CHECK_HEADERS([readline/readline.h],
-                    AC_CHECK_LIB([readline],[rl_initialize],
-                                 [AC_DEFINE(HAVE_READLINE,1,[have readline library]) 
-                                  TLIBS="$TLIBS -lreadline" #some machines don't link this, e.g. Slackware
-                                  RL_OBJS=gcl_readline.o]))
-    
-    # These tests discover differences between readline 4.1 and 4.3
-    AC_CHECK_LIB([readline],[rl_completion_matches],
-                [AC_DEFINE(HAVE_DECL_RL_COMPLETION_MATCHES,1,[have readline completion matches])
-                 AC_DEFINE(HAVE_RL_COMPENTRY_FUNC_T,1,[have readline completion matches])])
+                       AC_CHECK_LIB([readline],[rl_initialize],
+                               [AC_DEFINE(USE_READLINE,1,[use readline library]) 
+                                # These tests discover differences between readline 4.1 and 4.3
+                                AC_CHECK_LIB([readline],[rl_completion_matches],
+                                       [AC_DEFINE(HAVE_DECL_RL_COMPLETION_MATCHES,1,[have readline completion matches])
+                                        AC_DEFINE(HAVE_RL_COMPENTRY_FUNC_T,1,[have readline completion matches])])
+                                TLIBS="$TLIBS -lreadline" #some machines don't link this, e.g. Slackware
+                                RL_OBJS=gcl_readline.o]))
 fi
 
 AC_SUBST(RL_OBJS)
index 82257ed0fe7e84ef03e6535554dc454807b33593..1f8411ab04538beca28d931bc0d5ebdff0b20b0b 100644 (file)
 /* have putenv call */
 #undef HAVE_PUTENV
 
-/* have readline library */
-#undef HAVE_READLINE
-
 /* Define to 1 if you have the <readline/readline.h> header file. */
 #undef HAVE_READLINE_READLINE_H
 
 /* use fionbio for non-blocking io */
 #undef USE_FIONBIO
 
+/* use readline library */
+#undef USE_READLINE
+
 /* protect cdr from immfix and speed up type processing */
 #undef USE_SAFE_CDR
 
index 400c73592fa5e6fb3785b22189737b7cbeb9bbb0..1aaebe13610129ea7f009d196478187f0c5ca552 100755 (executable)
@@ -99,7 +99,7 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 #ifdef HAVE_ALLOCA_H
 #include <alloca.h>
 #endif
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
 #include <readline/readline.h>
 #endif
 
index 0e2949493c900d7aaac58d165892d20fc786eb7b..6d333ec9e262e17c14a1b166524827f5df01b7d4 100644 (file)
@@ -27,7 +27,7 @@ PRELINK_EXTER FILE *my_stdin;
 PRELINK_EXTER FILE *my_stdout;
 PRELINK_EXTER FILE *my_stderr;
 
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
 PRELINK_EXTER rl_compentry_func_t **my_rl_completion_entry_function_ptr;
 PRELINK_EXTER const char **my_rl_readline_name_ptr;
 #endif
index 49f016d64565b8e3a5a647c8d43d015bc7c0dcf0..6b9a9e252a0b58314accb84343b7db40f9743fa1 100755 (executable)
--- a/o/file.d
+++ b/o/file.d
@@ -38,7 +38,7 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 #define IN_FILE
 #include "include.h"
 
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
 #define kclgetc(FP)            rl_getc_em(((FILE *)FP))
 #define kclungetc(C, FP)       rl_ungetc_em(C, ((FILE *)FP))
 #define kclputc(C, FP)         rl_putc_em(C, ((FILE *)FP))
@@ -46,7 +46,7 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 #define        kclgetc(FP)             getc(((FILE *)FP))
 #define        kclungetc(C, FP)        ungetc(C, ((FILE *)FP))
 #define        kclputc(C, FP)          putc(C, ((FILE *)FP))
-#endif /* HAVE_READLINE */
+#endif /* USE_READLINE */
 
 #define        xkclfeof(c,FP)          feof(((FILE *)FP))
 
@@ -109,7 +109,7 @@ feof1(fp)
 FILE *fp;
 {
 
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
   if (rl_stream_p(fp) && rl_eof_p(fp))
     return TRUE;
 #endif
@@ -1258,7 +1258,7 @@ BEGIN:
        case smm_input:
        case smm_io:
 
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
          if (rl_stream_p(strm->sm.sm_fp))
            return rl_pending_buffered_input_p(strm->sm.sm_fp);
 #endif
@@ -2372,7 +2372,7 @@ gcl_init_file_function()
        make_si_function("USER-STREAM-STATE", siLuser_stream_state);
 #endif
 
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
        gcl_init_readline_function();
 #endif
 }
index 64eb2660d7faa528568d8c3d05f62dc62ce28020..a947028d49279f75bc177185b2872fcc8d861e2d 100644 (file)
@@ -27,7 +27,7 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 #define IN_READLINE
 #include "include.h"
 
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
 
 /* Here begins GNU Readline support. It was designed for Maxima,
  * but it works with GCL fine too. If you want to include word completion
@@ -391,4 +391,4 @@ gcl_init_readline(void) {
   make_si_function("READLINE-OFF", siLreadline_off);
 }
 
-#endif /* HAVE_READLINE */
+#endif /* USE_READLINE */
index ae4a144a87c6798715e779778188675ce0eac6bc..d5e9ff3c172a958a3da03d2aa1c1c75ce8b54f01 100755 (executable)
--- a/o/main.c
+++ b/o/main.c
@@ -555,7 +555,7 @@ main(int argc, char **argv, char **envp) {
     terminal_io->sm.sm_object1->sm.sm_fp = stdout;
 
     gcl_init_big1();
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
     gcl_init_readline_function();
 #endif
 #ifdef NEED_STACK_CHK_GUARD
@@ -755,7 +755,7 @@ initlisp(void) {
 #ifdef CMAC
        gcl_init_cmac();
 #endif 
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
        gcl_init_readline();
 #endif
 
@@ -1185,7 +1185,7 @@ init_main(void) {
       }  }
 #endif  
   
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
   ADD_FEATURE("READLINE");
 #endif
 #if !defined(USE_DLOPEN)
index 83918a3e1012c60226c12c511e34ee6de2b5fa6f..6d53a4bd658b7a3edcaa84024f3784ceb14b774d 100644 (file)
@@ -7,7 +7,7 @@ extern FILE *stdin __attribute__((weak));
 extern FILE *stderr __attribute__((weak));
 extern FILE *stdout __attribute__((weak));
 
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
 #if RL_READLINE_VERSION < 0x0600
 extern Function                *rl_completion_entry_function __attribute__((weak));
 extern char            *rl_readline_name __attribute__((weak));
@@ -24,7 +24,7 @@ prelink_init(void) {
   my_stdin=stdin;
   my_stdout=stdout;
   my_stderr=stderr;
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
   my_rl_completion_entry_function_ptr=(void *)&rl_completion_entry_function;
   my_rl_readline_name_ptr=(void *)&rl_readline_name;
 #endif