159632Swollman/*
259632Swollman * Copyright 2000 Massachusetts Institute of Technology
359632Swollman *
459632Swollman * Permission to use, copy, modify, and distribute this software and
559632Swollman * its documentation for any purpose and without fee is hereby
659632Swollman * granted, provided that both the above copyright notice and this
759632Swollman * permission notice appear in all copies, that both the above
859632Swollman * copyright notice and this permission notice appear in all
959632Swollman * supporting documentation, and that the name of M.I.T. not be used
1059632Swollman * in advertising or publicity pertaining to distribution of the
1159632Swollman * software without specific, written prior permission.  M.I.T. makes
1259632Swollman * no representations about the suitability of this software for any
1359632Swollman * purpose.  It is provided "as is" without express or implied
1459632Swollman * warranty.
1559632Swollman *
1659632Swollman * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''.  M.I.T. DISCLAIMS
1759632Swollman * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
1859632Swollman * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1959632Swollman * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
2059632Swollman * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2159632Swollman * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2259632Swollman * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
2359632Swollman * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2459632Swollman * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2559632Swollman * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
2659632Swollman * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2759632Swollman * SUCH DAMAGE.
2859632Swollman *
2959632Swollman * $FreeBSD$
3059632Swollman */
3159632Swollman
32106016Swollman#ifdef STABLE
33106016Swollmantypedef long long intmax_t;
34106016Swollman#define	PRIdMAX	"lld"
35106016Swollman#else
36106016Swollman#include <inttypes.h>
37106016Swollman#endif
3859632Swollman
39103591Swollmanint	find_confstr(const char *name, int *key);
40103591Swollmanint	find_limit(const char *name, intmax_t *value);
41103591Swollmanint	find_pathconf(const char *name, int *key);
42103591Swollmanint	find_progenv(const char *name, const char **alt_path);
43103591Swollmanint	find_sysconf(const char *name, int *key);
44