getconf.h revision 106016
1224133Sdim/* 2224133Sdim * Copyright 2000 Massachusetts Institute of Technology 3224133Sdim * 4224133Sdim * Permission to use, copy, modify, and distribute this software and 5224133Sdim * its documentation for any purpose and without fee is hereby 6224133Sdim * granted, provided that both the above copyright notice and this 7224133Sdim * permission notice appear in all copies, that both the above 8224133Sdim * copyright notice and this permission notice appear in all 9224133Sdim * supporting documentation, and that the name of M.I.T. not be used 10224133Sdim * in advertising or publicity pertaining to distribution of the 11224133Sdim * software without specific, written prior permission. M.I.T. makes 12224133Sdim * no representations about the suitability of this software for any 13224133Sdim * purpose. It is provided "as is" without express or implied 14224133Sdim * warranty. 15224133Sdim * 16224133Sdim * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS 17224133Sdim * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, 18224133Sdim * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19224133Sdim * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT 20224133Sdim * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21224133Sdim * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22224133Sdim * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 23224133Sdim * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24224133Sdim * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25224133Sdim * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 26224133Sdim * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27224133Sdim * SUCH DAMAGE. 28224133Sdim * 29234353Sdim * $FreeBSD: head/usr.bin/getconf/getconf.h 106016 2002-10-27 04:10:34Z wollman $ 30234353Sdim */ 31224133Sdim 32234353Sdim#ifdef STABLE 33234353Sdimtypedef long long intmax_t; 34234353Sdim#define strtoimax(p, ep, radix) (strtoll((p), (ep), (radix))) 35234353Sdim#define PRIdMAX "lld" 36234353Sdim#else 37234353Sdim#include <inttypes.h> 38234353Sdim#endif 39224133Sdim 40224133Sdimint find_confstr(const char *name, int *key); 41243830Sdimint find_limit(const char *name, intmax_t *value); 42224133Sdimint find_pathconf(const char *name, int *key); 43224133Sdimint find_progenv(const char *name, const char **alt_path); 44224133Sdimint find_sysconf(const char *name, int *key); 45234353Sdim