#define NULL ((void *) 0)
#endif
-#ifndef IS_IN_libdl
+#ifdef IS_IN_rtld
static __always_inline size_t _dl_strlen(const char *str)
{
register const char *ptr = (char *) str-1;
;/* empty */
return ptr == path ? ptr : ptr+1;
}
-#else /* IS_IN_libdl */
+#else /* IS_IN_rtld */
+# include <string.h>
# define _dl_strlen strlen
# define _dl_strcat strcat
# define _dl_strcpy strcpy
# define _dl_memcpy memcpy
# define _dl_memcmp memcmp
# define _dl_memset memset
-#endif /* IS_IN_libdl */
+#endif /* IS_IN_rtld */
+#if defined IS_IN_rtld || defined __SUPPORT_LD_DEBUG__
/* Early on, we can't call printf, so use this to print out
* numbers using the SEND_STDERR() macro. Avoid using mod
* or using long division */
} while (i > 0);
return p;
}
+#endif
+#ifdef IS_IN_rtld
static __always_inline char * _dl_simple_ltoahex(char *local, unsigned long i)
{
/* 16 digits plus a leading "0x" plus a null terminator,
return p;
}
-
-
-
/* The following macros may be used in dl-startup.c to debug
* ldso before ldso has fixed itself up to make function calls */
# define SEND_ADDRESS_STDERR_DEBUG(X, add_a_newline)
#endif
+#endif /* IS_IN_rtld */
+
#endif