/*
*/
/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996,1999 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#if !defined(LINT) && !defined(CODECENTER)
#endif
#include "port_before.h"
#ifndef __BIND_NOSTATIC
#include <resolv.h>
#include <stdio.h>
#include <string.h>
#include <isc/memcluster.h>
#ifdef DO_PTHREADS
#include <pthread.h>
#endif
#include <irs.h>
#include <stdlib.h>
#include "port_after.h"
#include "irs_data.h"
extern int h_errno;
#endif
extern struct __res_state _res;
#ifdef DO_PTHREADS
static int once = 0;
#else
#endif
void
irs_destroy(void) {
#ifndef DO_PTHREADS
#endif
}
void
net_data_destroy(void *p) {
}
}
}
}
}
}
}
}
}
}
/*%
* applications that need a specific config file other than
* _PATH_IRS_CONF should call net_data_init directly rather than letting
* the various wrapper functions make the first call. - brister
*/
struct net_data *
#ifdef DO_PTHREADS
#ifndef LIBBIND_MUTEX_INITIALIZER
#endif
if (!once) {
if (pthread_mutex_lock(&keylock) != 0)
return (NULL);
if (!once) {
(void)pthread_mutex_unlock(&keylock);
return (NULL);
}
once = 1;
}
if (pthread_mutex_unlock(&keylock) != 0)
return (NULL);
}
#endif
return (NULL);
#ifdef DO_PTHREADS
return (NULL);
}
#endif
}
return (net_data);
}
struct net_data *
return (NULL);
return (NULL);
}
#ifndef DO_PTHREADS
#endif
return (NULL);
}
return (NULL);
}
return (net_data);
}
void
}
#ifdef _REENTRANT
struct __res_state *
__res_state(void) {
/* NULL param here means use the default config file. */
return (&_res);
}
#else
#ifdef __linux
struct __res_state *
__res_state(void) {
return (&_res);
}
#endif
#endif
int *
__h_errno(void) {
/* NULL param here means use the default config file. */
#ifdef ORIGINAL_ISC_CODE
return(&_res.res_h_errno);
#else
return (&h_errno);
#endif
#else
return (&h_errno);
#endif /* ORIGINAL_ISC_CODE */
}
void
#else
#endif
}
#endif /*__BIND_NOSTATIC*/
/*! \file */