From: Fangrui Song <maskray@google.com>
To: libc-alpha@sourceware.org
Subject: [PATCH] dlfcn: Move RTLD_DEFAULT/RTLD_NEXT outside __USE_GNU
Date: Sun, 22 May 2022 12:36:42 -0700 [thread overview]
Message-ID: <20220522193642.3598646-1-maskray@google.com> (raw)
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
next reply other threads:[~2022-05-22 19:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-22 19:36 Fangrui Song [this message]
2022-05-23 15:21 ` Florian Weimer
2022-05-23 15:42 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220522193642.3598646-1-maskray@google.com \
--to=maskray@google.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).