Make maintainer-mode use C89 mode.
authorMichael Poole <mdpoole@troilus.org>
Fri, 27 Oct 2006 00:35:00 +0000 (00:35 +0000)
committerMichael Poole <mdpoole@troilus.org>
Fri, 27 Oct 2006 00:35:00 +0000 (00:35 +0000)
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

ChangeLog
configure.in
src/chanserv.c

index bba3689e3cce57dce3775df1f85bae1358612b6e..82ac8803bf889e7a0aab425464105fc15e43fe1c 100644 (file)
--- 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 <mdpoole@troilus.org>     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 <mdpoole@troilus.org>     patch-63
 
     Summary:
index 588be8abd0d3ebf3ea3edfd26562d4f49dc07fc0..b4fde7e86dcc0b33aa27df1b478ed3a9d386a2af 100644 (file)
@@ -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])
index 9ee271b6f58fcb425488ffdbdd1bd36d7c06bdbf..bac154391bf37a5b0fe5d57a06f7ba3720bf7c34 100644 (file)
@@ -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;