From: Michael Poole Date: Fri, 27 Oct 2006 00:35:00 +0000 (+0000) Subject: Make maintainer-mode use C89 mode. X-Git-Tag: v1.4.0-rc1~92 X-Git-Url: http://git.pk910.de/?p=srvx.git;a=commitdiff_plain;h=1c9294d94d2a9e778ba2e0756bb68e78584325b8 Make maintainer-mode use C89 mode. configure.in (CFLAGS): Use -ansi in maintainer mode. (AC_C_INLINE): Test after setting -Werror. src/chanserv.c (cmd_adduser): Fix comment formatting. (cmd_clvl): Likewise. (cmd_deluser): Likewise. git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-64 --- diff --git a/ChangeLog b/ChangeLog index bba3689..82ac880 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,24 @@ # arch-tag: automatic-ChangeLog--srvx@srvx.net--2006/srvx--devo--1.3 # +2006-10-27 00:35:00 GMT Michael Poole patch-64 + + Summary: + Make maintainer-mode use C89 mode. + Revision: + srvx--devo--1.3--patch-64 + + configure.in (CFLAGS): Use -ansi in maintainer mode. + (AC_C_INLINE): Test after setting -Werror. + + src/chanserv.c (cmd_adduser): Fix comment formatting. + (cmd_clvl): Likewise. + (cmd_deluser): Likewise. + + modified files: + ChangeLog configure.in src/chanserv.c + + 2006-10-27 00:21:32 GMT Michael Poole patch-63 Summary: diff --git a/configure.in b/configure.in index 588be8a..b4fde7e 100644 --- a/configure.in +++ b/configure.in @@ -14,7 +14,7 @@ AM_MAINTAINER_MODE dnl Compiler/runtime feature checks. AC_TYPE_SIGNAL AC_C_CONST -AC_C_INLINE +dnl "const" *should* be in the -Werror section, but that breaks Linux. gg gcc. dnl Checks for programs. AC_PROG_AWK @@ -134,6 +134,12 @@ int getpeername (int $arg2 *, $t *);]], [[$t len; dnl Can only check with -Werror, but the rest of configure doesn't like -Werror OLD_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -W -Wall -Werror" +if test "z$USE_MAINTAINER_MODE" = zyes ; then + CFLAGS="$CFLAGS -ansi" +fi + +dnl Check for post-C89 keywords +AC_C_INLINE dnl Now figure out how to printf() a time_t AC_MSG_CHECKING(for time_t format) @@ -342,7 +348,7 @@ fi MY_SUBDIRS="$MY_SUBDIRS src" CFLAGS="$CFLAGS $ANSI_SRC -W -Wall" if test "z$USE_MAINTAINER_MODE" = zyes ; then - CFLAGS="$CFLAGS -Werror" + CFLAGS="$CFLAGS -Werror -ansi" fi AC_DEFINE_UNQUOTED(CODENAME, "${CODENAME}", [Code name for this release]) diff --git a/src/chanserv.c b/src/chanserv.c index 9ee271b..bac1543 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -2241,7 +2241,7 @@ static CHANSERV_FUNC(cmd_adduser) return 0; } - // Trying to add someone with equal/more access + /* Trying to add someone with equal/more access? */ if (!real_actor || real_actor->access <= access) override = CMD_LOG_OVERRIDE; @@ -2308,14 +2308,15 @@ static CHANSERV_FUNC(cmd_clvl) return 0; } - // Trying to clvl a equal/higher user + /* Trying to clvl a equal/higher user? */ if(!real_actor || (real_actor->access <= victim->access && handle != user->handle_info)) override = CMD_LOG_OVERRIDE; - // Trying to clvl someone to equal/higher access + /* Trying to clvl someone to equal/higher access? */ if(!real_actor || new_access >= real_actor->access) override = CMD_LOG_OVERRIDE; - // Helpers clvling themselves get caught by the "clvl someone to equal/higher access" check. - // If they lower their own access it's not a big problem. + /* Helpers clvling themselves get caught by the "clvl someone to equal/higher access" check. + * If they lower their own access it's not a big problem. + */ victim->access = new_access; reply("CSMSG_CHANGED_ACCESS", handle->handle, new_access, channel->name); @@ -2369,7 +2370,9 @@ static CHANSERV_FUNC(cmd_deluser) return 0; } - // If people delete themselves it is an override, but they could've used deleteme so we don't log it as an override + /* If people delete themselves it is an override, but they + * could've used deleteme so we don't log it as an override + */ if(!real_actor || (real_actor->access <= victim->access && real_actor != victim)) override = CMD_LOG_OVERRIDE;