Although I released 2.19 of GNU Gengetopt few weeks ago, I had to release a fixed version: 2.19.1, http://www.gnu.org/software/gengetopt.
This release basically fixes some bugs such as:
- fixed compilation problem that can make 'make check' fail on some systems
lacking getopt_long. - fixed a test problem when not using GNU sed
- in strings # comments are not considered
The second problem was due to a usage of sed with a regular expression which seems to work with GNU sed, but not with BSD sed (actually I don't know which version misbehaves). The solution was provided by Bob White (thanks again Bob!) and it is also online here.
The problem was that I was using this sed command line:
sed -e "s/^\(\([^\/]*\)\/\)\+//g"in order to remove the directories of a path, while it was sufficient to use this simpler command line:
sed -e "s/^.*\///g"since the * is greedy and will match the last /. Well done Bob! :-)