Path: blob/main/crypto/krb5/src/util/support/init-addrinfo.c
34889 views
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */1/*2* Copyright (C) 2004 by the Massachusetts Institute of Technology,3* Cambridge, MA, USA. All Rights Reserved.4*5* This software is being provided to you, the LICENSEE, by the6* Massachusetts Institute of Technology (M.I.T.) under the following7* license. By obtaining, using and/or copying this software, you agree8* that you have read, understood, and will comply with these terms and9* conditions:10*11* Export of this software from the United States of America may12* require a specific license from the United States Government.13* It is the responsibility of any person or organization contemplating14* export to obtain such a license before exporting.15*16* WITHIN THAT CONSTRAINT, permission to use, copy, modify and distribute17* this software and its documentation for any purpose and without fee or18* royalty is hereby granted, provided that you agree to comply with the19* following copyright notice and statements, including the disclaimer, and20* that the same appear on ALL copies of the software and documentation,21* including modifications that you make for internal use or for22* distribution:23*24* THIS SOFTWARE IS PROVIDED "AS IS", AND M.I.T. MAKES NO REPRESENTATIONS25* OR WARRANTIES, EXPRESS OR IMPLIED. By way of example, but not26* limitation, M.I.T. MAKES NO REPRESENTATIONS OR WARRANTIES OF27* MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF28* THE LICENSED SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY29* PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.30*31* The name of the Massachusetts Institute of Technology or M.I.T. may NOT32* be used in advertising or publicity pertaining to distribution of the33* software. Title to copyright in this software and any associated34* documentation shall at all times remain with M.I.T., and USER agrees to35* preserve same.36*37* Furthermore if you modify this software you must label38* your software as modified software and not distribute it in such a39* fashion that it might be confused with the original M.I.T. software.40*/4142/* Stuff that needs initialization for fake-addrinfo.c.4344Separated out, so that static linking against this library doesn't45require pulling in socket/nsl/whatever libraries for code not using46getaddrinfo. */4748#include "k5-platform.h"49#include "k5-thread.h"50#include "port-sockets.h"51#include "socket-utils.h"5253#define IMPLEMENT_FAKE_GETADDRINFO54#include "fake-addrinfo.h"55#include "cache-addrinfo.h"5657struct fac krb5int_fac = { K5_MUTEX_PARTIAL_INITIALIZER, 0 };5859int krb5int_init_fac (void)60{61return k5_mutex_finish_init(&krb5int_fac.lock);62}6364void krb5int_fini_fac (void)65{66k5_mutex_destroy(&krb5int_fac.lock);67}686970