diff options
author | Andrew Kaster <akaster@serenityos.org> | 2022-10-09 15:35:58 -0600 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-10-10 12:23:12 +0200 |
commit | 896d4e8dc1a91f577231afef9d127b51d7cc3630 (patch) | |
tree | aff8c926bf6e567ad244045a873447a92f1ad47d /Userland | |
parent | a81475d9fb926e123bf9f2c034ebaff59764b14a (diff) | |
download | serenity-896d4e8dc1a91f577231afef9d127b51d7cc3630.zip |
LibRegex: Don't build LibRegex/C/Regex.cpp on Lagom
This file implements the POSIX APIs from <regex.h>, and is not suitable
for inclusion in a Lagom build. If we do include it, it will override
the host's regex functions and wreak havoc if it's resolved before the
host's implementation.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibRegex/C/Regex.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Userland/Libraries/LibRegex/C/Regex.cpp b/Userland/Libraries/LibRegex/C/Regex.cpp index 28d93d5da6..b9a76394cc 100644 --- a/Userland/Libraries/LibRegex/C/Regex.cpp +++ b/Userland/Libraries/LibRegex/C/Regex.cpp @@ -6,19 +6,17 @@ #include <AK/String.h> #include <AK/StringBuilder.h> +#include <AK/Variant.h> #include <LibRegex/Regex.h> #include <ctype.h> +#include <regex.h> #include <stdio.h> #include <string.h> -#ifdef __serenity__ -# include <regex.h> -#else -# include <LibC/regex.h> +#ifndef AK_OS_SERENITY +# error "This file is intended for use on Serenity only to implement POSIX regex.h" #endif -#include <AK/Variant.h> - struct internal_regex_t { u8 cflags; u8 eflags; |