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

* Re: [PATCH] dlfcn: Move RTLD_DEFAULT/RTLD_NEXT outside __USE_GNU
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2022-05-23 15:21 UTC (permalink / raw)
  To: Fangrui Song via Libc-alpha

* Fangrui Song via 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.

Please de-indent the #defines for RTLD_NEXT and RTLD_DEFAULT because
they now unconditional.  No need to post a new version.

POSIX reserves the RTLD_ namespace, and this is already reflected in our
conform tests.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
Tested-by: Florian Weimer <fweimer@redhat.com>

Thanks,
Florian


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

* Re: [PATCH] dlfcn: Move RTLD_DEFAULT/RTLD_NEXT outside __USE_GNU
  2022-05-23 15:21 ` Florian Weimer
@ 2022-05-23 15:42   ` Andreas Schwab
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Schwab @ 2022-05-23 15:42 UTC (permalink / raw)
  To: Florian Weimer via Libc-alpha; +Cc: Florian Weimer

On Mai 23 2022, Florian Weimer via Libc-alpha wrote:

> POSIX reserves the RTLD_ namespace, and this is already reflected in our
> conform tests.

That information should be part of the commit message.  It is the only
reason that matters.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

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