Subject: Change to src/lib/lib/arch/mips/SYS.h
To: None <port-pmax@netbsd.org>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 12/10/1994 16:17:45
The above file still follows the no-underscores-added-to-external-labels
model.   When building a NetBSD libc.a for a pmax target,
with a compiler that _does_ add underscores to external names,
tThis results in undefined references to many system calls.


The following patch fixes that for the ANSI C case.  Adding equivalent
Reiserisms for the non-ANSI preprocessor case is left as an exercise
for the reader ;)

[[ I thought Dean had already fixed this;  but it wasn't fixed in
   the src tree I'd updated via sup recently. ]]

*** SYS.h.DIST	Tue May 24 00:12:14 1994
--- SYS.h	Sat Dec  3 18:04:04 1994
***************
*** 41,50 ****
  #include <machine/machAsmDefs.h>
  
  #ifdef __STDC__
! #define	RSYSCALL(x)	LEAF(x); li v0,SYS_ ## x; syscall; bne a3,zero,err; \
! 			j ra; err: j _cerror; END(x);
! #define	PSEUDO(x,y)	LEAF(x); li v0,SYS_ ## y; syscall; bne a3,zero,err; \
! 			j ra; err: j _cerror; END(x);
  #else
  #define	RSYSCALL(x)	LEAF(x); li v0,SYS_/**/x; syscall; bne a3,zero,err; \
  			j ra; err: j _cerror; END(x);
--- 41,50 ----
  #include <machine/machAsmDefs.h>
  
  #ifdef __STDC__
! #define	RSYSCALL(x)	LEAF(_ ## x); li v0,SYS_ ## x; syscall; bne a3,zero,err; \
! 			j ra; err: j _cerror; END(_ ## x);
! #define	PSEUDO(x,y)	LEAF(_ ## x); li v0,SYS_ ## y; syscall; bne a3,zero,err; \
! 			j ra; err: j _cerror; END(_ ## x);
  #else
  #define	RSYSCALL(x)	LEAF(x); li v0,SYS_/**/x; syscall; bne a3,zero,err; \
  			j ra; err: j _cerror; END(x);