Subject: lib/1177: stray "'" in libc/arch/m68k/string/bcopy.S breaks m68k mkdep
To: None <gnats-admin@sun-lamp.pc.cs.cmu.edu>
From: Chuck Cranor <chuck@yikes.ccrc.wustl.edu>
List: netbsd-bugs
Date: 06/29/1995 15:35:02
>Number:         1177
>Category:       lib
>Synopsis:       stray "'" in libc/arch/m68k/string/bcopy.S breaks m68k mkdep
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 29 15:35:00 1995
>Originator:     Chuck Cranor <chuck@maria.wustl.edu>
>Organization:
Washington University
>Release:        NetBSD-current source date Jun 29th
>Environment:
System: NetBSD vme147.ccrc.wustl.edu 1.0A NetBSD 1.0A (VME147) #13: Thu Jun  8 20:35:04 CDT 1995     chuck@vme147.ccrc.wustl.edu:/usr/src/sys/arch/mvme68k/compile/VME147 mvme68k
[but applies to any m68k system...]

>Description:
	there is an unmatched "'" in libc/arch/m68k/string/bcopy.S which
	causes "gcc -M" to complain.

>How-To-Repeat:

run "make depend" in /usr/src/lib/libc and get:

...
k/sys/sigprocmask.S /usr/src/lib/libc/arch/m68k/sys/sigreturn.S /usr/src/lib/libc/arch/m68k/sys/sigsuspend.S /usr/src/lib/libc/arch/m68k/sys/syscall.S";  if [ "$files" != " " ]; then  mkdep -a  -DNLS -DYP -DLIBC_SCCS -DSYSLIBC_SCCS -I/usr/src/lib/libc/include -D__DBINTERFACE_PRIVATE -DPOSIX_MISTAKE -DFLOATING_POINT  -I/usr/src/lib/libc/arch/m68k $files;  fi
/usr/src/lib/libc/arch/m68k/string/bcopy.S:65: unterminated character constant
/usr/src/lib/libc/arch/m68k/string/bcopy.S:69: `#else' not within a conditional
/usr/src/lib/libc/arch/m68k/string/bcopy.S:72: unbalanced `#endif'
In file included from /usr/src/lib/libc/arch/m68k/string/memcpy.S:2:
/usr/src/lib/libc/arch/m68k/string/bcopy.S:65: unterminated character constant
/usr/src/lib/libc/arch/m68k/string/bcopy.S:69: `#else' not within a conditional
/usr/src/lib/libc/arch/m68k/string/bcopy.S:72: unbalanced `#endif'
In file included from /usr/src/lib/libc/arch/m68k/string/memmove.S:2:
/usr/src/lib/libc/arch/m68k/string/bcopy.S:65: unterminated character constant
/usr/src/lib/libc/arch/m68k/string/bcopy.S:69: `#else' not within a conditional
/usr/src/lib/libc/arch/m68k/string/bcopy.S:72: unbalanced `#endif'

>Fix:
apply the following patch:

*** /tmp/bcopy.S	Thu Jun 29 13:57:16 1995
--- /usr/src/lib/libc/arch/m68k/string/bcopy.S	Thu Jun 29 13:57:35 1995
***************
*** 62,68 ****
  #endif
  #endif
  	movl	sp@(12),d1		| check count
! 	beq	bcdone			| == 0, don't do anything
  #if defined(MEMCOPY) || defined(MEMMOVE)
  	movl	sp@(4),a1		| dest address
  	movl	sp@(8),a0		| src address
--- 62,68 ----
  #endif
  #endif
  	movl	sp@(12),d1		| check count
! 	beq	bcdone			| == 0, do not do anything
  #if defined(MEMCOPY) || defined(MEMMOVE)
  	movl	sp@(4),a1		| dest address
  	movl	sp@(8),a0		| src address
>Audit-Trail:
>Unformatted: