dllplug.c revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1997-2012 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* Glenn Fowler
* AT&T Research
*/
#include "dlllib.h"
/*
* at least one dlopen() is called to initialize dlerror()
* if path!=0 then library path up to size chars copied to path with trailing 0
* if name contains a directory prefix then library search is limited to the dir and siblings
*/
extern void*
dllplugin(const char* lib, const char* name, const char* ver, unsigned long rel, unsigned long* cur, int flags, char* path, size_t size)
{
void* dll;
int err;
int hit;
for (;;)
{
{
{
hit = 1;
#if 0
#endif
{
{
dll = 0;
continue;
}
break;
}
else
{
#if 0
/*
* dlopen() should load implicit libraries
* this code does that
* but it doesn't help on galadriel
*/
char* s;
char* e;
{
*e = 0;
*e = ':';
if (dll)
{
goto again;
}
}
#endif
}
}
}
if (hit)
{
if (!dll)
return dll;
}
if (!lib)
break;
lib = 0;
}
{
{
dll = 0;
}
}
return dll;
}
extern void*
{
}