From a83dce41e0260ef18e643c480d2e0af5cc6766ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Eivind=20N=C3=A6ss?= Date: Fri, 6 Aug 2021 16:28:19 -0700 Subject: [PATCH] Changing HAVE_MULTILINK to PPP_WITH_MULTILINK MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit To be consistent with other options / defines. Signed-off-by: Eivind Næss --- configure.ac | 6 +++--- pppd/Makefile.am | 2 +- pppd/auth.c | 6 +++--- pppd/lcp.c | 18 +++++++++--------- pppd/main.c | 2 +- pppd/options.c | 4 ++-- pppd/pppd.h | 2 +- pppd/pppdconf.h.in | 2 +- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/configure.ac b/configure.ac index ac53342..988162d 100644 --- a/configure.ac +++ b/configure.ac @@ -153,9 +153,9 @@ AM_COND_IF([PPP_WITH_IPV6CP], # Disable Multilink support AC_ARG_ENABLE([multilink], AS_HELP_STRING([--enable-multilink], [Enable multilink support])) -AM_CONDITIONAL(WITH_MULTILINK, test "x${enable_multilink}" = "xyes") -AM_COND_IF([WITH_MULTILINK], - AC_DEFINE([HAVE_MULTILINK], 1, ["Have multilink support"])) +AM_CONDITIONAL(PPP_WITH_MULTILINK, test "x${enable_multilink}" = "xyes") +AM_COND_IF([PPP_WITH_MULTILINK], + AC_DEFINE([PPP_WITH__MULTILINK], 1, ["Have multilink support"])) AS_IF([test "x${build_sunos}" = "xyes" && test "x${enable_multilink}" = "xyes"], [AC_MSG_ERROR([Multilink is not supported on SunOS])]) diff --git a/pppd/Makefile.am b/pppd/Makefile.am index 94197fd..9675208 100644 --- a/pppd/Makefile.am +++ b/pppd/Makefile.am @@ -115,7 +115,7 @@ pppd_LDFLAGS += -Wl,-E endif endif -if WITH_MULTILINK +if PPP_WITH_MULTILINK pppd_SOURCES += multilink.c endif diff --git a/pppd/auth.c b/pppd/auth.c index f8c8a06..7ce6baf 100644 --- a/pppd/auth.c +++ b/pppd/auth.c @@ -210,7 +210,7 @@ int (*null_auth_hook)(struct wordlist **paddrs, int (*allowed_address_hook)(u_int32_t addr) = NULL; -#ifdef HAVE_MULTILINK +#ifdef PPP_WITH_MULTILINK /* Hook for plugin to hear when an interface joins a multilink bundle */ void (*multilink_join_hook)(void) = NULL; #endif @@ -937,7 +937,7 @@ start_networks(int unit) new_phase(PHASE_NETWORK); -#ifdef HAVE_MULTILINK +#ifdef PPP_WITH_MULTILINK if (multilink) { if (mp_join_bundle()) { if (multilink_join_hook) @@ -947,7 +947,7 @@ start_networks(int unit) return; } } -#endif /* HAVE_MULTILINK */ +#endif /* PPP_WITH_MULTILINK */ #ifdef PPP_FILTER if (!demand) diff --git a/pppd/lcp.c b/pppd/lcp.c index 8a18e95..91e73e7 100644 --- a/pppd/lcp.c +++ b/pppd/lcp.c @@ -76,10 +76,10 @@ bool noendpoint = 0; /* don't send/accept endpoint discriminator */ static int noopt(char **); -#ifdef HAVE_MULTILINK +#ifdef PPP_WITH_MULTILINK static int setendpoint(char **); static void printendpoint(option_t *, void (*)(void *, char *, ...), void *); -#endif /* HAVE_MULTILINK */ +#endif /* PPP_WITH_MULTILINK */ static option_t lcp_option_list[] = { /* LCP options */ @@ -162,7 +162,7 @@ static option_t lcp_option_list[] = { { "receive-all", o_bool, &lax_recv, "Accept all received control characters", 1 }, -#ifdef HAVE_MULTILINK +#ifdef PPP_WITH_MULTILINK { "mrru", o_int, &lcp_wantoptions[0].mrru, "Maximum received packet size for multilink bundle", OPT_PRIO, &lcp_wantoptions[0].neg_mrru }, @@ -177,7 +177,7 @@ static option_t lcp_option_list[] = { { "endpoint", o_special, (void *) setendpoint, "Endpoint discriminator for multilink", OPT_PRIO | OPT_A2PRINTER, (void *) printendpoint }, -#endif /* HAVE_MULTILINK */ +#endif /* PPP_WITH_MULTILINK */ { "noendpoint", o_bool, &noendpoint, "Don't send or accept multilink endpoint discriminator", 1 }, @@ -303,7 +303,7 @@ noopt(char **argv) return (1); } -#ifdef HAVE_MULTILINK +#ifdef PPP_WITH_MULTILINK static int setendpoint(char **argv) { @@ -320,7 +320,7 @@ printendpoint(option_t *opt, void (*printer)(void *, char *, ...), void *arg) { printer(arg, "%s", epdisc_to_str(&lcp_wantoptions[0].endpoint)); } -#endif /* HAVE_MULTILINK */ +#endif /* PPP_WITH_MULTILINK */ /* * lcp_init - Initialize LCP. @@ -1868,9 +1868,9 @@ lcp_up(fsm *f) */ mtu = ho->neg_mru? ho->mru: PPP_MRU; mru = go->neg_mru? MAX(wo->mru, go->mru): PPP_MRU; -#ifdef HAVE_MULTILINK +#ifdef PPP_WITH_MULTILINK if (!(multilink && go->neg_mrru && ho->neg_mrru)) -#endif /* HAVE_MULTILINK */ +#endif /* PPP_WITH_MULTILINK */ netif_set_mtu(f->unit, MIN(MIN(mtu, mru), ao->mru)); ppp_send_config(f->unit, mtu, (ho->neg_asyncmap? ho->asyncmap: 0xffffffff), @@ -2092,7 +2092,7 @@ lcp_printpkt(u_char *p, int plen, void (*printer)(void *, char *, ...), void *ar } break; case CI_EPDISC: -#ifdef HAVE_MULTILINK +#ifdef PPP_WITH_MULTILINK if (olen >= CILEN_CHAR) { struct epdisc epd; p += 2; diff --git a/pppd/main.c b/pppd/main.c index cba4a92..e85a09a 100644 --- a/pppd/main.c +++ b/pppd/main.c @@ -384,7 +384,7 @@ main(int argc, char *argv[]) if (!sys_check_options()) exit(EXIT_OPTION_ERROR); auth_check_options(); -#ifdef HAVE_MULTILINK +#ifdef PPP_WITH_MULTILINK mp_check_options(); #endif for (i = 0; (protp = protocols[i]) != NULL; ++i) diff --git a/pppd/options.c b/pppd/options.c index ffd9015..dda3933 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -344,7 +344,7 @@ option_t general_options[] = { OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN }, #endif -#ifdef HAVE_MULTILINK +#ifdef PPP_WITH_MULTILINK { "multilink", o_bool, &multilink, "Enable multilink operation", OPT_PRIO | 1 }, { "mp", o_bool, &multilink, @@ -356,7 +356,7 @@ option_t general_options[] = { { "bundle", o_string, &bundle_name, "Bundle name for multilink", OPT_PRIO }, -#endif /* HAVE_MULTILINK */ +#endif /* PPP_WITH_MULTILINK */ #ifdef PLUGIN { "plugin", o_special, (void *)loadplugin, diff --git a/pppd/pppd.h b/pppd/pppd.h index 534272b..c941b32 100644 --- a/pppd/pppd.h +++ b/pppd/pppd.h @@ -623,7 +623,7 @@ int loop_chars(unsigned char *, int); /* process chars from loopback */ int loop_frame(unsigned char *, int); /* should we bring link up? */ /* Procedures exported from multilink.c */ -#ifdef HAVE_MULTILINK +#ifdef PPP_WITH_MULTILINK void mp_check_options(void); /* Check multilink-related options */ int mp_join_bundle(void); /* join our link to an appropriate bundle */ void mp_exit_bundle(void); /* have disconnected our link from bundle */ diff --git a/pppd/pppdconf.h.in b/pppd/pppdconf.h.in index ecc399c..0a4525d 100644 --- a/pppd/pppdconf.h.in +++ b/pppd/pppdconf.h.in @@ -13,7 +13,7 @@ #undef PPP_WITH_MPPE /* "Have multilink support" */ -#undef HAVE_MULTILINK +#undef PPP_WITH_MULTILINK /* "Have packet activity filter support" */ #undef PPP_FILTER -- 2.39.2