Fix __STDC__ macro handling of #, only hurt for mkdep not cpp due
authorgvf <gvf@openbsd.org>
Thu, 17 Apr 1997 14:57:31 +0000 (14:57 +0000)
committergvf <gvf@openbsd.org>
Thu, 17 Apr 1997 14:57:31 +0000 (14:57 +0000)
to cpp's use of -traditional. NetBSD PR port-m68k/3222. Fix from
<horimoto@cs-aoi.cs.sist.ac.jp>.

lib/libc/arch/m68k/SYS.h

index 58b7eec..d181e5c 100644 (file)
@@ -34,7 +34,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *     $OpenBSD: SYS.h,v 1.2 1996/08/19 08:13:51 tholo Exp $
+ *     $OpenBSD: SYS.h,v 1.3 1997/04/17 14:57:31 gvf Exp $
  */
 
 #include <sys/syscall.h>
 
 #ifdef __STDC__
 
+#define _IMMEDIATE_    #
+
 #define        SYSCALL(x)      .even; err: jra cerror; ENTRY(x); \
-                       movl \#SYS_ ## x,d0; trap \#0; jcs err
+                       movl _IMMEDIATE_ SYS_ ## x,d0; trap _IMMEDIATE_ 0; jcs err
 #define        RSYSCALL(x)     SYSCALL(x); rts
-#define        PSEUDO(x,y)     ENTRY(x); movl \#SYS_ ## y,d0; trap \#0; rts
+#define        PSEUDO(x,y)     ENTRY(x); movl _IMMEDIATE_ SYS_ ## y,d0; trap _IMMEDIATE_ 0; rts
 
+#undef _IMMEDIATE_
 #else /* !__STDC__ */
 
 #define        SYSCALL(x)      .even; err: jra cerror; ENTRY(x); \