OSDN Git Service

ldso: simplify interp path search logic
[uclinux-h8/uClibc.git] / ldso / include / ldso.h
index 9aa610e..6f3b728 100644 (file)
@@ -28,6 +28,7 @@
 #include <stdlib.h>
 #include <stdarg.h>
 #include <stddef.h> /* for ptrdiff_t */
+#include <stdbool.h>
 #define _FCNTL_H
 #include <bits/fcntl.h>
 #include <bits/wordsize.h>
@@ -35,6 +36,8 @@
 #include <sys/types.h>
 /* Pull in the arch specific page size */
 #include <bits/uClibc_page.h>
+/* Pull in the MIN macro */
+#include <sys/param.h>
 /* Pull in the ldso syscalls and string functions */
 #ifndef __ARCH_HAS_NO_SHARED__
 #include <dl-syscall.h>
@@ -70,7 +73,9 @@ struct init_fini_list {
 /* Global variables used within the shared library loader */
 extern char *_dl_library_path;         /* Where we look for libraries */
 extern char *_dl_preload;              /* Things to be loaded before the libs */
-extern char *_dl_ldsopath;             /* Where the shared lib loader was found */
+#ifdef __LDSO_SEARCH_INTERP_PATH__
+extern const char *_dl_ldsopath;       /* Where the shared lib loader was found */
+#endif
 extern const char *_dl_progname;       /* The name of the executable being run */
 extern size_t _dl_pagesize;            /* Store the page size for use later */
 #ifdef __LDSO_PRELINK_SUPPORT__
@@ -99,7 +104,7 @@ extern char *_dl_debug_nofixups;
 extern char *_dl_debug_bindings;
 extern int   _dl_debug_file;
 # define __dl_debug_dprint(fmt, args...) \
-       _dl_dprintf(_dl_debug_file, "%s:%i: " fmt, __FUNCTION__, __LINE__, ## args);
+       _dl_dprintf(_dl_debug_file, "%s:%i: " fmt, __func__, __LINE__, ## args);
 # define _dl_if_debug_dprint(fmt, args...) \
        do { if (_dl_debug) __dl_debug_dprint(fmt, ## args); } while (0)
 #else