Delete src/tools/tools/tcl_bmake. We don't have tcl in the source so the
[dragonfly.git] / usr.bin / getconf / confstr.gperf
blob72f0d2bdf087ed547ab258eedb130a1c3fcee69a
1 %{
2 /*
3  * Copyright is disclaimed as to the contents of this file.
4  *
5  * $FreeBSD: src/usr.bin/getconf/confstr.gperf,v 1.4.2.1 2002/10/27 04:18:40 wollman Exp $
6  * $DragonFly: src/usr.bin/getconf/confstr.gperf,v 1.2 2003/06/17 04:29:27 dillon Exp $
7  */
9 #include <sys/types.h>
11 #include <string.h>
12 #include <unistd.h>
14 #include "getconf.h"
17  * Override gperf's built-in external scope.
18  */
19 static const struct map *in_word_set(const char *str, unsigned int len);
22  * The Standard seems a bit ambiguous over whether the POSIX_V6_*
23  * are specified with or without a leading underscore, so we just
24  * use both.
25  */
27 struct map { const char *name; int key; int valid; };
29 PATH, _CS_PATH
30 POSIX_V6_ILP32_OFF32_CFLAGS, _CS_POSIX_V6_ILP32_OFF32_CFLAGS
31 POSIX_V6_ILP32_OFF32_LDFLAGS, _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
32 POSIX_V6_ILP32_OFF32_LIBS, _CS_POSIX_V6_ILP32_OFF32_LIBS
33 POSIX_V6_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
34 POSIX_V6_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
35 POSIX_V6_ILP32_OFFBIG_LIBS, _CS_POSIX_V6_ILP32_OFFBIG_LIBS
36 POSIX_V6_LP64_OFF64_CFLAGS, _CS_POSIX_V6_LP64_OFF64_CFLAGS
37 POSIX_V6_LP64_OFF64_LDFLAGS, _CS_POSIX_V6_LP64_OFF64_LDFLAGS
38 POSIX_V6_LP64_OFF64_LIBS, _CS_POSIX_V6_LP64_OFF64_LIBS
39 POSIX_V6_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
40 POSIX_V6_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
41 POSIX_V6_LPBIG_OFFBIG_LIBS, _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
42 POSIX_V6_WIDTH_RESTRICTED_ENVS, _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS
43 _POSIX_V6_ILP32_OFF32_CFLAGS, _CS_POSIX_V6_ILP32_OFF32_CFLAGS
44 _POSIX_V6_ILP32_OFF32_LDFLAGS, _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
45 _POSIX_V6_ILP32_OFF32_LIBS, _CS_POSIX_V6_ILP32_OFF32_LIBS
46 _POSIX_V6_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
47 _POSIX_V6_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
48 _POSIX_V6_ILP32_OFFBIG_LIBS, _CS_POSIX_V6_ILP32_OFFBIG_LIBS
49 _POSIX_V6_LP64_OFF64_CFLAGS, _CS_POSIX_V6_LP64_OFF64_CFLAGS
50 _POSIX_V6_LP64_OFF64_LDFLAGS, _CS_POSIX_V6_LP64_OFF64_LDFLAGS
51 _POSIX_V6_LP64_OFF64_LIBS, _CS_POSIX_V6_LP64_OFF64_LIBS
52 _POSIX_V6_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
53 _POSIX_V6_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
54 _POSIX_V6_LPBIG_OFFBIG_LIBS, _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
55 _POSIX_V6_WIDTH_RESTRICTED_ENVS, _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS
57 int
58 find_confstr(const char *name, int *key)
60         const struct map *rv;
62         rv = in_word_set(name, strlen(name));
63         if (rv != NULL) {
64                 if (rv->valid) {
65                         *key = rv->key;
66                         return 1;
67                 }
68                 return -1;
69         }
70         return 0;