2ce916c337
stdlib.h and strings.h where needed to get system/compiler definitions of malloc, bcopy, and bzero instead of relying on 20-year-old wrong definitions in the code. The snobol interpreter itself is chock full of pointer to int type punning and is likely to fail in hard-to-debug ways on non-VAX-like architectures.
29 lines
775 B
C
29 lines
775 B
C
--- include/macros.h.orig Fri Jul 25 14:52:56 1997
|
|
+++ include/macros.h Tue Nov 28 00:26:54 2006
|
|
@@ -4,6 +4,8 @@
|
|
* macros for data access and implementation of SIL ops
|
|
*/
|
|
|
|
+#include <strings.h>
|
|
+
|
|
/* descriptor at address x */
|
|
#define D(x) (*(struct descr *)(x))
|
|
|
|
@@ -32,7 +34,7 @@
|
|
#endif /* DCMP_BYTES not defined */
|
|
|
|
/* clear B+1 descriptor block */
|
|
-#define ZERBLK(A,B) bzero(A, (B)+DESCR)
|
|
+#define ZERBLK(A,B) bzero((void *)A, (B)+DESCR)
|
|
|
|
/*
|
|
* copy descriptor block
|
|
@@ -40,7 +42,7 @@
|
|
* NOTE: may overlap!!
|
|
* (bcopy deals with this but some memcpy's do not)!!!
|
|
*/
|
|
-#define MOVBLK(A,B,C) bcopy( (B)+DESCR, (A)+DESCR, (C) )
|
|
+#define MOVBLK(A,B,C) bcopy( ((char *)B)+DESCR, ((char *)A)+DESCR, (C) )
|
|
|
|
/****************
|
|
* string specifiers (qualifiers)
|