/*
* Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998, 1999, 2001, 2003 Internet Software Consortium.
*
* 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.
*/
#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 <stdlib.h>
#include <port_after.h>
#ifdef NGR_R_RETURN
#ifndef NGR_R_PRIVATE
#define NGR_R_PRIVATE 0
#endif
static NGR_R_RETURN
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);
}
#if NGR_R_PRIVATE == 2
struct private {
char *buf;
};
#endif
#ifdef NGR_R_SET_ARGS
#else
#endif
{
#if NGR_R_PRIVATE == 2
struct private *p;
#endif
char *tmp;
#if defined(NGR_R_SET_ARGS) && NGR_R_PRIVATE == 0
#endif
#if NGR_R_PRIVATE == 1
if (p == NULL)
#ifdef NGR_R_SET_RESULT
return (NGR_R_BAD);
#else
return;
#endif
#endif
#ifdef NGR_R_SET_RESULT
return (NGR_R_SET_RESULT);
#endif
}
#ifdef NGR_R_END_ARGS
#else
endnetgrent_r(void)
#endif
{
#if NGR_R_PRIVATE == 2
#endif
#if defined(NGR_R_SET_ARGS) && NGR_R_PRIVATE == 0
#endif
endnetgrent();
#if NGR_R_PRIVATE == 1
free(p);
#endif
}
/* Private */
static int
const char *dp, NGR_R_COPY_ARGS)
{
#if NGR_R_PRIVATE == 2
#endif
char *cp;
int n;
int len;
/* Find out the amount of space required to store the answer. */
len = 0;
#if NGR_R_PRIVATE == 1
return(NGR_R_BAD);
if (p->buf)
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) */
/*! \file */