[PATCH 16/17] Regex: Define __USE_GNU for non-GLIBC systems.

Arnold Robbins arnold@skeeve.com
Fri Dec 8 09:21:00 GMT 2017


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" {



More information about the Libc-alpha mailing list