From b69389520c4a06c1923cf481495659f9c11abd49 Mon Sep 17 00:00:00 2001
From: Alexandre Julliard <julliard@winehq.org>
Date: Mon, 13 Jan 2003 18:41:40 +0000
Subject: [PATCH] Added configure check for regex.h.

---
 configure               |  2 ++
 configure.ac            |  1 +
 include/config.h.in     |  3 +++
 programs/winedbg/hash.c | 11 +++++++++++
 4 files changed, 17 insertions(+)

diff --git a/configure b/configure
index f558518bb6f..f3cf658b9e7 100755
--- a/configure
+++ b/configure
@@ -13356,6 +13356,7 @@ done
 
 
 
+
 
 
 for ac_header in \
@@ -13386,6 +13387,7 @@ for ac_header in \
 	netinet/tcp.h \
 	pty.h \
 	pwd.h \
+	regex.h \
 	sched.h \
 	scsi/sg.h \
 	socket.h \
diff --git a/configure.ac b/configure.ac
index 478b2b003f4..c1ae4a717cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1017,6 +1017,7 @@ AC_CHECK_HEADERS(\
 	netinet/tcp.h \
 	pty.h \
 	pwd.h \
+	regex.h \
 	sched.h \
 	scsi/sg.h \
 	socket.h \
diff --git a/include/config.h.in b/include/config.h.in
index 9352fe3d17c..08631693b95 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -413,6 +413,9 @@
 /* Define to 1 if you have the `pwrite' function. */
 #undef HAVE_PWRITE
 
+/* Define to 1 if you have the <regex.h> header file. */
+#undef HAVE_REGEX_H
+
 /* Define to 1 if you have the `resizeterm' function. */
 #undef HAVE_RESIZETERM
 
diff --git a/programs/winedbg/hash.c b/programs/winedbg/hash.c
index c7422cc7eb1..1c67a72d419 100644
--- a/programs/winedbg/hash.c
+++ b/programs/winedbg/hash.c
@@ -1335,6 +1335,8 @@ int DEBUG_SetLocalSymbolType(struct wine_locals * sym, struct datatype * type)
   return TRUE;
 }
 
+#ifdef HAVE_REGEX_H
+
 static int cmp_sym_by_name(const void * p1, const void * p2)
 {
   struct name_hash ** name1 = (struct name_hash **) p1;
@@ -1396,3 +1398,12 @@ void DEBUG_InfoSymbols(const char* str)
     }
     HeapFree(GetProcessHeap(), 0, array);
 }
+
+#else /* HAVE_REGEX_H */
+
+void DEBUG_InfoSymbols(const char* str)
+{
+    DEBUG_Printf( DBG_CHN_MESG, "FIXME: needs regex support\n" );
+}
+
+#endif /* HAVE_REGEX_H */
-- 
GitLab