From 7c5ec5fe6afb50ba5c83ad0b3dab036f91b7dafe Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Fri, 31 Jul 2020 12:40:31 +0000 Subject: [PATCH] : 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. --- 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)