]> sourceware.org Git - glibc.git/commitdiff
dlfcn: Move RTLD_DEFAULT/RTLD_NEXT outside __USE_GNU
authorFangrui Song <maskray@google.com>
Mon, 23 May 2022 17:23:23 +0000 (10:23 -0700)
committerFangrui Song <maskray@google.com>
Mon, 23 May 2022 17:23:23 +0000 (10:23 -0700)
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>
dlfcn/dlfcn.h

index a3af6051d407d8f2960f7fe5e942d8a89e6818dc..6f7cad868214a71d83fb738254b88bfd85d7e627 100644 (file)
 #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
 
This page took 2.101803 seconds and 5 git commands to generate.