Fix conflicting types errors in radius auth
[exim.git] / src / src / auths / call_radius.c
index 90e2e68806d7fc3b36656d778fc4fb1eb372ed80..1201078dcae24179539beb8e87a01f5579c7b80c 100644 (file)
@@ -1,10 +1,8 @@
-/* $Cambridge: exim/src/src/auths/call_radius.c,v 1.6 2006/06/28 13:59:13 ph10 Exp $ */
-
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2006 */
+/* Copyright (c) University of Cambridge 1995 - 2009 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 /* This file was originally supplied by Ian Kirk. The libradius support came
@@ -22,10 +20,12 @@ RADIUS_CONFIG_FILE is defined. However, some compilers don't like compiling
 empty modules, so keep them happy with a dummy when skipping the rest. Make it
 reference itself to stop picky compilers complaining that it is unused, and put
 in a dummy argument to stop even pickier compilers complaining about infinite
-loops. */
+loops. Then use a mutually-recursive pair as gcc is just getting stupid. */
 
 #ifndef RADIUS_CONFIG_FILE
-static void dummy(int x) { dummy(x-1); }
+static void dummy(int x);
+static void dummy2(int x) { dummy(x-1); }
+static void dummy(int x) { dummy2(x-1); }
 #else  /* RADIUS_CONFIG_FILE */
 
 
@@ -60,10 +60,10 @@ Returns:   OK if authentication succeeded
 */
 
 int
-auth_call_radius(uschar *s, uschar **errptr)
+auth_call_radius(const uschar *s, uschar **errptr)
 {
 uschar *user;
-uschar *radius_args = s;
+const uschar *radius_args = s;
 int result;
 int sep = 0;