#ifndef lint
#endif
/*
* Copyright (c) 2001 Japan Network Information Center. All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved."
*
* 4. The name of JPNIC may not be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*/
#include <config.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
#include <errno.h>
#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#endif
#include <idn/logmacro.h>
#include "stub.h"
#ifndef RTLD_NEXT
typedef struct {
const char *name;
void *handle;
} shared_obj_t;
#ifdef SOPATH_LIBC
{ SOPATH_LIBC },
#endif
#ifdef SOPATH_LIBNSL
{ SOPATH_LIBNSL },
#endif
{ NULL },
};
#endif
static void *get_func_addr(const char *name);
#ifndef RTLD_NEXT
static void *
#ifdef HAVE_DLOPEN
#endif
FATAL(("stub: no way to load shared object file\n"));
return (NULL);
}
#endif
static void *
void *addr;
/* Prepend underscore. */
namebuf[0] = '_';
if (need_leading_underscore < 0) {
/* First try without one. */
return (addr);
}
/* Then try with one. */
return (addr);
}
} else if (need_leading_underscore) {
} else {
}
return (NULL);
}
static void *
#ifdef HAVE_DLSYM
#endif
/* logging */
FATAL(("stub: no way to get symbol address\n"));
return (NULL);
}
static void *
#ifdef RTLD_NEXT
return (addr);
}
#else
int i;
}
TRACE(("stub: %s found in %s\n",
return (addr);
}
}
}
#endif
return (NULL);
}
#ifdef HAVE_GETHOSTBYNAME
struct hostent *
return (NULL);
}
#endif
#ifdef HAVE_GETHOSTBYNAME2
struct hostent *
return (NULL);
}
#endif
#ifdef HAVE_GETHOSTBYADDR
struct hostent *
return (NULL);
}
#endif
#ifdef GETHOST_R_GLIBC_FLAVOR
#ifdef HAVE_GETHOSTBYNAME_R
int
{
return (ENOENT); /* ??? */
}
#endif
#ifdef HAVE_GETHOSTBYNAME2_R
int
{
return (ENOENT); /* ??? */
}
#endif
#ifdef HAVE_GETHOSTBYADDR_R
int
{
return (ENOENT); /* ??? */
}
#endif
#else /* GETHOST_R_GLIBC_FLAVOR */
#ifdef HAVE_GETHOSTBYNAME_R
struct hostent *
{
return (NULL);
}
#endif
#ifdef HAVE_GETHOSTBYADDR_R
struct hostent *
{
return (NULL);
}
#endif
#endif /* GETHOST_R_GLIBC_FLAVOR */
#ifdef HAVE_GETIPNODEBYNAME
struct hostent *
int *errp);
return (NULL);
}
#endif
#ifdef HAVE_GETIPNODEBYADDR
struct hostent *
int *errp);
return (NULL);
}
#endif
#ifdef HAVE_FREEHOSTENT
void
}
#endif
#ifdef HAVE_GETADDRINFO
int
{
return (EAI_FAIL);
}
#endif
#ifdef HAVE_FREEADDRINFO
void
}
#endif
#ifdef HAVE_GETNAMEINFO
int
return (EAI_FAIL);
}
#endif