git: aaacbdb3993b - stable/12 - <regex.h>: reserve a regcomp field for REG_POSIX

Kyle Evans kevans at FreeBSD.org
Mon Dec 28 04:20:52 UTC 2020


The branch stable/12 has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=aaacbdb3993b7ba9b31c7f26412ffcc44ba94a52

commit aaacbdb3993b7ba9b31c7f26412ffcc44ba94a52
Author:     Kyle Evans <kevans at FreeBSD.org>
AuthorDate: 2020-07-31 12:40:31 +0000
Commit:     Kyle Evans <kevans at FreeBSD.org>
CommitDate: 2020-12-28 04:20:26 +0000

    <regex.h>: reserve a regcomp field for REG_POSIX
    
    For libc regcomp, this will be a nop. libregex will take this to mean that
    it needs to turn off GNU extensions, effectively switching it back to the
    POSIX-compliant libc implementation at runtime.
    
    (cherry picked from commit 7c5ec5fe6afb50ba5c83ad0b3dab036f91b7dafe)
---
 include/regex.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/regex.h b/include/regex.h
index 6b0838a9bd97..3bea3df4f3d4 100644
--- a/include/regex.h
+++ b/include/regex.h
@@ -71,6 +71,7 @@ typedef struct {
 #define	REG_NOSPEC	0020
 #define	REG_PEND	0040
 #define	REG_DUMP	0200
+#define	REG_POSIX	0400	/* only POSIX-compliant regex (libregex) */
 
 /* regerror() flags */
 #define	REG_ENOSYS	(-1)


More information about the dev-commits-src-all mailing list