From 4745fcf1c78da101314252bd6ad65db5880434eb Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 12 Oct 2019 14:50:49 +0100 Subject: add regex compatability to utils and enable it for serenity OS --- utils/config.h | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'utils/config.h') diff --git a/utils/config.h b/utils/config.h index 2f393dd13..5678beaa3 100644 --- a/utils/config.h +++ b/utils/config.h @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -#ifndef _NETSURF_UTILS_CONFIG_H_ -#define _NETSURF_UTILS_CONFIG_H_ +#ifndef NETSURF_UTILS_CONFIG_H_ +#define NETSURF_UTILS_CONFIG_H_ #include @@ -35,10 +35,10 @@ char *strndup(const char *s, size_t n); #endif -#if (defined(_GNU_SOURCE) || \ - defined(__APPLE__) || \ - defined(__HAIKU__) || \ - defined(__OpenBSD__) &&\ +#if ((defined(_GNU_SOURCE) || \ + defined(__APPLE__) || \ + defined(__HAIKU__) || \ + defined(__OpenBSD__)) && \ !defined(__serenity__)) #define HAVE_STRCASESTR #else @@ -68,14 +68,18 @@ char *strchrnul(const char *s, int c); #endif #define HAVE_SYS_SELECT -#define HAVE_INETATON #define HAVE_POSIX_INET_HEADERS #if (defined(_WIN32)) -#undef HAVE_INETATON #undef HAVE_SYS_SELECT #undef HAVE_POSIX_INET_HEADERS #endif +#define HAVE_INETATON +#if (defined(_WIN32) || \ + defined(__serenity__)) +#undef HAVE_INETATON +#endif + #define HAVE_INETPTON #if (defined(_WIN32)) #undef HAVE_INETPTON @@ -113,10 +117,16 @@ char *realpath(const char *path, char *resolved_path); #endif #define HAVE_SCANDIR -#if (defined(_WIN32)) +#if (defined(_WIN32) || \ + defined(__serenity__)) #undef HAVE_SCANDIR #endif +#define HAVE_REGEX +#if (defined(__serenity__)) +#undef HAVE_REGEX +#endif + /* This section toggles build options on and off. * Simply undefine a symbol to turn the relevant feature off. * @@ -142,7 +152,7 @@ char *realpath(const char *path, char *resolved_path); #define WITH_MMAP #endif -/* amiga */ +/* IPv6 */ #if (defined(__amigaos4__) || \ defined(__AMIGA__) || \ defined(nsatari) || \ -- cgit v1.2.3