2000-04-26 02:36:54 +00:00
|
|
|
%{
|
|
|
|
/*
|
|
|
|
* Copyright is disclaimed as to the contents of this file.
|
|
|
|
*
|
|
|
|
* $FreeBSD$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
#include "getconf.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Override gperf's built-in external scope.
|
|
|
|
*/
|
|
|
|
static const struct map *in_word_set(const char *str, unsigned int len);
|
|
|
|
|
|
|
|
%}
|
2002-09-04 23:29:10 +00:00
|
|
|
struct map { const char *name; int key; };
|
2000-04-26 02:36:54 +00:00
|
|
|
%%
|
|
|
|
PATH, _CS_PATH
|
2002-07-15 22:51:24 +00:00
|
|
|
POSIX_V6_ILP32_OFF32_CFLAGS, _CS_POSIX_V6_ILP32_OFF32_CFLAGS
|
|
|
|
POSIX_V6_ILP32_OFF32_LDFLAGS, _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
|
|
|
|
POSIX_V6_ILP32_OFF32_LIBS, _CS_POSIX_V6_ILP32_OFF32_LIBS
|
|
|
|
POSIX_V6_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
|
|
|
|
POSIX_V6_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
|
|
|
|
POSIX_V6_ILP32_OFFBIG_LIBS, _CS_POSIX_V6_ILP32_OFFBIG_LIBS
|
|
|
|
POSIX_V6_LP64_OFF64_CFLAGS, _CS_POSIX_V6_LP64_OFF64_CFLAGS
|
|
|
|
POSIX_V6_LP64_OFF64_LDFLAGS, _CS_POSIX_V6_LP64_OFF64_LDFLAGS
|
|
|
|
POSIX_V6_LP64_OFF64_LIBS, _CS_POSIX_V6_LP64_OFF64_LIBS
|
|
|
|
POSIX_V6_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
|
|
|
|
POSIX_V6_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
|
|
|
|
POSIX_V6_LPBIG_OFFBIG_LIBS, _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
|
|
|
|
POSIX_V6_WIDTH_RESTRICTED_ENVS, _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS
|
2000-04-26 02:36:54 +00:00
|
|
|
%%
|
|
|
|
int
|
|
|
|
find_confstr(const char *name)
|
|
|
|
{
|
|
|
|
const struct map *rv;
|
|
|
|
|
|
|
|
rv = in_word_set(name, strlen(name));
|
|
|
|
if (rv != 0)
|
|
|
|
return rv->key;
|
|
|
|
else
|
|
|
|
return -1;
|
|
|
|
}
|