2N/A/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2N/A/*
2N/A * Copyright (C) 2004 by the Massachusetts Institute of Technology,
2N/A * Cambridge, MA, USA. All Rights Reserved.
2N/A *
2N/A * This software is being provided to you, the LICENSEE, by the
2N/A * Massachusetts Institute of Technology (M.I.T.) under the following
2N/A * license. By obtaining, using and/or copying this software, you agree
2N/A * that you have read, understood, and will comply with these terms and
2N/A * conditions:
2N/A *
2N/A * Export of this software from the United States of America may
2N/A * require a specific license from the United States Government.
2N/A * It is the responsibility of any person or organization contemplating
2N/A * export to obtain such a license before exporting.
2N/A *
2N/A * WITHIN THAT CONSTRAINT, permission to use, copy, modify and distribute
2N/A * this software and its documentation for any purpose and without fee or
2N/A * royalty is hereby granted, provided that you agree to comply with the
2N/A * following copyright notice and statements, including the disclaimer, and
2N/A * that the same appear on ALL copies of the software and documentation,
2N/A * including modifications that you make for internal use or for
2N/A * distribution:
2N/A *
2N/A * THIS SOFTWARE IS PROVIDED "AS IS", AND M.I.T. MAKES NO REPRESENTATIONS
2N/A * OR WARRANTIES, EXPRESS OR IMPLIED. By way of example, but not
2N/A * limitation, M.I.T. MAKES NO REPRESENTATIONS OR WARRANTIES OF
2N/A * MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF
2N/A * THE LICENSED SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY
2N/A * PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
2N/A *
2N/A * The name of the Massachusetts Institute of Technology or M.I.T. may NOT
2N/A * be used in advertising or publicity pertaining to distribution of the
2N/A * software. Title to copyright in this software and any associated
2N/A * documentation shall at all times remain with M.I.T., and USER agrees to
2N/A * preserve same.
2N/A *
2N/A * Furthermore if you modify this software you must label
2N/A * your software as modified software and not distribute it in such a
2N/A * fashion that it might be confused with the original M.I.T. software.
2N/A */
2N/A
2N/A/* Stuff that needs initialization for fake-addrinfo.c.
2N/A
2N/A Separated out, so that static linking against this library doesn't
2N/A require pulling in socket/nsl/whatever libraries for code not using
2N/A getaddrinfo. */
2N/A
2N/A#include "port-sockets.h"
2N/A#include "socket-utils.h"
2N/A#include "k5-platform.h"
2N/A#include "k5-thread.h"
2N/A
2N/A#include <stdio.h>
2N/A#include <errno.h>
2N/A
2N/A#define IMPLEMENT_FAKE_GETADDRINFO
2N/A#include "fake-addrinfo.h"
2N/A#include "cache-addrinfo.h"
2N/A
2N/Astruct fac krb5int_fac = { K5_MUTEX_PARTIAL_INITIALIZER, 0 };
2N/A
2N/Aint krb5int_init_fac (void)
2N/A{
2N/A return k5_mutex_finish_init(&krb5int_fac.lock);
2N/A}
2N/A
2N/Avoid krb5int_fini_fac (void)
2N/A{
2N/A k5_mutex_destroy(&krb5int_fac.lock);
2N/A}