public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] dlfcn: Move RTLD_DEFAULT/RTLD_NEXT outside __USE_GNU
@ 2022-05-22 19:36 Fangrui Song
  2022-05-23 15:21 ` Florian Weimer
  0 siblings, 1 reply; 3+ messages in thread
From: Fangrui Song @ 2022-05-22 19:36 UTC (permalink / raw)
  To: libc-alpha

RTLD_DEFAULT and RTLD_NEXT appear in IEEE Std 1003.1-2004.  (RTLD_NEXT
even appears in the 1997 SUS version 2.)  Many systems (e.g. FreeBSD, musl)
just define the two macros unconditionally.

Let's do the same, as if the state before
commit 70b2845f71c1fb6bd5ec3ef325974b6a90cdb45c.
---
 dlfcn/dlfcn.h | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/dlfcn/dlfcn.h b/dlfcn/dlfcn.h
index a3af6051d4..6be06241d1 100644
--- a/dlfcn/dlfcn.h
+++ b/dlfcn/dlfcn.h
@@ -30,6 +30,14 @@
 #ifdef __USE_GNU
 #include <bits/dl_find_object.h>
 
+/* Type for namespace indices.  */
+typedef long int Lmid_t;
+
+/* Special namespace ID values.  */
+# define LM_ID_BASE	0	/* Initial namespace.  */
+# define LM_ID_NEWLM	-1	/* For dlmopen: request new namespace.  */
+#endif
+
 /* If the first argument of `dlsym' or `dlvsym' is set to RTLD_NEXT
    the run-time address of the symbol called NAME in the next shared
    object is returned.  The "next" relation is defined by the order
@@ -41,16 +49,6 @@
    is returned.  */
 # define RTLD_DEFAULT	((void *) 0)
 
-
-/* Type for namespace indices.  */
-typedef long int Lmid_t;
-
-/* Special namespace ID values.  */
-# define LM_ID_BASE	0	/* Initial namespace.  */
-# define LM_ID_NEWLM	-1	/* For dlmopen: request new namespace.  */
-#endif
-
-
 __BEGIN_DECLS
 
 /* Open the shared object FILE and map it in; return a handle that can be
-- 
2.36.1.124.g0e6072fb45-goog


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

end of thread, other threads:[~2022-05-23 15:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-22 19:36 [PATCH] dlfcn: Move RTLD_DEFAULT/RTLD_NEXT outside __USE_GNU Fangrui Song
2022-05-23 15:21 ` Florian Weimer
2022-05-23 15:42   ` Andreas Schwab

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).