public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 16/17] Regex: Define __USE_GNU for non-GLIBC systems.
@ 2017-12-08  9:21 Arnold Robbins
  2017-12-08 11:23 ` Joseph Myers
  0 siblings, 1 reply; 3+ messages in thread
From: Arnold Robbins @ 2017-12-08  9:21 UTC (permalink / raw)
  To: carlos, libc-alpha

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 16/17] Regex: Define __USE_GNU for non-GLIBC systems.
  2017-12-08  9:21 [PATCH 16/17] Regex: Define __USE_GNU for non-GLIBC systems Arnold Robbins
@ 2017-12-08 11:23 ` Joseph Myers
  2017-12-08 13:05   ` arnold
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph Myers @ 2017-12-08 11:23 UTC (permalink / raw)
  To: Arnold Robbins; +Cc: carlos, libc-alpha

On Fri, 8 Dec 2017, Arnold Robbins wrote:

> This patch defines __USE_GNU for non-GLIBC systems. For example, *BSD
> need it.

_LIBC refers to glibc being *built*.  This change would cause the header 
to expose inappropriate symbols when used in an installation of glibc.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 16/17] Regex: Define __USE_GNU for non-GLIBC systems.
  2017-12-08 11:23 ` Joseph Myers
@ 2017-12-08 13:05   ` arnold
  0 siblings, 0 replies; 3+ messages in thread
From: arnold @ 2017-12-08 13:05 UTC (permalink / raw)
  To: joseph, arnold; +Cc: libc-alpha, carlos

Joseph Myers <joseph@codesourcery.com> wrote:

> On Fri, 8 Dec 2017, Arnold Robbins wrote:
>
> > This patch defines __USE_GNU for non-GLIBC systems. For example, *BSD
> > need it.
>
> _LIBC refers to glibc being *built*.  This change would cause the header 
> to expose inappropriate symbols when used in an installation of glibc.
>
> -- 
> Joseph S. Myers
> joseph@codesourcery.com

There don't seem to be other uses of _LIBC in the regex.h header.
All I know is that the __USE_GNU is needed on non-GLIBC systems.
Removing that bit doesn't affect compiling on Linux, nor does having
it there.

So, I don't see the harm in it, but I'm not a GLIBC guy, so I'm
probably still missing something.

Arnold

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-08 13:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-08  9:21 [PATCH 16/17] Regex: Define __USE_GNU for non-GLIBC systems Arnold Robbins
2017-12-08 11:23 ` Joseph Myers
2017-12-08 13:05   ` arnold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).