3 * Copyright is disclaimed as to the contents of this file.
5 * $FreeBSD: src/usr.bin/getconf/pathconf.gperf,v 1.4 2003/08/22 17:32:07 markm Exp $
12 #ifdef APPLE_GETCONF_UNDERSCORE
14 #endif /* APPLE_GETCONF_UNDERSCORE */
19 * Override gperf's built-in external scope.
21 static const struct map *in_word_set(const char *str);
24 struct map { const char *name; int key; int valid; };
26 FILESIZEBITS, _PC_FILESIZEBITS
27 LINK_MAX, _PC_LINK_MAX
28 MAX_CANON, _PC_MAX_CANON
29 MAX_INPUT, _PC_MAX_INPUT
30 NAME_MAX, _PC_NAME_MAX
31 PATH_MAX, _PC_PATH_MAX
32 PIPE_BUF, _PC_PIPE_BUF
33 POSIX_ALLOC_SIZE_MIN, _PC_ALLOC_SIZE_MIN
34 POSIX_REC_INCR_XFER_SIZE, _PC_REC_INCR_XFER_SIZE
35 POSIX_REC_MAX_XFER_SIZE, _PC_REC_MAX_XFER_SIZE
36 POSIX_REC_MIN_XFER_SIZE, _PC_REC_MIN_XFER_SIZE
37 POSIX_REC_XFER_ALIGN, _PC_REC_XFER_ALIGN
38 SYMLINK_MAX, _PC_SYMLINK_MAX
39 TRUSTEDBSD_ACL_EXTENDED, _PC_ACL_EXTENDED
40 TRUSTEDBSD_ACL_PATH_MAX, _PC_ACL_PATH_MAX
41 TRUSTEDBSD_CAP_PRESENT, _PC_CAP_PRESENT
42 TRUSTEDBSD_INF_PRESENT, _PC_INF_PRESENT
43 TRUSTEDBSD_MAC_PRESENT, _PC_MAC_PRESENT
44 _POSIX_ASYNC_IO, _PC_ASYNC_IO
45 _POSIX_CHOWN_RESTRICTED, _PC_CHOWN_RESTRICTED
46 _POSIX_NO_TRUNC, _PC_NO_TRUNC
47 _POSIX_PATH_MAX, _PC_PATH_MAX
48 _POSIX_PRIO_IO, _PC_PRIO_IO
49 _POSIX_SYNC_IO, _PC_SYNC_IO
50 _POSIX_VDISABLE, _PC_VDISABLE
53 find_pathconf(const char *name, int *key)
56 #ifdef APPLE_GETCONF_UNDERSCORE
58 #endif /* APPLE_GETCONF_UNDERSCORE */
60 rv = in_word_set(name);
68 #ifdef APPLE_GETCONF_UNDERSCORE
72 if((alt = (char *)alloca(strlen(name) + 2)) == NULL)
75 strcpy(alt + 1, name);
77 rv = in_word_set(alt);
85 #endif /* APPLE_GETCONF_UNDERSCORE */