<short summary of the patch>
authorCamm Maguire <camm@debian.org>
Fri, 14 Feb 2025 02:29:40 +0000 (21:29 -0500)
committerCamm Maguire <camm@debian.org>
Fri, 14 Feb 2025 02:29:40 +0000 (21:29 -0500)
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.14-14) unstable; urgency=medium

  * Version_2_6_15pre13

Gbp-Pq: Name Version_2_6_15pre13

gcl-tk/tkMain.c
git.tag
h/pool.h
lsp/gcl_sharp.lsp
makefile
o/gmp_big.c
o/makefile
o/print.d

index 40811617ab50b250e0b7c88b5fb124917e7fb424..b3fbeda31b941dc4287bb842cc0c4ab0daff44c4 100755 (executable)
@@ -36,7 +36,9 @@
 #include <stdlib.h>
 #include <tcl.h>
 #include <tk.h>
-
+#if TCL_MAJOR_VERSION >= 9
+#include <wordexp.h>
+#endif
 
 
 #if (TK_MINOR_VERSION==0 && TK_MAJOR_VERSION==4)
@@ -67,12 +69,12 @@ struct connection_state *dsfd;
  * file out of the Tk source directory to make their own modified versions).
  */
 
-/* extern void         exit _ANSI_ARGS_((int status)); */
+/* extern void         exit _ANSI_ARGS_((int status));
 extern int             isatty _ANSI_ARGS_((int fd));
-/*
 extern int             read _ANSI_ARGS_((int fd, char *buf, size_t size));
-*/
 extern char *          strrchr _ANSI_ARGS_((CONST char *string, int c));
+*/
+extern int Tcl_AppInit(Tcl_Interp *interp);
 
 /*
  * Global variables used by the main program:
@@ -331,11 +333,17 @@ TkX_Wish (argc, argv)
         */
 
        if (tcl_RcFileName != NULL) {
-           Tcl_DString buffer;
            char *fullName;
            FILE *f;
+#if TCL_MAJOR_VERSION >= 9
+           wordexp_t exp_result;
+           wordexp(tcl_RcFileName, &exp_result, WRDE_NOCMD);
+           fullName = exp_result.we_wordv[0];
+#else
+           Tcl_DString buffer;
     
            fullName = Tcl_TildeSubst(interp, tcl_RcFileName, &buffer);
+#endif
            if (fullName == NULL) {
                fprintf(stderr, "%s\n", INTERP_RESULT(interp));
            } else {
@@ -348,12 +356,16 @@ TkX_Wish (argc, argv)
                    fclose(f);
                }
            }
+#if TCL_MAJOR_VERSION >= 9
+           wordfree(&exp_result);
+#else
            Tcl_DStringFree(&buffer);
+#endif
        }
 
        dfprintf(stderr, "guis : Creating file handler for %d\n", dsfd->fd);
 #ifndef __MINGW32__    
-       Tk_CreateFileHandler(dsfd->fd, TK_READABLE, StdinProc, (ClientData) 0);
+       Tcl_CreateFileHandler(dsfd->fd, TCL_READABLE, StdinProc, (ClientData) 0);
 #endif        
     }
     fflush(stdout);
@@ -466,7 +478,7 @@ StdinProc(clientData, mask)
    */
   dfprintf(stderr, "\nguis : Disabling file handler for %d\n", dsfd->fd);
 
-/*  Tk_CreateFileHandler(dsfd->fd, 0, StdinProc, (ClientData) 0); */
+/*  Tcl_CreateFileHandler(dsfd->fd, 0, StdinProc, (ClientData) 0); */
 
   do
     { 
@@ -478,7 +490,7 @@ StdinProc(clientData, mask)
          /*dfprintf(stderr, "Yoo !!! Empty command\n"); */
          if (debug)perror("zero message");
 #ifndef __MINGW32__          
-         Tk_CreateFileHandler(dsfd->fd, TK_READABLE, StdinProc, (ClientData) 0);
+         Tcl_CreateFileHandler(dsfd->fd, TCL_READABLE, StdinProc, (ClientData) 0);
 #endif          
          return;
        }
@@ -580,7 +592,7 @@ StdinProc(clientData, mask)
     } while (fNotDone > 0);
 
 
-  /* Tk_CreateFileHandler(dsfd->fd, TK_READABLE, StdinProc, (ClientData) 0); */
+  /* Tcl_CreateFileHandler(dsfd->fd, TCL_READABLE, StdinProc, (ClientData) 0); */
   if ((void *)msg != (void *) buf)
     free ((void *) msg);
 }
diff --git a/git.tag b/git.tag
index c6520047c7dbd8f4cfa3405e9cc464dc4328f8ed..b00b2504238f3c8951d2e2afb0c5efd84a488bdf 100644 (file)
--- a/git.tag
+++ b/git.tag
@@ -1 +1 @@
-"Version_2_6_15pre10"
+"Version_2_6_15pre13"
index 4e650aa80333886c8a6bacbeeb4bd0048e2f7824..3469551e12e4630b61044182fe9b9cd1ca2c6f1f 100644 (file)
--- a/h/pool.h
+++ b/h/pool.h
@@ -112,7 +112,7 @@ close_pool(void) {
   if (pool!=-1) {
     f.l_type=F_WRLCK;
     if (!fcntl(pool,F_SETLK,&f))
-      massert(!unlink(gcl_pool));
+      massert(!unlink(gcl_pool) || errno=ENOENT);
     register_pool(-1);
     massert(!close(pool));
     massert(!munmap(Pool,sizeof(struct pool)));
index a6a2115f8ff4451300d1e50e265e5ae10a8e7ce3..1df4742de833a3dcf14b00142500dfe27d83cf94 100644 (file)
@@ -51,7 +51,7 @@
       (aset1 x i (patch-sharp (row-major-aref x i)))))
    (structure
     (let ((d (structure-def x))) 
-      (dotimes (i (structure-length x) x)
+      (dotimes (i (structure-length d) x)
        (declare (fixnum i))
        (structure-set x d i (patch-sharp (structure-ref x d i))))))
    (spice (let* ((y (gethash1 x (context-spice *sharp-eq-context*)))
index 77ddbf0ec0f6c3bf8af4f4928e0598b3130e05b7..02afd0b67a59c85fc65331ef0382843d44fc5af7 100644 (file)
--- a/makefile
+++ b/makefile
@@ -269,12 +269,12 @@ $(HDIR)new_decl.h:
 $(HDIR)mcompdefs.h: $(HDIR)compdefs.h $(HDIR)new_decl.h
        cat $< |\
        $(AWK) 'BEGIN {print "#include \"include.h\"";print "#include \"cmponly.h\"";print "---"} {a=$$1;gsub("\\.\\.\\.","",a);print "\"#define " $$1 "\" " a}' |\
-       $(CC) -E -P -I./$(HDIR) - |\
+       $(CC) $(CFLAGS) -E -P -I./$(HDIR) - |\
        $(AWK) '/^\-\-\-$$/ {i=1;next} {if (!i) next} {gsub("\"","");print}' >$@
 
 $(HDIR)cmpinclude.h: $(HDIR)mcompdefs.h $(CMPINCLUDE_FILES) $(HDIR)config.h
        cp $< $(@F)
-       cat $(CMPINCLUDE_FILES) | $(CC) -E -I./$(HDIR) - | $(AWK) '/^# |^$$|^#pragma/ {next}{print}' >> $(@F)
+       cat $(CMPINCLUDE_FILES) | $(CC) $(CFLAGS) -E -I./$(HDIR) - | $(AWK) '/^# |^$$|^#pragma/ {next}{print}' >> $(@F)
        ./xbin/move-if-changed mv $(@F) $@
        ./xbin/move-if-changed cp $@ o/$(@F)
 
index ff2ee55c88a94aa62d268e21a252e4a35904ecf0..d3b0c2ebfc0f988bafb18c3901cca0709af1f5b2 100755 (executable)
@@ -292,33 +292,6 @@ big_minus(object x)
 #endif
 
 
-/* static int */
-/* double_exponent(double d) { */
-  
-/*   union {double d;int i[2];} u; */
-  
-/*   if (d == 0.0) */
-/*     return(0); */
-
-/*   u.d=d; */
-/*   return (((u.i[HIND] & 0x7ff00000) >> 20) - 1022); */
-
-/* } */
-
-/* static double */
-/* set_exponent(double d, int e) { */
-
-/*   union {double d;int i[2];} u; */
-  
-/*   if (d == 0.0) */
-/*     return(0.0); */
-  
-/*   u.d=d; */
-/*   u.i[HIND]= (u.i[HIND] & 0x800fffff) | (((e + 1022) << 20) & 0x7ff00000); */
-/*   return(u.d); */
-
-/* } */
-       
 double
 big_to_double(object x) {
 
index 22ec15fa8f1883e4b3fb57abc6c3a548fc0d5b67..4c6fe0082daa49c24eba44c5b2006dc5ac8f0daf 100644 (file)
@@ -71,7 +71,7 @@ boot.h: boot.ini
        rm $*.c
 
 $(DPP):        ../bin/dpp.c
-       ${CC} ${DEFS} -o $@ $<
+       ${CC} $(CFLAGS) $(LDFLAGS) ${DEFS} -o $@ $<
 
 new_init.c: ${INI_FILES}
        echo '#include "make-init.h"' > $@
index ac3fa1fa0414e668533234e7e54357e205233b12..f49938bd904005482b34e06455c07e56a5880df9 100755 (executable)
--- a/o/print.d
+++ b/o/print.d
@@ -484,6 +484,8 @@ bool shortp;
        write_decimal(exp);
 }
 
+static object circle_table=Cnil;
+
 static void
 call_structure_print_function(x, level)
 object x;
@@ -569,12 +571,15 @@ ONCE_MORE:
                goto L;
        }
 
+       if (PRINTcircle) circle_table=PRINTvs_top[0];
+
        ifuncall3(S_DATA(x->str.str_def)->print_function,
                  x, PRINTstream, vs_head);
        vs_popp;
        eflag = FALSE;
 
 L:
+       circle_table=Cnil;
        frs_pop();
        bds_unwind(old_bds_top);
 
@@ -1525,6 +1530,11 @@ setupPRINTcircle(object x,int dogensyms) {
   object *vp=vs_top,*v=vp,h;
   fixnum j;
 
+  if (circle_table!=Cnil) {
+    vs_push(circle_table);
+    return;
+  }
+
   travel(x,dogensyms,PRINTarray);
 
   h=vs_top>vp ? gcl_make_hash_table(sLeq) : Cnil;