Debian Codegraph @

debian/patches/Version_2_6_15pre13

raw
1 Description: <short summary of the patch>
2 TODO: Put a short summary on the line above and replace this paragraph
3 with a longer explanation of this change. Complete the meta-information
4 with other relevant fields (see below for details). To make it easier, the
5 information below has been extracted from the changelog. Adjust it or drop
6 it.
7 .
8 gcl (2.6.14-14) unstable; urgency=medium
9 .
10 * Version_2_6_15pre13
11 Author: Camm Maguire <[email protected]>
12
13 ---
14 The information above should follow the Patch Tagging Guidelines, please
15 checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
16 are templates for supplementary fields that you might want to add:
17
18 Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
19 Bug: <upstream-bugtracker-url>
20 Bug-Debian: https://bugs.debian.org/<bugnumber>
21 Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
22 Forwarded: (no|not-needed|<patch-forwarded-url>)
23 Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
24 Reviewed-By: <name and email of someone who approved/reviewed the patch>
25 Last-Update: 2025-02-13
26
27 --- gcl-2.6.14.orig/gcl-tk/tkMain.c
28 +++ gcl-2.6.14/gcl-tk/tkMain.c
29 @@ -36,7 +36,9 @@
30 #include <stdlib.h>
31 #include <tcl.h>
32 #include <tk.h>
33 -
34 +#if TCL_MAJOR_VERSION >= 9
35 +#include <wordexp.h>
36 +#endif
37
38
39 #if (TK_MINOR_VERSION==0 && TK_MAJOR_VERSION==4)
40 @@ -67,12 +69,12 @@ struct connection_state *dsfd;
41 * file out of the Tk source directory to make their own modified versions).
42 */
43
44 -/* extern void exit _ANSI_ARGS_((int status)); */
45 +/* extern void exit _ANSI_ARGS_((int status));
46 extern int isatty _ANSI_ARGS_((int fd));
47 -/*
48 extern int read _ANSI_ARGS_((int fd, char *buf, size_t size));
49 -*/
50 extern char * strrchr _ANSI_ARGS_((CONST char *string, int c));
51 +*/
52 +extern int Tcl_AppInit(Tcl_Interp *interp);
53
54 /*
55 * Global variables used by the main program:
56 @@ -331,11 +333,17 @@ TkX_Wish (argc, argv)
57 */
58
59 if (tcl_RcFileName != NULL) {
60 - Tcl_DString buffer;
61 char *fullName;
62 FILE *f;
63 +#if TCL_MAJOR_VERSION >= 9
64 + wordexp_t exp_result;
65 + wordexp(tcl_RcFileName, &exp_result, WRDE_NOCMD);
66 + fullName = exp_result.we_wordv[0];
67 +#else
68 + Tcl_DString buffer;
69
70 fullName = Tcl_TildeSubst(interp, tcl_RcFileName, &buffer);
71 +#endif
72 if (fullName == NULL) {
73 fprintf(stderr, "%s\n", INTERP_RESULT(interp));
74 } else {
75 @@ -348,12 +356,16 @@ TkX_Wish (argc, argv)
76 fclose(f);
77 }
78 }
79 +#if TCL_MAJOR_VERSION >= 9
80 + wordfree(&exp_result);
81 +#else
82 Tcl_DStringFree(&buffer);
83 +#endif
84 }
85
86 dfprintf(stderr, "guis : Creating file handler for %d\n", dsfd->fd);
87 #ifndef __MINGW32__
88 - Tk_CreateFileHandler(dsfd->fd, TK_READABLE, StdinProc, (ClientData) 0);
89 + Tcl_CreateFileHandler(dsfd->fd, TCL_READABLE, StdinProc, (ClientData) 0);
90 #endif
91 }
92 fflush(stdout);
93 @@ -466,7 +478,7 @@ StdinProc(clientData, mask)
94 */
95 dfprintf(stderr, "\nguis : Disabling file handler for %d\n", dsfd->fd);
96
97 -/* Tk_CreateFileHandler(dsfd->fd, 0, StdinProc, (ClientData) 0); */
98 +/* Tcl_CreateFileHandler(dsfd->fd, 0, StdinProc, (ClientData) 0); */
99
100 do
101 {
102 @@ -478,7 +490,7 @@ StdinProc(clientData, mask)
103 /*dfprintf(stderr, "Yoo !!! Empty command\n"); */
104 if (debug)perror("zero message");
105 #ifndef __MINGW32__
106 - Tk_CreateFileHandler(dsfd->fd, TK_READABLE, StdinProc, (ClientData) 0);
107 + Tcl_CreateFileHandler(dsfd->fd, TCL_READABLE, StdinProc, (ClientData) 0);
108 #endif
109 return;
110 }
111 @@ -580,7 +592,7 @@ StdinProc(clientData, mask)
112 } while (fNotDone > 0);
113
114
115 - /* Tk_CreateFileHandler(dsfd->fd, TK_READABLE, StdinProc, (ClientData) 0); */
116 + /* Tcl_CreateFileHandler(dsfd->fd, TCL_READABLE, StdinProc, (ClientData) 0); */
117 if ((void *)msg != (void *) buf)
118 free ((void *) msg);
119 }
120 --- gcl-2.6.14.orig/git.tag
121 +++ gcl-2.6.14/git.tag
122 @@ -1 +1 @@
123 -"Version_2_6_15pre10"
124 +"Version_2_6_15pre13"
125 --- gcl-2.6.14.orig/h/pool.h
126 +++ gcl-2.6.14/h/pool.h
127 @@ -112,7 +112,7 @@ close_pool(void) {
128 if (pool!=-1) {
129 f.l_type=F_WRLCK;
130 if (!fcntl(pool,F_SETLK,&f))
131 - massert(!unlink(gcl_pool));
132 + massert(!unlink(gcl_pool) || errno=ENOENT);
133 register_pool(-1);
134 massert(!close(pool));
135 massert(!munmap(Pool,sizeof(struct pool)));
136 --- gcl-2.6.14.orig/lsp/gcl_sharp.lsp
137 +++ gcl-2.6.14/lsp/gcl_sharp.lsp
138 @@ -51,7 +51,7 @@
139 (aset1 x i (patch-sharp (row-major-aref x i)))))
140 (structure
141 (let ((d (structure-def x)))
142 - (dotimes (i (structure-length x) x)
143 + (dotimes (i (structure-length d) x)
144 (declare (fixnum i))
145 (structure-set x d i (patch-sharp (structure-ref x d i))))))
146 (spice (let* ((y (gethash1 x (context-spice *sharp-eq-context*)))
147 --- gcl-2.6.14.orig/makefile
148 +++ gcl-2.6.14/makefile
149 @@ -269,12 +269,12 @@ $(HDIR)new_decl.h:
150 $(HDIR)mcompdefs.h: $(HDIR)compdefs.h $(HDIR)new_decl.h
151 cat $< |\
152 $(AWK) 'BEGIN {print "#include \"include.h\"";print "#include \"cmponly.h\"";print "---"} {a=$$1;gsub("\\.\\.\\.","",a);print "\"#define " $$1 "\" " a}' |\
153 - $(CC) -E -P -I./$(HDIR) - |\
154 + $(CC) $(CFLAGS) -E -P -I./$(HDIR) - |\
155 $(AWK) '/^\-\-\-$$/ {i=1;next} {if (!i) next} {gsub("\"","");print}' >$@
156
157 $(HDIR)cmpinclude.h: $(HDIR)mcompdefs.h $(CMPINCLUDE_FILES) $(HDIR)config.h
158 cp $< $(@F)
159 - cat $(CMPINCLUDE_FILES) | $(CC) -E -I./$(HDIR) - | $(AWK) '/^# |^$$|^#pragma/ {next}{print}' >> $(@F)
160 + cat $(CMPINCLUDE_FILES) | $(CC) $(CFLAGS) -E -I./$(HDIR) - | $(AWK) '/^# |^$$|^#pragma/ {next}{print}' >> $(@F)
161 ./xbin/move-if-changed mv $(@F) $@
162 ./xbin/move-if-changed cp $@ o/$(@F)
163
164 --- gcl-2.6.14.orig/o/gmp_big.c
165 +++ gcl-2.6.14/o/gmp_big.c
166 @@ -292,33 +292,6 @@ big_minus(object x)
167 #endif
168
169
170 -/* static int */
171 -/* double_exponent(double d) { */
172 -
173 -/* union {double d;int i[2];} u; */
174 -
175 -/* if (d == 0.0) */
176 -/* return(0); */
177 -
178 -/* u.d=d; */
179 -/* return (((u.i[HIND] & 0x7ff00000) >> 20) - 1022); */
180 -
181 -/* } */
182 -
183 -/* static double */
184 -/* set_exponent(double d, int e) { */
185 -
186 -/* union {double d;int i[2];} u; */
187 -
188 -/* if (d == 0.0) */
189 -/* return(0.0); */
190 -
191 -/* u.d=d; */
192 -/* u.i[HIND]= (u.i[HIND] & 0x800fffff) | (((e + 1022) << 20) & 0x7ff00000); */
193 -/* return(u.d); */
194 -
195 -/* } */
196 -
197 double
198 big_to_double(object x) {
199
200 --- gcl-2.6.14.orig/o/makefile
201 +++ gcl-2.6.14/o/makefile
202 @@ -71,7 +71,7 @@ boot.h: boot.ini
203 rm $*.c
204
205 $(DPP): ../bin/dpp.c
206 - ${CC} ${DEFS} -o $@ $<
207 + ${CC} $(CFLAGS) $(LDFLAGS) ${DEFS} -o $@ $<
208
209 new_init.c: ${INI_FILES}
210 echo '#include "make-init.h"' > $@
211 --- gcl-2.6.14.orig/o/print.d
212 +++ gcl-2.6.14/o/print.d
213 @@ -484,6 +484,8 @@ bool shortp;
214 write_decimal(exp);
215 }
216
217 +static object circle_table=Cnil;
218 +
219 static void
220 call_structure_print_function(x, level)
221 object x;
222 @@ -569,12 +571,15 @@ ONCE_MORE:
223 goto L;
224 }
225
226 + if (PRINTcircle) circle_table=PRINTvs_top[0];
227 +
228 ifuncall3(S_DATA(x->str.str_def)->print_function,
229 x, PRINTstream, vs_head);
230 vs_popp;
231 eflag = FALSE;
232
233 L:
234 + circle_table=Cnil;
235 frs_pop();
236 bds_unwind(old_bds_top);
237
238 @@ -1525,6 +1530,11 @@ setupPRINTcircle(object x,int dogensyms)
239 object *vp=vs_top,*v=vp,h;
240 fixnum j;
241
242 + if (circle_table!=Cnil) {
243 + vs_push(circle_table);
244 + return;
245 + }
246 +
247 travel(x,dogensyms,PRINTarray);
248
249 h=vs_top>vp ? gcl_make_hash_table(sLeq) : Cnil;