Subject: Re: i386->vax build fails
To: None <agrier@poofygoof.com>
From: Havard Eidnes <he@NetBSD.org>
List: port-vax
Date: 07/04/2006 09:46:55
----Next_Part(Tue_Jul__4_09_46_55_2006_334)--
Content-Type: Text/Plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

> On Sat, Jul 01, 2006 at 09:41:16PM -0700, Ben Collver wrote:
> > Justy FYI, when I tried to build a -current vax release on an i386
> > host, it failed in GENERIC/assym.h
>
> I'm getting this here too...  just when I have a 4000/VLC to hack on
> too.  :(

The attached patch fixes the build problem, at least for me.  I'm
waiting for reply from the portmaster before committing, and
apparently he's on vacation (no reply so far).

Regards,

- H=E5vard

----Next_Part(Tue_Jul__4_09_46_55_2006_334)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename=diff

Index: macros.h
===================================================================
RCS file: /u/nb/src/sys/arch/vax/include/macros.h,v
retrieving revision 1.36
diff -u -r1.36 macros.h
--- macros.h	16 Feb 2006 20:17:15 -0000	1.36
+++ macros.h	29 Jun 2006 05:49:48 -0000
@@ -40,8 +40,10 @@
 
 /* Here general macros are supposed to be stored */
 
+#define ffs(i)	_ffs_il((i))
+
 static __inline int __attribute__((__unused__))
-ffs(int reg)
+_ffs_il(int reg)
 {
 	register int val;
 
@@ -55,8 +57,13 @@
 	return	val;
 }
 
+#ifdef remque
+#undef remque
+#endif
+#define remque(p)	_remque_il((p))
+
 static __inline void __attribute__((__unused__))
-_remque(void *p)
+_remque_il(void *p)
 {
 	__asm volatile ("remque (%0),%0;clrl 4(%0)"
 			:
@@ -64,8 +71,13 @@
 			: "memory" );
 }
 
+#ifdef insque
+#undef insque
+#endif
+#define insque(p,q)	_insque_il((p),(q))
+
 static __inline void  __attribute__((__unused__))
-_insque(void *p, void *q)
+_insque_il(void *p, void *q)
 {
 	__asm volatile ("insque (%0),(%1)"
 			:
@@ -73,8 +85,10 @@
 			: "memory" );
 }
 
+#define memcpy		_memcpy_il
+
 static __inline void * __attribute__((__unused__))
-memcpy(void *to, const void *from, size_t len)
+_memcpy_il(void *to, const void *from, size_t len)
 {
 	if (len > 65535) {
 		__blkcpy(from, to, len);
@@ -86,8 +100,11 @@
 	}
 	return to;
 }
+
+#define memmove		_memmove_il
+
 static __inline void * __attribute__((__unused__))
-memmove(void *to, const void *from, size_t len)
+_memmove_il(void *to, const void *from, size_t len)
 {
 	if (len > 65535) {
 		__blkcpy(from, to, len);
@@ -111,8 +128,10 @@
 }
 #endif
 
+#define memset		_memset_il
+
 static __inline void * __attribute__((__unused__))
-memset(void *block, int c, size_t len)
+_memset_il(void *block, int c, size_t len)
 {
 	if (len > 65535) {
 		__blkset(block, c, len);
@@ -290,8 +309,10 @@
 }
 #endif
 
+#define scanc(s,p,t,m)	_scanc_il((s),(p),(t),(m))
+
 static __inline int __attribute__((__unused__))
-scanc(u_int size, const u_char *cp, const u_char *table, int mask)
+_scanc_il(u_int size, const u_char *cp, const u_char *table, int mask)
 {
 	register int ret;
 
@@ -303,8 +324,10 @@
 	return ret;
 }
 
+#define skpc(m,s,cp)	_skpc_il((m),(s),(cp))
+
 static __inline int __attribute__((__unused__))
-skpc(int mask, size_t size, u_char *cp)
+_skpc_il(int mask, size_t size, u_char *cp)
 {
 	register int ret;
 

----Next_Part(Tue_Jul__4_09_46_55_2006_334)----