Re: [net-snmp:code] treewide: Terminate netsnmp_feature_*() uses with a semicolon
On Tue, Aug 27, 2019 at 11:11 PM Bart Van Assche wrote: > On 8/26/19 3:12 PM, Bill Fenner wrote: > > It turns out a typo in the .travis.yml did not export the environment > > variables to the build script. Looks like MODE=minimalist and > > MODE=read-only are both broken as-is: > > https://travis-ci.org/fenner/net-snmp/builds/577056671 > > It seems like the recent changes are sufficient to make the minimalist > build pass? > > Hi Bart, Yes, I addressed the problems in minimalist with https://github.com/net-snmp/net-snmp/commit/37e498fdcde98ee93875a750dbcd5a8a9ba336b1 and the problems in read-only with https://github.com/net-snmp/net-snmp/commit/904aefa5a241473f2075e60147a307b2250a4853 . Travis should be back to keeping us on our toes. Bill ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: [net-snmp:code] treewide: Terminate netsnmp_feature_*() uses with a semicolon
On 8/26/19 3:12 PM, Bill Fenner wrote: It turns out a typo in the .travis.yml did not export the environment variables to the build script. Looks like MODE=minimalist and MODE=read-only are both broken as-is: https://travis-ci.org/fenner/net-snmp/builds/577056671 Hi Bill, It seems like the recent changes are sufficient to make the minimalist build pass? Bart. ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: [net-snmp:code] treewide: Terminate netsnmp_feature_*() uses with a semicolon
On 8/26/19 3:12 PM, Bill Fenner wrote: It turns out a typo in the .travis.yml did not export the environment variables to the build script. Looks like MODE=minimalist and MODE=read-only are both broken as-is: https://travis-ci.org/fenner/net-snmp/builds/577056671 Hi Bill, If you submit the patches that are in our repository but not yet in the official repository I can have a look at why the minimalist build fails. Bart. ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: [net-snmp:code] treewide: Terminate netsnmp_feature_*() uses with a semicolon
It turns out a typo in the .travis.yml did not export the environment variables to the build script. Looks like MODE=minimalist and MODE=read-only are both broken as-is: https://travis-ci.org/fenner/net-snmp/builds/577056671 Bill ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: [net-snmp:code] treewide: Terminate netsnmp_feature_*() uses with a semicolon
On Mon, Aug 26, 2019 at 11:48 AM Bill Fenner wrote: > On Tue, Aug 13, 2019 at 11:17 PM net-snmp Git repository < > nore...@code.net-snmp.p.re.sourceforge.net> wrote: > >> Branch: V5-8-patches >> >> treewide: Terminate netsnmp_feature_*() uses with a semicolon >> >> This patch has been generated by the following shell command: >> >> git grep -l netsnmp_feature_ | >> while read f; do sed -i 's/^netsnmp_feature.*[^;]$/&;/' "$f"; done >> >> By Bart Van Assche on 08/14/2019 02:58 >> > > Hi Bart, > > Thank you very much for all the cleanups you've been working on recently. > I really appreciate it. > > Have you tried using features with this change? I am getting errors like: > > [net-snmp] In file included from > *../include/net-snmp/net-snmp-features.h:11:0*, > > [net-snmp] from *snmp_client.c:48*: > > [net-snmp] *../include/net-snmp/agent/features.h:4:39:* *error: *ISO C99 > requires whitespace after the macro name [*-Werror*] > > [net-snmp] #define NETSNMP_FEATURE_HAS_BABY_STEPS*;* 1 > > [net-snmp]*^* > > which appear likely to be due to the feature calculation infrastructure > not understanding these semicolons. The semicolon seems to be making it > into the .ft file for *some* macros but not others: > > ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_PROVIDE_*BABY_STEPS*; > 1 > > ./agent/helpers/baby_steps.ft:#define > NETSNMP_FEATURE_*BABY_STEPS*_CHILD_OF_MIB_HELPERS; > 1 > > ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_PROVIDE_*BABY_STEPS* > 1 > > ./agent/helpers/baby_steps.ft:#define > NETSNMP_FEATURE_NETSNMP_*BABY_STEPS*_HANDLER_INIT_CHILD_OF_NETSNMP_UNUSED; > 1 > > ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_PROVIDE_NETSNMP_ > *BABY_STEPS*_HANDLER_INIT 1 > > I'm happy to dig into this, but wanted to see if you had seen it already. > (Not asking for a revert; let's move this forward together) > > It occurs to me that another thing that would be useful to dig into: why did the Travis minimalist build not have similar problems? I'll start exploring this too. Bill ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: [net-snmp:code] treewide: Terminate netsnmp_feature_*() uses with a semicolon
On Mon, Aug 26, 2019 at 4:51 PM Bart Van Assche wrote: > On 8/26/19 12:59 PM, Bill Fenner wrote: > > Just as a personal preference, I like to use "awk" instead of grep|... - > > "awk '/NSF_WW/ {print $1}' $tmpf" gives the same result and doesn't care > > about the presence or absence of the semicolon - but, I don't know about > > Windows: if grep and sed are available, is awk? > > Hi Bill, > > The number of platforms supported by Net-SNMP is large. Each of these > platforms comes with its own version of grep, sed and awk. Cygwin, MinGW > and MinGW64 include GNU versions of grep, sed and awk so these platforms > are not my biggest worry. I'm more worried about *BSD, Solaris and AIX. > So my preference here is to be conservative and keep the changes as > small as possible. > awk was available a surprisingly long time ago ("The AWK Programming Language" was published in 1988), but you're right that less churn is probably safer. Bill ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: [net-snmp:code] treewide: Terminate netsnmp_feature_*() uses with a semicolon
On 8/26/19 12:59 PM, Bill Fenner wrote: > Just as a personal preference, I like to use "awk" instead of grep|... - > "awk '/NSF_WW/ {print $1}' $tmpf" gives the same result and doesn't care > about the presence or absence of the semicolon - but, I don't know about > Windows: if grep and sed are available, is awk? Hi Bill, The number of platforms supported by Net-SNMP is large. Each of these platforms comes with its own version of grep, sed and awk. Cygwin, MinGW and MinGW64 include GNU versions of grep, sed and awk so these platforms are not my biggest worry. I'm more worried about *BSD, Solaris and AIX. So my preference here is to be conservative and keep the changes as small as possible. Thanks, Bart. ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: [net-snmp:code] treewide: Terminate netsnmp_feature_*() uses with a semicolon
On Mon, Aug 26, 2019 at 12:34 PM Bill Fenner wrote: > On Mon, Aug 26, 2019 at 11:48 AM Bill Fenner > wrote: > >> On Tue, Aug 13, 2019 at 11:17 PM net-snmp Git repository < >> nore...@code.net-snmp.p.re.sourceforge.net> wrote: >> >>> Branch: V5-8-patches >>> >>> treewide: Terminate netsnmp_feature_*() uses with a semicolon >>> >>> This patch has been generated by the following shell command: >>> >>> git grep -l netsnmp_feature_ | >>> while read f; do sed -i 's/^netsnmp_feature.*[^;]$/&;/' "$f"; done >>> >>> By Bart Van Assche on 08/14/2019 02:58 >>> >> >> Hi Bart, >> >> Thank you very much for all the cleanups you've been working on >> recently. I really appreciate it. >> >> Have you tried using features with this change? I am getting errors like: >> >> [net-snmp] In file included from >> *../include/net-snmp/net-snmp-features.h:11:0*, >> >> [net-snmp] from *snmp_client.c:48*: >> >> [net-snmp] *../include/net-snmp/agent/features.h:4:39:* *error: *ISO C99 >> requires whitespace after the macro name [*-Werror*] >> >> [net-snmp] #define NETSNMP_FEATURE_HAS_BABY_STEPS*;* 1 >> >> [net-snmp]*^* >> >> which appear likely to be due to the feature calculation infrastructure >> not understanding these semicolons. The semicolon seems to be making it >> into the .ft file for *some* macros but not others: >> >> ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_PROVIDE_ >> *BABY_STEPS*; 1 >> >> ./agent/helpers/baby_steps.ft:#define >> NETSNMP_FEATURE_*BABY_STEPS*_CHILD_OF_MIB_HELPERS; >> 1 >> >> ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_PROVIDE_ >> *BABY_STEPS* 1 >> >> ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_NETSNMP_ >> *BABY_STEPS*_HANDLER_INIT_CHILD_OF_NETSNMP_UNUSED; 1 >> >> ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_PROVIDE_NETSNMP_ >> *BABY_STEPS*_HANDLER_INIT 1 >> >> I'm happy to dig into this, but wanted to see if you had seen it >> already. (Not asking for a revert; let's move this forward together) >> >> Looks like these diffs in local/minimalist/feature-check fix it: > > -for i in `grep NSF_RR $tmpf | sed 's/ NSF_RR//'` ; do > > +for i in `grep NSF_RR $tmpf | sed 's/ NSF_RR;//'` ; do > > -for i in `grep NSF_PP $tmpf | sed 's/ NSF_PP//'` ; do > > +for i in `grep NSF_PP $tmpf | sed 's/ NSF_PP;//'` ; do > > -for i in `grep NSF_CO $tmpf | sed 's/ NSF_CO//'` ; do > > +for i in `grep NSF_CO $tmpf | sed 's/ NSF_CO;//'` ; do > > -for i in `grep NSF_WW $tmpf | sed 's/ NSF_WW//'` ; do > > +for i in `grep NSF_WW $tmpf | sed 's/ NSF_WW;//'` ; do > > I'll do some more testing and check it in. > Just as a personal preference, I like to use "awk" instead of grep|... - "awk '/NSF_WW/ {print $1}' $tmpf" gives the same result and doesn't care about the presence or absence of the semicolon - but, I don't know about Windows: if grep and sed are available, is awk? Thanks, Bill ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: [net-snmp:code] treewide: Terminate netsnmp_feature_*() uses with a semicolon
On Mon, Aug 26, 2019 at 11:48 AM Bill Fenner wrote: > On Tue, Aug 13, 2019 at 11:17 PM net-snmp Git repository < > nore...@code.net-snmp.p.re.sourceforge.net> wrote: > >> Branch: V5-8-patches >> >> treewide: Terminate netsnmp_feature_*() uses with a semicolon >> >> This patch has been generated by the following shell command: >> >> git grep -l netsnmp_feature_ | >> while read f; do sed -i 's/^netsnmp_feature.*[^;]$/&;/' "$f"; done >> >> By Bart Van Assche on 08/14/2019 02:58 >> > > Hi Bart, > > Thank you very much for all the cleanups you've been working on recently. > I really appreciate it. > > Have you tried using features with this change? I am getting errors like: > > [net-snmp] In file included from > *../include/net-snmp/net-snmp-features.h:11:0*, > > [net-snmp] from *snmp_client.c:48*: > > [net-snmp] *../include/net-snmp/agent/features.h:4:39:* *error: *ISO C99 > requires whitespace after the macro name [*-Werror*] > > [net-snmp] #define NETSNMP_FEATURE_HAS_BABY_STEPS*;* 1 > > [net-snmp]*^* > > which appear likely to be due to the feature calculation infrastructure > not understanding these semicolons. The semicolon seems to be making it > into the .ft file for *some* macros but not others: > > ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_PROVIDE_*BABY_STEPS*; > 1 > > ./agent/helpers/baby_steps.ft:#define > NETSNMP_FEATURE_*BABY_STEPS*_CHILD_OF_MIB_HELPERS; > 1 > > ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_PROVIDE_*BABY_STEPS* > 1 > > ./agent/helpers/baby_steps.ft:#define > NETSNMP_FEATURE_NETSNMP_*BABY_STEPS*_HANDLER_INIT_CHILD_OF_NETSNMP_UNUSED; > 1 > > ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_PROVIDE_NETSNMP_ > *BABY_STEPS*_HANDLER_INIT 1 > > I'm happy to dig into this, but wanted to see if you had seen it already. > (Not asking for a revert; let's move this forward together) > > Looks like these diffs in local/minimalist/feature-check fix it: -for i in `grep NSF_RR $tmpf | sed 's/ NSF_RR//'` ; do +for i in `grep NSF_RR $tmpf | sed 's/ NSF_RR;//'` ; do -for i in `grep NSF_PP $tmpf | sed 's/ NSF_PP//'` ; do +for i in `grep NSF_PP $tmpf | sed 's/ NSF_PP;//'` ; do -for i in `grep NSF_CO $tmpf | sed 's/ NSF_CO//'` ; do +for i in `grep NSF_CO $tmpf | sed 's/ NSF_CO;//'` ; do -for i in `grep NSF_WW $tmpf | sed 's/ NSF_WW//'` ; do +for i in `grep NSF_WW $tmpf | sed 's/ NSF_WW;//'` ; do I'll do some more testing and check it in. Bill ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: [net-snmp:code] treewide: Terminate netsnmp_feature_*() uses with a semicolon
On Tue, Aug 13, 2019 at 11:17 PM net-snmp Git repository < nore...@code.net-snmp.p.re.sourceforge.net> wrote: > Branch: V5-8-patches > > treewide: Terminate netsnmp_feature_*() uses with a semicolon > > This patch has been generated by the following shell command: > > git grep -l netsnmp_feature_ | > while read f; do sed -i 's/^netsnmp_feature.*[^;]$/&;/' "$f"; done > > By Bart Van Assche on 08/14/2019 02:58 > Hi Bart, Thank you very much for all the cleanups you've been working on recently. I really appreciate it. Have you tried using features with this change? I am getting errors like: [net-snmp] In file included from *../include/net-snmp/net-snmp-features.h:11:0*, [net-snmp] from *snmp_client.c:48*: [net-snmp] *../include/net-snmp/agent/features.h:4:39:* *error: *ISO C99 requires whitespace after the macro name [*-Werror*] [net-snmp] #define NETSNMP_FEATURE_HAS_BABY_STEPS*;* 1 [net-snmp]*^* which appear likely to be due to the feature calculation infrastructure not understanding these semicolons. The semicolon seems to be making it into the .ft file for *some* macros but not others: ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_PROVIDE_*BABY_STEPS*; 1 ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_*BABY_STEPS*_CHILD_OF_MIB_HELPERS; 1 ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_PROVIDE_*BABY_STEPS* 1 ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_NETSNMP_*BABY_STEPS*_HANDLER_INIT_CHILD_OF_NETSNMP_UNUSED; 1 ./agent/helpers/baby_steps.ft:#define NETSNMP_FEATURE_PROVIDE_NETSNMP_ *BABY_STEPS*_HANDLER_INIT 1 I'm happy to dig into this, but wanted to see if you had seen it already. (Not asking for a revert; let's move this forward together) Thanks, Bill ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders