Jim Meyering <jim <at> meyering.net> writes: > I wondered if there were any GNU-specific functions, and even searched > for *GNU* macros that might guard their declarations in string.in.h. > There are none. The main difference is that strcasestr is specified by > POSIX and a declaration in string.h is required, while strverscmp is not.
No. strcasecmp is specified by POSIX, in <strings.h>. But strcasestr is pure extension, in <string.h>. Also, Bruno added all his mbs* functions in gnulib's <string.h>... > > I think it would be a mistake to encourage gnulib application writers > to rely on <string.h> declaring the nonstandard strverscmp function. > > However, if you can convince the open group to add it for POSIX-201x, > it'd make perfect sense to add it to gnulib's string.in.h now. ...so it looks like Bruno would want to get his mbs* stuff standardized at the same time. At any rate, based on the number of GNU functions standardized in 200x (such as strdup), we stand a chance of being able to pull off additional functions in the next POSIX revision however many years down the road. > > > Besides, fixing it in gnulib will benefit any other package developed primarily > > on Linux but which forgets to include "strverscmp.h". So I'm going ahead with > > a gnulib patch... oh, and I guess that means I'm also volunteering to write a > > gnulib unit test for strverscmp... > > Test suite additions are always welcome > I posted the testsuite as a separate patch - it needs a one-line change if we don't add strverscmp to <string.h>. -- Eric Blake _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils