From 9097327dc1c667fc51b8e05cc7c0626fac96665d Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Mon, 14 May 2001 14:17:54 +0000 Subject: Initial revision --- mdk-stage1/dietlibc/libdl/_dl_search.c | 84 ++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 mdk-stage1/dietlibc/libdl/_dl_search.c (limited to 'mdk-stage1/dietlibc/libdl/_dl_search.c') diff --git a/mdk-stage1/dietlibc/libdl/_dl_search.c b/mdk-stage1/dietlibc/libdl/_dl_search.c new file mode 100644 index 000000000..5e3217d46 --- /dev/null +++ b/mdk-stage1/dietlibc/libdl/_dl_search.c @@ -0,0 +1,84 @@ +#include +#include +#include +#include + +#include +#include + +#define WANT_LD_SO_CONF_SEARCH + +static const char *_dl_search_rpath=0; +void _dl_set_rpath(const char *path) { _dl_search_rpath=path; } + +/* search a colon (semicolon) seperated path for the libraray "filename" */ +static int _dl_search_path(char *buf, int len, const char*path, const int pathlen, const char *filename) +{ + int fd,l=len,i=1; + const char *c,*pe=path+pathlen; + + if (path) { + for (c=path; c