This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 16/17] Regex: Define __USE_GNU for non-GLIBC systems.
- From: Arnold Robbins <arnold at skeeve dot com>
- To: carlos at redhat dot com, libc-alpha at sourceware dot org
- Date: Fri, 08 Dec 2017 11:19:24 +0200
- Subject: [PATCH 16/17] Regex: Define __USE_GNU for non-GLIBC systems.
- Authentication-results: sourceware.org; auth=none
This patch defines __USE_GNU for non-GLIBC systems. For example, *BSD
need it.
2017-12-05 Arnold D. Robbins <arnold@skeeve.com>
* posix/regex.h: Define __USE_GNU if not _LIBC. Needed when
regex is being used standalone on non-GLIBC systems.
diff --git a/posix/regex.h b/posix/regex.h
index 8970e37..a3f41b5 100644
--- a/posix/regex.h
+++ b/posix/regex.h
@@ -22,6 +22,10 @@
#include <sys/types.h>
+#ifndef _LIBC
+#define __USE_GNU 1
+#endif
+
/* Allow the use in C++ code. */
#ifdef __cplusplus
extern "C" {