Commit Diff


commit - 2f305331a17b6b967e46f0ec13ea4f6aeda83b89
commit + 06bfb3adfb7ed6aef01c2fa892ea396405ee040a
blob - 9598c0415a8f21e63621a878114a6b4c90032d3a
blob + c7eb65c5407e5a298e578a65439e8adab95f0560
--- ChangeLog
+++ ChangeLog
@@ -12,6 +12,7 @@
 
 ngIRCd HEAD
 
+  - Fix code to compile using K&R C compiler and ansi2kr again.
   - New config option NoDNS: Disables DNS lookups when clients connect.
   - Fixed propagation of channel mode 'P' on server links.
   - Numeric 317: implemented "signon time" (displayed in WHOIS result).
@@ -709,4 +710,4 @@ ngIRCd 0.0.1, 31.12.2001
 
 
 -- 
-$Id: ChangeLog,v 1.325 2007/10/25 11:03:02 fw Exp $
+$Id: ChangeLog,v 1.326 2007/11/18 15:05:35 alex Exp $
blob - d26d5e39b15874e1eb147da24fd01954e5cdd1c4
blob + ff7f02ce27afef98a3115e08b2759bcbaaa16e84
--- src/ngircd/array.c
+++ src/ngircd/array.c
@@ -12,7 +12,7 @@
 
 #include "array.h"
 
-static char UNUSED id[] = "$Id: array.c,v 1.14 2006/12/28 12:53:41 alex Exp $";
+static char UNUSED id[] = "$Id: array.c,v 1.15 2007/11/18 15:05:35 alex Exp $";
 
 #include <assert.h>
 
@@ -28,9 +28,9 @@ static char UNUSED id[] = "$Id: array.c,v 1.14 2006/12
 
 #define array_UNUSABLE(x)	( !(x)->mem || (0 == (x)->allocated) )
 
-#define ALIGN_32U(x)            (((x)+31U  ) & ~(31U))
-#define ALIGN_1024U(x)          (((x)+1023U) & ~(1023U))
-#define ALIGN_4096U(x)          (((x)+4095U) & ~(4095U))
+#define ALIGN_32U(x)            (((x)+(unsigned)31  ) & ~((unsigned)31))
+#define ALIGN_1024U(x)          (((x)+(unsigned)1023) & ~((unsigned)1023))
+#define ALIGN_4096U(x)          (((x)+(unsigned)4095) & ~((unsigned)4095))
 
 
 static bool
blob - 8cd98ab0f2d0f2e8f31a1daabcb422bc39d977b4
blob + 95ed30889160ac07899424755cfc1ca834cf0d45
--- src/ngircd/conn.c
+++ src/ngircd/conn.c
@@ -17,7 +17,7 @@
 #include "portab.h"
 #include "io.h"
 
-static char UNUSED id[] = "$Id: conn.c,v 1.213 2007/10/25 11:01:19 fw Exp $";
+static char UNUSED id[] = "$Id: conn.c,v 1.214 2007/11/18 15:05:35 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -349,7 +349,7 @@ NewListener( const UINT16 Port )
 	/* Server-"Listen"-Socket initialisieren */
 	memset( &addr, 0, sizeof( addr ));
 	memset( &inaddr, 0, sizeof( inaddr ));
-	addr.sin_family = (sa_family_t)AF_INET;
+	addr.sin_family = AF_INET;
 	addr.sin_port = htons( Port );
 	if( Conf_ListenAddress[0] )
 	{
@@ -1383,7 +1383,7 @@ New_Server( int Server )
 	}
 
 	memset( &new_addr, 0, sizeof( new_addr ));
-	new_addr.sin_family = (sa_family_t)AF_INET;
+	new_addr.sin_family = AF_INET;
 	new_addr.sin_addr = inaddr;
 	new_addr.sin_port = htons( Conf_Server[Server].port );
 
blob - cb996e4045f1e25df07fa6fcd1559883fefe0997
blob + d759a5952462a0d6201e72bccce3632d59b9db7b
--- src/ngircd/io.c
+++ src/ngircd/io.c
@@ -12,7 +12,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: io.c,v 1.25 2007/01/19 13:52:54 fw Exp $";
+static char UNUSED id[] = "$Id: io.c,v 1.26 2007/11/18 15:05:35 alex Exp $";
 
 #include <assert.h>
 #include <stdlib.h>
@@ -30,7 +30,11 @@ static char UNUSED id[] = "$Id: io.c,v 1.25 2007/01/19
 /* #define DEBUG_IO */
 
 typedef struct {
+#ifdef PROTOTYPES
  void (*callback)(int, short);
+#else
+ void (*callback)();
+#endif
  short what;
 } io_event;
 
@@ -88,7 +92,7 @@ static bool io_event_change_kqueue(int, short, const i
 static array pollfds;
 static int poll_maxfd;
 
-static bool io_event_change_poll(int fd, short what);
+static bool io_event_change_poll PARAMS((int fd, short what));
 #endif
 
 #ifdef IO_USE_DEVPOLL
@@ -524,7 +528,11 @@ io_close_devpoll(int fd)
 	write(io_masterfd, &p, sizeof p);
 }
 #else
-static inline void io_close_devpoll(int UNUSED x) { /* NOTHING */ }
+static inline void
+io_close_devpoll(int UNUSED x)
+{ 
+	/* NOTHING */
+}
 #endif
 
 
@@ -576,7 +584,11 @@ io_close_select(int fd)
 	}
 }
 #else
-static inline void io_close_select(int UNUSED x) { /* NOTHING */ }
+static inline void
+io_close_select(int UNUSED x)
+{ 
+	/* NOTHING */
+}
 #endif
 
 
blob - a63e3aa7ad45971b3ff86f9f0c09945e3efe5230
blob + 4ed05b332b21f2506999886c564f02c70d00c2db
--- src/ngircd/irc-info.c
+++ src/ngircd/irc-info.c
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: irc-info.c,v 1.38 2007/10/04 15:03:56 alex Exp $";
+static char UNUSED id[] = "$Id: irc-info.c,v 1.39 2007/11/18 15:05:35 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -885,18 +885,21 @@ IRC_Send_LUSERS( CLIENT *Client )
 } /* IRC_Send_LUSERS */
 
 
-static bool Show_MOTD_Start(CLIENT *Client)
+static bool
+Show_MOTD_Start(CLIENT *Client)
 {
 	return IRC_WriteStrClient(Client, RPL_MOTDSTART_MSG,
 		Client_ID( Client ), Client_ID( Client_ThisServer( )));
 }
 
-static bool Show_MOTD_Sendline(CLIENT *Client, const char *msg)
+static bool
+Show_MOTD_Sendline(CLIENT *Client, const char *msg)
 {
 	return IRC_WriteStrClient(Client, RPL_MOTD_MSG, Client_ID( Client ), msg);
 }
 
-static bool Show_MOTD_End(CLIENT *Client)
+static bool
+Show_MOTD_End(CLIENT *Client)
 {
 	return IRC_WriteStrClient( Client, RPL_ENDOFMOTD_MSG, Client_ID( Client ));
 }
blob - da9ba978b8b8b8ab442a05d259d474a5f3f2ac06
blob + 41e8908593898ac88b58328ea38180a245940472
--- src/ngircd/irc-server.c
+++ src/ngircd/irc-server.c
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: irc-server.c,v 1.43 2006/12/07 17:57:20 fw Exp $";
+static char UNUSED id[] = "$Id: irc-server.c,v 1.44 2007/11/18 15:05:35 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -261,7 +261,7 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
 						if( ! IRC_WriteStrClient( Client, "CHANINFO %s +%s %s %lu :%s",
 							Channel_Name( chan ), modes,
 							strchr( Channel_Modes( chan ), 'k' ) ? Channel_Key( chan ) : "*",
-							strchr( Channel_Modes( chan ), 'l' ) ? Channel_MaxUsers( chan ) : 0UL, topic ))
+							strchr( Channel_Modes( chan ), 'l' ) ? Channel_MaxUsers( chan ) : 0, topic ))
 						{
 							return DISCONNECTED;
 						}