mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 07:44:59 +00:00
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.
This commit is contained in:
parent
a81475d9fb
commit
896d4e8dc1
2 changed files with 5 additions and 8 deletions
|
@ -482,10 +482,9 @@ if (BUILD_LAGOM)
|
|||
)
|
||||
|
||||
# Regex
|
||||
file(GLOB LIBREGEX_LIBC_SOURCES "../../Userland/Libraries/LibRegex/C/Regex.cpp")
|
||||
file(GLOB LIBREGEX_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibRegex/*.cpp")
|
||||
lagom_lib(Regex regex
|
||||
SOURCES ${LIBREGEX_SOURCES} ${LIBREGEX_LIBC_SOURCES}
|
||||
SOURCES ${LIBREGEX_SOURCES}
|
||||
LIBS LibUnicode
|
||||
)
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue