From 6097f4bfb0d093a164d3304e574eb24de84c1538 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Fri, 7 Oct 2005 03:44:59 +0000 Subject: [PATCH] * amd/amfs_toplvl.c (amfs_toplvl_mount): break complex ifdef macro into two sections, to workaround a C99 varargs-macro bug in gcc-3.2.2 (RH9). --- ChangeLog | 4 ++++ amd/amfs_toplvl.c | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9641636..3f19825 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2005-10-06 Erez Zadok + * amd/amfs_toplvl.c (amfs_toplvl_mount): break complex ifdef macro + into two sections, to workaround a C99 varargs-macro bug in + gcc-3.2.2 (RH9). + * libamu/wire.c (print_wires): convert argument-less xsnprintf to xstrlcpy. diff --git a/amd/amfs_toplvl.c b/amd/amfs_toplvl.c index c02b013..0eb86c1 100644 --- a/amd/amfs_toplvl.c +++ b/amd/amfs_toplvl.c @@ -210,18 +210,20 @@ amfs_toplvl_mount(am_node *mp, mntfs *mf) #endif /* MNTTAB_OPT_IGNORE */ #ifdef WANT_TIMEO_AND_RETRANS_ON_TOPLVL xsnprintf(opts, sizeof(opts), "%s%s,%s=%d,%s=%d,%s=%d,%s,map=%s", -#else /* WANT_TIMEO_AND_RETRANS_ON_TOPLVL */ - xsnprintf(opts, sizeof(opts), "%s%s,%s=%d,%s,map=%s", -#endif /* WANT_TIMEO_AND_RETRANS_ON_TOPLVL */ preopts, MNTTAB_OPT_RW, MNTTAB_OPT_PORT, nfs_port, -#ifdef WANT_TIMEO_AND_RETRANS_ON_TOPLVL /* note: TIMEO+RETRANS for toplvl are only "udp" currently */ MNTTAB_OPT_TIMEO, gopt.amfs_auto_timeo[AMU_TYPE_UDP], MNTTAB_OPT_RETRANS, gopt.amfs_auto_retrans[AMU_TYPE_UDP], -#endif /* WANT_TIMEO_AND_RETRANS_ON_TOPLVL */ mf->mf_ops->fs_type, mf->mf_info); +#else /* not WANT_TIMEO_AND_RETRANS_ON_TOPLVL */ + xsnprintf(opts, sizeof(opts), "%s%s,%s=%d,%s,map=%s", + preopts, + MNTTAB_OPT_RW, + MNTTAB_OPT_PORT, nfs_port, + mf->mf_ops->fs_type, mf->mf_info); +#endif /* not WANT_TIMEO_AND_RETRANS_ON_TOPLVL */ #ifdef MNTTAB_OPT_NOAC if (gopt.auto_attrcache == 0) { xstrlcat(opts, ",", sizeof(opts)); -- 2.43.0