aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/grab.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/grab.c b/src/grab.c
index f04f75f..5695226 100644
--- a/src/grab.c
+++ b/src/grab.c
@@ -3,7 +3,6 @@
#include <libgen.h>
#include <limits.h>
#include <locale.h>
-#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -14,12 +13,17 @@
# define nullptr NULL
#endif
-#include "da.h"
-
-#ifndef REG_STARTEND
-# error "REG_STARTEND not defined"
+#if GRAB_DO_PCRE
+# include <pcre2posix.h>
+#else
+# include <regex.h>
+# ifndef REG_STARTEND
+# error "REG_STARTEND not defined"
+# endif
#endif
+#include "da.h"
+
#define die(...) err(EXIT_FAILURE, __VA_ARGS__);
#define diex(...) errx(EXIT_FAILURE, __VA_ARGS__);
#define warn(...) \