File gwc-compile-fix.diff of Package gwc
Index: meschach/matrix.h
===================================================================
--- meschach/matrix.h.orig
+++ meschach/matrix.h
@@ -123,9 +123,7 @@ void m_version( void );
/* re-allocate arry to have num objects of the given type */
#define RENEW(var,num,type) \
- ((var)=(type *)((var) ? \
- realloc((char *)(var),(size_t)(num)*sizeof(type)) : \
- calloc((size_t)(num),sizeof(type))))
+ ((var)=(type *)realloc((char *)(var),(size_t)(num)*sizeof(type)), (var))
#define MEMCOPY(from,to,n_items,type) \
MEM_COPY((char *)(from),(char *)(to),(size_t)(n_items)*sizeof(type))
@@ -139,9 +137,7 @@ void m_version( void );
/* re-allocate arry to have num objects of the given type */
#define RENEW(var,num,type) \
- ((var)=(type *)((var) ? \
- realloc((char *)(var),(size_t)((num)*sizeof(type))) : \
- calloc((size_t)(num),(size_t)sizeof(type))))
+ ((var)=(type *)realloc((char *)(var),(size_t)((num)*sizeof(type))), (var))
#define MEMCOPY(from,to,n_items,type) \
MEM_COPY((char *)(from),(char *)(to),(unsigned)(n_items)*sizeof(type))
Index: encode.c
===================================================================
--- encode.c.orig
+++ encode.c
@@ -459,7 +459,7 @@ int encode(int mode, char *origfilename,
if(fd_test != -1) {
close(fd_test) ;
if(yesno("File exists, overwrite?"))
- return ;
+ return 1;
}
signal(SIGCHLD, SIG_IGN); /* Make sure we dont create a zombie */
Index: meschach/iter0.c
===================================================================
--- meschach/iter0.c.orig
+++ meschach/iter0.c
@@ -239,7 +239,7 @@ ITER *iter_copy2(ITER *ip1, ITER *ip2)
mem_numvar(TYPE_ITER,1);
}
ip2->x = ip2->b = NULL;
- ip2->shared_x = ip2->shared_x = FALSE;
+ ip2->shared_x = ip2->shared_b = FALSE;
}
x = ip2->x;