|
|
385abae |
Description: <short summary of the patch>
|
|
|
385abae |
TODO: Put a short summary on the line above and replace this paragraph
|
|
|
385abae |
with a longer explanation of this change. Complete the meta-information
|
|
|
385abae |
with other relevant fields (see below for details). To make it easier, the
|
|
|
385abae |
information below has been extracted from the changelog. Adjust it or drop
|
|
|
385abae |
it.
|
|
|
385abae |
.
|
|
|
385abae |
gcl (2.6.12-37) unstable; urgency=medium
|
|
|
385abae |
.
|
|
|
385abae |
* Version_2_6_13pre49
|
|
|
385abae |
Author: Camm Maguire <camm@debian.org>
|
|
|
385abae |
|
|
|
385abae |
---
|
|
|
385abae |
The information above should follow the Patch Tagging Guidelines, please
|
|
|
385abae |
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
|
|
|
385abae |
are templates for supplementary fields that you might want to add:
|
|
|
385abae |
|
|
|
385abae |
Origin: <vendor|upstream|other>, <url of original patch>
|
|
|
385abae |
Bug: <url in upstream bugtracker>
|
|
|
385abae |
Bug-Debian: https://bugs.debian.org/<bugnumber>
|
|
|
385abae |
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
|
|
|
385abae |
Forwarded: <no|not-needed|url proving that it has been forwarded>
|
|
|
385abae |
Reviewed-By: <name and email of someone who approved the patch>
|
|
|
385abae |
Last-Update: 2016-10-04
|
|
|
385abae |
|
|
|
385abae |
--- gcl-2.6.12.orig/o/array.c
|
|
|
385abae |
+++ gcl-2.6.12/o/array.c
|
|
|
385abae |
@@ -850,31 +850,33 @@ raw_aet_ptr(object x, short int typ)
|
|
|
385abae |
*/
|
|
|
385abae |
|
|
|
385abae |
void
|
|
|
385abae |
-gset(void *p1, void *val, int n, int typ)
|
|
|
385abae |
-{ if (val==0)
|
|
|
385abae |
+gset(void *p1, void *val, int n, int typ) {
|
|
|
385abae |
+
|
|
|
385abae |
+ if (val==0)
|
|
|
385abae |
val = aet_types[typ].dflt;
|
|
|
385abae |
- switch (typ){
|
|
|
385abae |
+
|
|
|
385abae |
+ switch (typ){
|
|
|
385abae |
|
|
|
385abae |
#define GSET(p,n,typ,val) {typ x = *((typ *) val); GSET1(p,n,typ,x)}
|
|
|
385abae |
-#define GSET1(p,n,typ,val) while (n-- > 0) \
|
|
|
385abae |
+#define GSET1(p,n,typ,val) while (n-- > 0) \
|
|
|
385abae |
{ *((typ *) p) = val; \
|
|
|
385abae |
- p = p + sizeof(typ); \
|
|
|
385abae |
- } break;
|
|
|
385abae |
+ p = p + sizeof(typ); \
|
|
|
385abae |
+ } break;
|
|
|
385abae |
|
|
|
385abae |
- case aet_object: GSET(p1,n,object,val);
|
|
|
385abae |
- case aet_ch: GSET(p1,n,char,val);
|
|
|
385abae |
- /* Note n is number of fixnum WORDS for bit */
|
|
|
385abae |
- case aet_bit: GSET(p1,n,fixnum,val);
|
|
|
385abae |
- case aet_fix: GSET(p1,n,fixnum,val);
|
|
|
385abae |
- case aet_sf: GSET(p1,n,shortfloat,val);
|
|
|
385abae |
- case aet_lf: GSET(p1,n,longfloat,val);
|
|
|
385abae |
- case aet_char: GSET(p1,n,char,val);
|
|
|
385abae |
- case aet_uchar: GSET(p1,n,unsigned char,val);
|
|
|
385abae |
- case aet_short: GSET(p1,n,short,val);
|
|
|
385abae |
- case aet_ushort: GSET(p1,n,unsigned short,val);
|
|
|
385abae |
- default: FEerror("bad elttype",0);
|
|
|
385abae |
- }
|
|
|
385abae |
+ case aet_object: GSET(p1,n,object,val);
|
|
|
385abae |
+ case aet_ch: GSET(p1,n,char,val);
|
|
|
385abae |
+ /* Note n is number of fixnum WORDS for bit */
|
|
|
385abae |
+ case aet_bit: GSET(p1,n,fixnum,val);
|
|
|
385abae |
+ case aet_fix: GSET(p1,n,fixnum,val);
|
|
|
385abae |
+ case aet_sf: GSET(p1,n,shortfloat,val);
|
|
|
385abae |
+ case aet_lf: GSET(p1,n,longfloat,val);
|
|
|
385abae |
+ case aet_char: GSET(p1,n,char,val);
|
|
|
385abae |
+ case aet_uchar: GSET(p1,n,unsigned char,val);
|
|
|
385abae |
+ case aet_short: GSET(p1,n,short,val);
|
|
|
385abae |
+ case aet_ushort: GSET(p1,n,unsigned short,val);
|
|
|
385abae |
+ default: FEerror("bad elttype",0);
|
|
|
385abae |
}
|
|
|
385abae |
+}
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
#define W_SIZE (BV_BITS*sizeof(fixnum))
|
|
|
385abae |
@@ -894,38 +896,43 @@ implementation dependent results.")
|
|
|
385abae |
int n1=fix(n1o),nc;
|
|
|
385abae |
if (VFUN_NARGS==4)
|
|
|
385abae |
{ n1 = x->v.v_dim - i1;}
|
|
|
385abae |
- if (typ1==aet_bit)
|
|
|
385abae |
- {if (i1 % CHAR_SIZE)
|
|
|
385abae |
- badcopy:
|
|
|
385abae |
- FEerror("Bit copies only if aligned",0);
|
|
|
385abae |
- else
|
|
|
385abae |
- {int rest=n1%CHAR_SIZE;
|
|
|
385abae |
- if (rest!=0 )
|
|
|
385abae |
- {if (typ2!=aet_bit)
|
|
|
385abae |
- goto badcopy;
|
|
|
385abae |
- {while(rest> 0)
|
|
|
385abae |
- { fSaset1(y,i2+n1-rest,(fLrow_major_aref(x,i1+n1-rest)));
|
|
|
385abae |
- rest--;}
|
|
|
385abae |
- }}
|
|
|
385abae |
- i1=i1/CHAR_SIZE ;
|
|
|
385abae |
- n1=n1/CHAR_SIZE;
|
|
|
385abae |
- typ1=aet_char;
|
|
|
385abae |
- }};
|
|
|
385abae |
- if (typ2==aet_bit)
|
|
|
385abae |
- {if (i2 % CHAR_SIZE)
|
|
|
385abae |
- goto badcopy;
|
|
|
385abae |
- i2=i2/CHAR_SIZE ;}
|
|
|
385abae |
- if ((typ1 ==aet_object ||
|
|
|
385abae |
- typ2 ==aet_object) && typ1 != typ2)
|
|
|
385abae |
+ if (typ1==aet_bit) {
|
|
|
385abae |
+ if (i1 % CHAR_SIZE)
|
|
|
385abae |
+ badcopy:
|
|
|
385abae |
+ FEerror("Bit copies only if aligned",0);
|
|
|
385abae |
+ else {
|
|
|
385abae |
+ int rest=n1%CHAR_SIZE;
|
|
|
385abae |
+ if (rest!=0) {
|
|
|
385abae |
+ if (typ2!=aet_bit)
|
|
|
385abae |
+ goto badcopy;
|
|
|
385abae |
+ while(rest> 0) {
|
|
|
385abae |
+ fSaset1(y,i2+n1-rest,(fLrow_major_aref(x,i1+n1-rest)));
|
|
|
385abae |
+ rest--;
|
|
|
385abae |
+ }
|
|
|
385abae |
+ }
|
|
|
385abae |
+ i1=i1/CHAR_SIZE ;
|
|
|
385abae |
+ n1=n1/CHAR_SIZE;
|
|
|
385abae |
+ typ1=aet_char;
|
|
|
385abae |
+ }
|
|
|
385abae |
+ }
|
|
|
385abae |
+
|
|
|
385abae |
+ if (typ2==aet_bit) {
|
|
|
385abae |
+ if (i2 % CHAR_SIZE)
|
|
|
385abae |
+ goto badcopy;
|
|
|
385abae |
+ i2=i2/CHAR_SIZE ;
|
|
|
385abae |
+ }
|
|
|
385abae |
+
|
|
|
385abae |
+ if ((typ1 ==aet_object || typ2 ==aet_object) && typ1 != typ2)
|
|
|
385abae |
FEerror("Can't copy between different array types",0);
|
|
|
385abae |
nc=n1 * aet_sizes[(int)typ1];
|
|
|
385abae |
- if (i1+n1 > x->a.a_dim
|
|
|
385abae |
- || ((y->a.a_dim - i2) *aet_sizes[(int)typ2]) < nc)
|
|
|
385abae |
+ if (i1+n1 > x->a.a_dim || ((y->a.a_dim - i2) *aet_sizes[(int)typ2]) < nc)
|
|
|
385abae |
FEerror("Copy out of bounds",0);
|
|
|
385abae |
bcopy(x->ust.ust_self + (i1*aet_sizes[(int)typ1]),
|
|
|
385abae |
y->ust.ust_self + (i2*aet_sizes[(int)typ2]),
|
|
|
385abae |
nc);
|
|
|
385abae |
+
|
|
|
385abae |
return x;
|
|
|
385abae |
+
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
/* X is the header of an array. This supplies the body which
|
|
|
385abae |
--- gcl-2.6.12.orig/o/predicate.c
|
|
|
385abae |
+++ gcl-2.6.12/o/predicate.c
|
|
|
385abae |
@@ -744,14 +744,13 @@ BEGIN:
|
|
|
385abae |
if (tx == t_complex)
|
|
|
385abae |
return(contains_sharp_comma(x->cmp.cmp_real) ||
|
|
|
385abae |
contains_sharp_comma(x->cmp.cmp_imag));
|
|
|
385abae |
- if (tx == t_vector)
|
|
|
385abae |
- {
|
|
|
385abae |
- int i;
|
|
|
385abae |
- if (x->v.v_elttype == aet_object)
|
|
|
385abae |
- for (i = 0; i < x->v.v_fillp; i++)
|
|
|
385abae |
- if (contains_sharp_comma(x->v.v_self[i]))
|
|
|
385abae |
- return(TRUE);
|
|
|
385abae |
- return(FALSE);
|
|
|
385abae |
+ if (tx == t_vector) {
|
|
|
385abae |
+ int i;
|
|
|
385abae |
+ if (x->v.v_elttype == aet_object)
|
|
|
385abae |
+ for (i = 0; i < x->v.v_fillp; i++)
|
|
|
385abae |
+ if (contains_sharp_comma(x->v.v_self[i]))
|
|
|
385abae |
+ return(TRUE);
|
|
|
385abae |
+ return(FALSE);
|
|
|
385abae |
}
|
|
|
385abae |
if (tx == t_cons) {
|
|
|
385abae |
if (x->c.c_car == siSsharp_comma)
|
|
|
385abae |
--- gcl-2.6.12.orig/o/unixsys.c
|
|
|
385abae |
+++ gcl-2.6.12/o/unixsys.c
|
|
|
385abae |
@@ -32,25 +32,39 @@ int
|
|
|
385abae |
vsystem(const char *command) {
|
|
|
385abae |
|
|
|
385abae |
unsigned j,n=strlen(command)+1;
|
|
|
385abae |
- char *z=alloca(n),**p1,**pp,*c;
|
|
|
385abae |
+ char *z,*c;
|
|
|
385abae |
+ const char *x1[]={"/bin/sh","-c",NULL,NULL},*spc=" \n\t",**p1,**pp;
|
|
|
385abae |
int s;
|
|
|
385abae |
pid_t pid;
|
|
|
385abae |
|
|
|
385abae |
- memcpy(z,command,n);
|
|
|
385abae |
- for (j=1,c=z;strtok(c," \n\t");c=NULL,j++);
|
|
|
385abae |
+ if (strpbrk(command,"\"'$<>"))
|
|
|
385abae |
|
|
|
385abae |
- memcpy(z,command,n);
|
|
|
385abae |
- p1=alloca(j*sizeof(*p1));
|
|
|
385abae |
- for (pp=p1,c=z;(*pp=strtok(c," \n\t"));c=NULL,pp++);
|
|
|
385abae |
+ (p1=x1)[2]=command;
|
|
|
385abae |
+
|
|
|
385abae |
+ else {
|
|
|
385abae |
+
|
|
|
385abae |
+ z=alloca(n);
|
|
|
385abae |
+ memcpy(z,command,n);
|
|
|
385abae |
+ for (j=1,c=z;strtok(c,spc);c=NULL,j++);
|
|
|
385abae |
+
|
|
|
385abae |
+ memcpy(z,command,n);
|
|
|
385abae |
+ p1=alloca(j*sizeof(*p1));
|
|
|
385abae |
+ for (pp=p1,c=z;(*pp=strtok(c,spc));c=NULL,pp++);
|
|
|
385abae |
+
|
|
|
385abae |
+ }
|
|
|
385abae |
|
|
|
385abae |
if (!(pid=vfork())) {
|
|
|
385abae |
- execvp(*p1,p1);
|
|
|
385abae |
- _exit(2);
|
|
|
385abae |
+ errno=0;
|
|
|
385abae |
+ execvp(*p1,(void *)p1);
|
|
|
385abae |
+ _exit(128|(errno&0x7f));
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
massert(pid>0);
|
|
|
385abae |
massert(pid==waitpid(pid,&s,0));
|
|
|
385abae |
|
|
|
385abae |
+ if ((s>>8)&128)
|
|
|
385abae |
+ emsg("execvp failure when executing '%s': %s\n",command,strerror((s>>8)&0x7f));
|
|
|
385abae |
+
|
|
|
385abae |
return s;
|
|
|
385abae |
|
|
|
385abae |
}
|