Subject: lib/2362: lib/libedit/makelist generates illegal characters in C header files
To: None <gnats-bugs@NetBSD.ORG>
From: None <email@example.com>
Date: 04/30/1996 16:47:32
>Synopsis: lib/libedit/makelist generates illegal characters in C header files
>Responsible: lib-bug-people (Library Bug People)
>Arrival-Date: Wed May 1 02:05:05 1996
>Originator: Curt Sampson
Curt Sampson firstname.lastname@example.org Info at http://www.portal.ca/
Internet Portal Services, Inc.
Vancouver, BC (604) 257-9400 De gustibus, aut bene aut nihil.
System: NetBSD cynic.portal.ca 1.0 NetBSD 1.0 (CYNIC) #57: Mon Apr 22 15:23:24 PDT 1996 email@example.com:/usr2/src-1.0/sys/arch/i386/compile/CYNIC i386
lib/libedit/makelist uses the filename given on the command line to
generate an #ifdef statement in some of the header files it creates.
Unfortuantely, if this filename includes characters that are not allowed
in the #ifdef statement, cc complains.
I discovered this in 1.0, but from my examination of the -current
source code, it appears to be present there as well.
Run the makefile with BSDSRCDIR and BSDOBJDIR in use, and have BSDSRCDIR
have an illegal character, such as a -, in the path, so that make
generates commands such as:
sh /usr2/src-1.0/lib/libedit/makelist -h /usr2/src-1.0/lib/libedit/vi.c > vi.h
I modified the line
to send the output through sed to change the unwanted - to an _ in my case:
hdr="_h_`basename $1 | sed -e 's/-/_/g'`"
Perhaps a better solution would be to use tr to change or delete
everything outside of a certain character range?