public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Fangrui Song <maskray@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] dlfcn: Move RTLD_DEFAULT/RTLD_NEXT outside __USE_GNU
Date: Mon, 23 May 2022 17:23:25 +0000 (GMT)	[thread overview]
Message-ID: <20220523172325.30701383A601@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=748df8126ac69e68e0b94e236ea3c2e11b1176cb

commit 748df8126ac69e68e0b94e236ea3c2e11b1176cb
Author: Fangrui Song <maskray@google.com>
Date:   Mon May 23 10:23:23 2022 -0700

    dlfcn: Move RTLD_DEFAULT/RTLD_NEXT outside __USE_GNU
    
    POSIX reserves the RTLD_ namespace, and this is already reflected in our
    conform tests.
    Note: RTLD_DEFAULT and RTLD_NEXT appear in IEEE Std 1003.1-2004.  Many
    systems (e.g. FreeBSD, musl) just define the macros unconditionally.
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    Tested-by: Florian Weimer <fweimer@redhat.com>

Diff:
---
 dlfcn/dlfcn.h | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/dlfcn/dlfcn.h b/dlfcn/dlfcn.h
index a3af6051d4..6f7cad8682 100644
--- a/dlfcn/dlfcn.h
+++ b/dlfcn/dlfcn.h
@@ -30,18 +30,6 @@
 #ifdef __USE_GNU
 #include <bits/dl_find_object.h>
 
-/* 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
-   the shared objects were loaded.  */
-# define RTLD_NEXT	((void *) -1l)
-
-/* If the first argument to `dlsym' or `dlvsym' is set to RTLD_DEFAULT
-   the run-time address of the symbol called NAME in the global scope
-   is returned.  */
-# define RTLD_DEFAULT	((void *) 0)
-
-
 /* Type for namespace indices.  */
 typedef long int Lmid_t;
 
@@ -50,6 +38,16 @@ typedef long int Lmid_t;
 # 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
+   the shared objects were loaded.  */
+#define RTLD_NEXT	((void *) -1l)
+
+/* If the first argument to `dlsym' or `dlvsym' is set to RTLD_DEFAULT
+   the run-time address of the symbol called NAME in the global scope
+   is returned.  */
+#define RTLD_DEFAULT	((void *) 0)
 
 __BEGIN_DECLS


                 reply	other threads:[~2022-05-23 17:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220523172325.30701383A601@sourceware.org \
    --to=maskray@sourceware.org \
    --cc=glibc-cvs@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).