Re: error of makerumpdefs.sh
In article <20180821092816.ga99...@box.my.domain>, Andreas Kusalananda Kähäri wrote: >On Tue, Aug 21, 2018 at 05:10:27PM +0900, Masanobu SAITOH wrote: >> Hi. >> >> While cleaning some header files, I've noticed that >sys/rump/include/rump/makerumpdefs.sh >> complained some sed lines: >> >> > % sh -f makerumpdefs.sh >> > Generating rumpdefs.h >> > sed: 1: "/#define[ ]*_FCN/{:t;N ...": unexpected EOF (pending }'s) >> > sed: 1: "/#define[ ]*_IO.*\\$/{ ...": unexpected EOF (pending }'s) >> > sed: 1: "/#define[ ]*_IO.*[^\]$ ...": bad flag in substitute >command: '}' >> > Generating rumperr.h >> > Generating rumperrno2host.h >> >> What is wrong? makerumpdefs.sh, sed or header files? > >Non-NetBSD user but long time lurker here... > >It looks like a syntax error in the sed script. Each of those are >(probably) due to the last command in a {...} group not being terminated >by a ;. For example [1], > >{s/_IO/_RUMP_IO/g;s/IOC_/RUMP_IOC_/gp} > >should be > >{s/_IO/_RUMP_IO/g;s/IOC_/RUMP_IOC_/gp;} > >The ;-less syntax would probably be ok for GNU sed, but I'm not sure >what NetBSD sed would say about it. OpenBSD sed would error out in the >way you describe. > > >[1] >http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/rump/include/rump/makerumpdefs.sh?rev=1.30 Well, I just fixed it, it was not only the trailing semi, but the embedded label. Best, christos
Re: error of makerumpdefs.sh
On Tue, Aug 21, 2018 at 05:10:27PM +0900, Masanobu SAITOH wrote: > Hi. > > While cleaning some header files, I've noticed that > sys/rump/include/rump/makerumpdefs.sh > complained some sed lines: > > > % sh -f makerumpdefs.sh > > Generating rumpdefs.h > > sed: 1: "/#define[ ]*_FCN/{:t;N ...": unexpected EOF (pending }'s) > > sed: 1: "/#define[ ]*_IO.*\\$/{ ...": unexpected EOF (pending }'s) > > sed: 1: "/#define[ ]*_IO.*[^\]$ ...": bad flag in substitute command: > > '}' > > Generating rumperr.h > > Generating rumperrno2host.h > > What is wrong? makerumpdefs.sh, sed or header files? Non-NetBSD user but long time lurker here... It looks like a syntax error in the sed script. Each of those are (probably) due to the last command in a {...} group not being terminated by a ;. For example [1], {s/_IO/_RUMP_IO/g;s/IOC_/RUMP_IOC_/gp} should be {s/_IO/_RUMP_IO/g;s/IOC_/RUMP_IOC_/gp;} The ;-less syntax would probably be ok for GNU sed, but I'm not sure what NetBSD sed would say about it. OpenBSD sed would error out in the way you describe. [1] http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/rump/include/rump/makerumpdefs.sh?rev=1.30 -- Andreas Kusalananda Kähäri, National Bioinformatics Infrastructure Sweden (NBIS), Uppsala University, Sweden. När du har kontakt med oss på Uppsala universitet med e-post så innebär det att vi behandlar dina personuppgifter. För att läsa mer om hur vi gör det kan du läsa här: http://www.uu.se/om-uu/dataskydd-personuppgifter/ E-mailing Uppsala University means that we will process your personal data. For more information on how this is performed, please read here: http://www.uu.se/om-uu/dataskydd-personuppgifter/
error of makerumpdefs.sh
Hi. While cleaning some header files, I've noticed that sys/rump/include/rump/makerumpdefs.sh complained some sed lines: % sh -f makerumpdefs.sh Generating rumpdefs.h sed: 1: "/#define[ ]*_FCN/{:t;N ...": unexpected EOF (pending }'s) sed: 1: "/#define[ ]*_IO.*\\$/{ ...": unexpected EOF (pending }'s) sed: 1: "/#define[ ]*_IO.*[^\]$ ...": bad flag in substitute command: '}' Generating rumperr.h Generating rumperrno2host.h What is wrong? makerumpdefs.sh, sed or header files? -- --- SAITOH Masanobu (msai...@execsw.org msai...@netbsd.org)