mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-25 01:55:19 +01:00
b3e7694832
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
42 lines
660 B
Plaintext
42 lines
660 B
Plaintext
%{
|
|
/*
|
|
* Copyright is disclaimed as to the contents of this file.
|
|
*/
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <string.h>
|
|
#include <limits.h>
|
|
|
|
#include "getconf.h"
|
|
|
|
/*
|
|
* Override gperf's built-in external scope.
|
|
*/
|
|
static const struct map *in_word_set(const char *str);
|
|
|
|
%}
|
|
struct map { const char *name; uintmax_t value; int valid; };
|
|
%%
|
|
UCHAR_MAX, UCHAR_MAX
|
|
UINT_MAX, UINT_MAX
|
|
ULLONG_MAX, ULLONG_MAX
|
|
ULONG_MAX, ULONG_MAX
|
|
USHRT_MAX, USHRT_MAX
|
|
%%
|
|
int
|
|
find_unsigned_limit(const char *name, uintmax_t *value)
|
|
{
|
|
const struct map *rv;
|
|
|
|
rv = in_word_set(name);
|
|
if (rv != NULL) {
|
|
if (rv->valid) {
|
|
*value = rv->value;
|
|
return 1;
|
|
}
|
|
return -1;
|
|
}
|
|
return 0;
|
|
}
|