From ff340ae492915a1723450c148641b594326c5fd8 Mon Sep 17 00:00:00 2001 From: Mystery Man Date: Mon, 4 Apr 2005 19:00:13 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'V10_2_19mdk'. --- mdk-stage1/dietlibc/libdl/_dl_search.c | 111 --------------------------------- 1 file changed, 111 deletions(-) delete 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 deleted file mode 100644 index ccf9c51c5..000000000 --- a/mdk-stage1/dietlibc/libdl/_dl_search.c +++ /dev/null @@ -1,111 +0,0 @@ -#include -#include - -#include - -#include "_dl_int.h" - -#define WANT_LD_SO_CONF_SEARCH - -static const char *_dl_search_rpath=0; - -#ifndef __DIET_LD_SO__ -#include -#include -void _dl_set_rpath(const char *path) { _dl_search_rpath=path; } -const char* _dl_get_rpath() { return _dl_search_rpath; } -#endif - -/* 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,i=1,fl=strlen(filename),ml=len-fl; - const char*c,*pe=path+pathlen; - - if (path) { - for (c=path;cml) continue; /* if len(path-entry)+len(filename)+2 is greater than the buffer ? SKIP */ - memcpy(buf,c,i); - buf[i]='/'; - l-=++i; - } - memcpy(buf+i,filename,fl); - buf[i+fl]=0; -#ifdef DEBUG -// pf(__func__": "); pf(buf); pf("\n"); -#endif -#ifdef __DIET_LD_SO__ - if ((fd=_dl_sys_open(buf,O_RDONLY,0))>-1) return fd; -#else - if ((fd=open(buf,O_RDONLY))!=-1) return fd; -#endif - } - } - return -1; -} - -/* parse the SMALL file "conf" for lib directories (aem... hang me if you can :) ) */ -static int _dl_search_conf(char*buf,int len,const char*conf,const char*filename) { - char ld_so_conf[1024]; - int i,l,fd; -#ifdef __DIET_LD_SO__ - if ((fd=_dl_sys_open(conf,O_RDONLY,0))>-1) { - l=_dl_sys_read(fd,ld_so_conf,sizeof(ld_so_conf)-1); -#else - if ((fd=open(conf,O_RDONLY))!=-1) { - l=read(fd,ld_so_conf,sizeof(ld_so_conf)-1); -#endif - ld_so_conf[sizeof(ld_so_conf)-1]=0; -#ifdef __DIET_LD_SO__ - _dl_sys_close(fd); -#else - close(fd); -#endif - if (l>0) { - if (ld_so_conf[l-1]=='\n') ld_so_conf[--l]=0; - for (i=0;i