Martin von Gagern wrote: > Hi there! > > I've got gnulib in my repository, so devs don't need a git checkout. > When I last ran the syntax checks from maint.mk, I got a false positive > from prohibit_always-defined_macros complaining about the definition of > environ in build-aux/warn-on-use.h. > > The error is due to the following line in warn-on-use.h > # define environ (*rpl_environ ()) > which conflicts with definitions from unistd.in.h. > > Maybe you should alter that file so it doesn't match the rule. Or you > should explicitely exclude it from the list of files to check. > > In my package, wdiff, I've excluded the whole build-aux directory from > that check, but I can easily do so without creating extra files due to > my personal modifications to gnulib. > http://github.com/gagern/gnulib/commit/57646d674f68676ca3b9 > I guess I should try to get my gnulib copyright assignment forms > completed so you can include this upstream as well...
Hi Martin, Thanks for the report. You can disable that check in a several of ways: - add its name to the list of checks to skip in cfg.mk: local-checks-to-skip += sc_prohibit_always-defined_macros - define gnulib_dir to a name that is not a directory - create an .x-sc_prohibit_always-defined_macros file containing regexps matching the names of any files you want to exempt Considering that you version-control parts of gnulib in your primary repository, disabling the test might be best, since I would expect many false positives with such usage. The regexps to search for are derived from gnulib's lib/ directory. If the same lib/* files are also searched for definitions (because you've chosen to version control them), every one of those regular expressions will get at least one false positive: for its definition in gnulib.