}
-add_args_to_cflags -fsigned-char -pipe \
+add_args_to_cflags -fsigned-char -pipe -fcommon \
-fno-builtin-malloc -fno-builtin-free \
-fno-PIE -fno-pie -fno-PIC -fno-pic \
-Wall \
}
-add_args_to_cflags -fsigned-char -pipe \
+add_args_to_cflags -fsigned-char -pipe -fcommon \
-fno-builtin-malloc -fno-builtin-free \
-fno-PIE -fno-pie -fno-PIC -fno-pic \
-Wall \
}
/*gcc boolean expression tail position bug*/
+static char *stack_to_be_allocated;
-void *
-cclear_stack(unsigned long size) {
- void *v=alloca(size);
- memset(v,0,size);
- return v;
+void
+get_stack_to_be_allocated(unsigned long size) {
+ stack_to_be_allocated=alloca(size);
}
DEFUN_NEW("EQUAL-TAIL-RECURSION-CHECK",object,fSequal_tail_recursion_check,SI,1,1,NONE,II,OO,OO,OO,(fixnum s),"") {
object x0=make_list(s/sizeof(object)),x1=make_list(s/sizeof(object));
- char *u=cclear_stack(s),*w;
+ char *w;
+ get_stack_to_be_allocated(s);
+ memset(stack_to_be_allocated,0,s);
fLequal(x0,x1);
- for (w=u;w<u+s && !*w;w++);
- RETURN1((object)(w-u));
+ for (w=stack_to_be_allocated;w<stack_to_be_allocated+s && !*w;w++);
+ RETURN1((object)(w-stack_to_be_allocated));
}
static int
/* export these for AXIOM */
int gcl_putenv(char *s) {return putenv(s);}
char *gcl_strncpy(char *d,const char *s,size_t z) {return strncpy(d,s,z);}
-char *gcl_strncpy_chk(size_t z) {char a[10],b[10];return strncpy(a,b,z);}/*compile in __strncpy_chk with FORTIFY_SOURCE*/
+int gcl_strncpy_chk(char *a1,char *b1,size_t z) {char a[10],b[10];strncpy(a,a1,z);strncpy(b,b1,z);return strncmp(a,b,z);}/*compile in __strncpy_chk with FORTIFY_SOURCE*/
#ifdef __MINGW32__
#define uid_t int
#endif