tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

USE_LIBTRE and regex(3)



I've been testing reg*sub(3) functions and I've noted that the
USE_LIBTRE=yes build option no longer works:

/public/netbsd-git-tre/destdir.amd64/lib/libedit.so: undefined reference
to `regfree'
/public/netbsd-git-tre/destdir.amd64/lib/libedit.so: undefined reference
to `regexec'
/public/netbsd-git-tre/destdir.amd64/lib/libedit.so: undefined reference
to `regcomp'

Do we intend to keep supporting it as a drop-in replacement implementation?

If so, should it contain regnsub(3)/regasub(3) for interchangeability
with libc's regex(3)?



On the popular request. I've prepared a draft patch extending reg*sub(3)
with \{n} and a variable number of matches. It looks like we cannot
easily change established API without hacks like:

#undef _NETBSD_SOURCE
#include <regex.h>
#define _NETBSD_SOURCE

Without the above code we will get broken bootstrap of tools on older
releases of NetBSD and we will need to keep maintaining it for a long
time/ever. Given that I resist (again) to change it.


I think it's sufficient to just fix or abandon libtre (USE_LIBTRE=yes)
and move on.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index