3 * Copyright is disclaimed as to the contents of this file.
5 * $FreeBSD: src/usr.bin/getconf/progenv.gperf,v 1.2 2003/08/22 17:32:07 markm Exp $
16 * Override gperf's built-in external scope.
18 static const struct map *in_word_set(const char *str);
21 * The Standard seems a bit ambiguous over whether the POSIX_V6_*
22 * are specified with or without a leading underscore, so we just
26 * The alt_path member gives the path containing another `getconf'
27 * executable which was compiled using the specified programming
28 * environment. If it is NULL, the current executable is good enough.
29 * If we ever support multiple environments, this table will need to
30 * be updated. (We cheat here and define the supported environments
33 #if defined(__alpha__) || defined(__sparc64__)
34 #define have_LP64_OFF64 NULL
37 #if defined(__i386__) || defined(__powerpc__)
38 #define have_ILP32_OFFBIG NULL
42 struct map { const char *name; const char *alt_path; int valid; };
44 POSIX_V6_ILP32_OFF32, notdef
45 POSIX_V6_ILP32_OFFBIG, have_ILP32_OFFBIG
46 POSIX_V6_LP64_OFF64, have_LP64_OFF64
47 POSIX_V6_LPBIG_OFFBIG, notdef
48 _POSIX_V6_ILP32_OFF32, notdef
49 _POSIX_V6_ILP32_OFFBIG, have_ILP32_OFFBIG
50 _POSIX_V6_LP64_OFF64, have_LP64_OFF64
51 _POSIX_V6_LPBIG_OFFBIG, notdef
54 find_progenv(const char *name, const char **alt_path)
58 rv = in_word_set(name);
61 *alt_path = rv->alt_path;