Avoid our boolean parameter clashing with stdbool.h

We have now seen a second case after
184736fa, and a simple internal rename
from bool to boolean does the job.

Should have no user-visible impact.
parent 4eaa0275
......@@ -40,10 +40,6 @@
#define VSM_CLASS_PARAM "Params"
#ifdef __MACH__
#undef bool
#endif
enum debug_bits {
#define DEBUG_BIT(U, l, d) DBG_##U,
#include "tbl/debug_bits.h"
......@@ -82,7 +78,7 @@ typedef uint8_t feature_t[(FEATURE_Reserved+7)>>3];
struct params {
#define ptyp_bool unsigned
#define ptyp_boolean unsigned
#define ptyp_bytes ssize_t
#define ptyp_bytes_u unsigned
#define ptyp_double double
......@@ -96,7 +92,7 @@ struct params {
#define PARAM(typ, fld, nm, ...) \
ptyp_##typ fld;
#include <tbl/params.h>
#undef ptyp_bool
#undef ptyp_boolean
#undef ptyp_bytes
#undef ptyp_bytes_u
#undef ptyp_double
......
......@@ -66,7 +66,7 @@ struct parspec {
char *dyn_def;
};
tweak_t tweak_bool;
tweak_t tweak_boolean;
tweak_t tweak_bytes;
tweak_t tweak_bytes_u;
tweak_t tweak_double;
......
......@@ -122,7 +122,7 @@ tweak_double(struct vsb *vsb, const struct parspec *par, const char *arg)
/*--------------------------------------------------------------------*/
int
tweak_bool(struct vsb *vsb, const struct parspec *par, const char *arg)
tweak_boolean(struct vsb *vsb, const struct parspec *par, const char *arg)
{
volatile unsigned *dest;
......
......@@ -54,7 +54,7 @@
#endif
PARAM_SIMPLE(
/* name */ accept_filter,
/* type */ bool,
/* type */ boolean,
/* min */ NULL,
/* max */ NULL,
/* def */ "on", /* default adjusted in mgt_param.c */
......@@ -120,7 +120,7 @@ PARAM_SIMPLE(
PARAM_SIMPLE(
/* name */ auto_restart,
/* type */ bool,
/* type */ boolean,
/* min */ NULL,
/* max */ NULL,
/* def */ "on",
......@@ -131,7 +131,7 @@ PARAM_SIMPLE(
PARAM_SIMPLE(
/* name */ ban_dups,
/* type */ bool,
/* type */ boolean,
/* min */ NULL,
/* max */ NULL,
/* def */ "on",
......@@ -505,7 +505,7 @@ PARAM_SIMPLE(
PARAM_SIMPLE(
/* name */ http_gzip_support,
/* type */ bool,
/* type */ boolean,
/* min */ NULL,
/* max */ NULL,
/* def */ "on",
......@@ -544,7 +544,7 @@ PARAM_SIMPLE(
PARAM_SIMPLE(
/* name */ http_range_support,
/* type */ bool,
/* type */ boolean,
/* min */ NULL,
/* max */ NULL,
/* def */ "on",
......@@ -745,7 +745,7 @@ PARAM_SIMPLE(
PARAM_SIMPLE(
/* name */ prefer_ipv6,
/* type */ bool,
/* type */ boolean,
/* min */ NULL,
/* max */ NULL,
/* def */ "off",
......@@ -807,7 +807,7 @@ PARAM_SIMPLE(
PARAM_SIMPLE(
/* name */ sigsegv_handler,
/* type */ bool,
/* type */ boolean,
/* min */ NULL,
/* max */ NULL,
/* def */ "on",
......@@ -820,7 +820,7 @@ PARAM_SIMPLE(
PARAM_SIMPLE(
/* name */ syslog_cli_traffic,
/* type */ bool,
/* type */ boolean,
/* min */ NULL,
/* max */ NULL,
/* def */ "on",
......@@ -836,7 +836,7 @@ PARAM_SIMPLE(
#endif
PARAM_SIMPLE(
/* name */ tcp_fastopen,
/* type */ bool,
/* type */ boolean,
/* min */ NULL,
/* max */ NULL,
/* def */ "off",
......@@ -1567,7 +1567,7 @@ PARAM_STRING(
*/
# define PARAM_VCC(nm, def, descr) \
PARAM(, , nm, tweak_bool, &mgt_ ## nm, NULL, NULL, def, "bool", descr)
PARAM(, , nm, tweak_boolean, &mgt_ ## nm, NULL, NULL, def, "bool", descr)
PARAM_VCC(
/* name */ vcc_err_unref,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment