Subject: bin/6864: /bin/sh barfs on makelintstub for C library
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/22/1999 17:18:59
>Number:         6864
>Category:       bin
>Synopsis:       /bin/sh barfs on makelintstub for C library
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 22 08:20:01 1999
>Originator:     Havard Eidnes
>Release:        NetBSD-current 19990120
NetBSD 1.3I NetBSD 1.3I (HUGIN) #3: Thu Jan 21 10:28:14 MET 1999 i386

	As part of "make depend" in /usr/src/lib/libc, the shell
script /usr/src/lib/libc/sys/makelintstub is being run to create
LintSysNormal.c.  With the sources of 20 Jan 1999, the shell spits out
the error message

/usr/src/lib/libc/sys/makelintstub: arith: syntax error: "e" (where
the "e" is an "LF" symbol which I've not been able to cut/paste).

After some toying around with this, the following becomes apparent:

1) If the /bin/sh module parse.c is not compiled with optimization,
   the shell can handle the makelintstub invocation without problems.

2) If the two last files are removed from the makelintstub invocation,
   the fully optimized shell *can* handle the makelintstub call.

3) If only the last file is removed from the makelintstub command
   line, the fully optimized shell *cannot* handle the makelintstub
   call and bombs out with the above error message.
4) If the "cat of `here document'" in the header() function of the
   makelintstub is commented out or removed, the fully optimized shell
   can handle the invocation.

5) Only commenting out the call to the header() function in the script
   does not make the problem go away.

	See above.   

	Sorry, don't know at the moment, and I will probably not be
able to look more at this today, so I submit this PR so that others
can air their ideas (if any).