progenv.gperf (814aaaa7da4dab462d90e12e7b48b75f2093ccfd) | progenv.gperf (b4b4b5304bd22eab265c9c049cb7fc6b55c4ef3f) |
---|---|
1%{ 2/* 3 * Copyright is disclaimed as to the contents of this file. 4 * 5 * $FreeBSD$ 6 */ 7 8#include <sys/types.h> --- 16 unchanged lines hidden (view full) --- 25/* 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 31 * statically.) 32 */ | 1%{ 2/* 3 * Copyright is disclaimed as to the contents of this file. 4 * 5 * $FreeBSD$ 6 */ 7 8#include <sys/types.h> --- 16 unchanged lines hidden (view full) --- 25/* 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 31 * statically.) 32 */ |
33#if defined(__alpha__) || defined(__sparc64__) | 33#if defined(__sparc64__) || defined(__amd64__) |
34#define have_LP64_OFF64 NULL | 34#define have_LP64_OFF64 NULL |
35#elif defined(__APPLE__) 36#define have_LP64_OFF64 NULL 37#define have_LPBIG_OFFBIG NULL | |
38#endif 39 | 35#endif 36 |
40#if defined(__i386__) || defined(__powerpc__) || defined(__x86_64__) | 37#if defined(__i386__) || defined(__powerpc__) |
41#define have_ILP32_OFFBIG NULL 42#endif 43 44%} 45struct map { const char *name; const char *alt_path; int valid; }; 46%% 47POSIX_V6_ILP32_OFF32, notdef 48POSIX_V6_ILP32_OFFBIG, have_ILP32_OFFBIG 49POSIX_V6_LP64_OFF64, have_LP64_OFF64 | 38#define have_ILP32_OFFBIG NULL 39#endif 40 41%} 42struct map { const char *name; const char *alt_path; int valid; }; 43%% 44POSIX_V6_ILP32_OFF32, notdef 45POSIX_V6_ILP32_OFFBIG, have_ILP32_OFFBIG 46POSIX_V6_LP64_OFF64, have_LP64_OFF64 |
50POSIX_V6_LPBIG_OFFBIG, have_LPBIG_OFFBIG | 47POSIX_V6_LPBIG_OFFBIG, notdef |
51_POSIX_V6_ILP32_OFF32, notdef 52_POSIX_V6_ILP32_OFFBIG, have_ILP32_OFFBIG 53_POSIX_V6_LP64_OFF64, have_LP64_OFF64 | 48_POSIX_V6_ILP32_OFF32, notdef 49_POSIX_V6_ILP32_OFFBIG, have_ILP32_OFFBIG 50_POSIX_V6_LP64_OFF64, have_LP64_OFF64 |
54_POSIX_V6_LPBIG_OFFBIG, have_LPBIG_OFFBIG | 51_POSIX_V6_LPBIG_OFFBIG, notdef |
55%% 56int 57find_progenv(const char *name, const char **alt_path) 58{ 59 const struct map *rv; 60 61 rv = in_word_set(name); 62 if (rv != NULL) { 63 if (rv->valid) { 64 *alt_path = rv->alt_path; 65 return 1; 66 } 67 return -1; 68 } 69 return 0; 70} | 52%% 53int 54find_progenv(const char *name, const char **alt_path) 55{ 56 const struct map *rv; 57 58 rv = in_word_set(name); 59 if (rv != NULL) { 60 if (rv->valid) { 61 *alt_path = rv->alt_path; 62 return 1; 63 } 64 return -1; 65 } 66 return 0; 67} |