getnetgrent_r.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 1998-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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM 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.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
static const char rcsid[] = "$Id: getnetgrent_r.c,v 8.7 2003/04/29 05:51:14 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <port_before.h>
#if !defined(_REENTRANT) || !defined(DO_PTHREADS)
static int getnetgrent_r_not_required = 0;
#else
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <netdb.h>
#include <netgroup.h>
#include <stdlib.h>
#include <port_after.h>
#ifdef NGR_R_RETURN
static NGR_R_RETURN
copy_protoent(char **, char **, char **, const char *, const char *,
const char *, NGR_R_COPY_ARGS);
const char *domain) {
}
/*
* These assume a single context is in operation per thread.
* If this is not the case we will need to call irs directly
* rather than through the base functions.
*/
if (res != 1)
return (res);
}
#ifdef NGR_R_ENT_ARGS
#else
setnetgrent_r(const char *netgroup)
#endif
{
#ifdef NGR_R_PRIVATE
#endif
#ifdef NGR_R_SET_RESULT
return (NGR_R_SET_RESULT);
#endif
}
#ifdef NGR_R_ENT_ARGS
#else
endnetgrent_r(void)
#endif
{
endnetgrent();
#ifdef NGR_R_PRIVATE
#endif
}
/* Private */
static int
char *cp;
int n;
int len;
/* Find out the amount of space required to store the answer. */
len = 0;
#ifdef NGR_R_PRIVATE
return(NGR_R_BAD);
#else
return (NGR_R_BAD);
}
#endif
cp += n;
} else
cp += n;
} else
cp += n;
} else
return (NGR_R_OK);
}
#else /* NGR_R_RETURN */
static int getnetgrent_r_unknown_system = 0;
#endif /* NGR_R_RETURN */
#endif /* !defined(_REENTRANT) || !defined(DO_PTHREADS) */