]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Fix code to compile using K&R C compiler and ansi2kr again.
authorAlexander Barton <alex@barton.de>
Sun, 18 Nov 2007 15:05:35 +0000 (15:05 +0000)
committerAlexander Barton <alex@barton.de>
Sun, 18 Nov 2007 15:05:35 +0000 (15:05 +0000)
ChangeLog
src/ngircd/array.c
src/ngircd/conn.c
src/ngircd/io.c
src/ngircd/irc-info.c
src/ngircd/irc-server.c

index 9598c0415a8f21e63621a878114a6b4c90032d3a..c7eb65c5407e5a298e578a65439e8adab95f0560 100644 (file)
--- a/ChangeLog
+++ b/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 $
index d26d5e39b15874e1eb147da24fd01954e5cdd1c4..ff7f02ce27afef98a3115e08b2759bcbaaa16e84 100644 (file)
@@ -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/28 12:53:41 alex Exp $";
 
 #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
index 8cd98ab0f2d0f2e8f31a1daabcb422bc39d977b4..95ed30889160ac07899424755cfc1ca834cf0d45 100644 (file)
@@ -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 );
 
index cb996e4045f1e25df07fa6fcd1559883fefe0997..d759a5952462a0d6201e72bccce3632d59b9db7b 100644 (file)
@@ -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 13:52:54 fw Exp $";
 /* #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 int action);
 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
 
 
index a63e3aa7ad45971b3ff86f9f0c09945e3efe5230..4ed05b332b21f2506999886c564f02c70d00c2db 100644 (file)
@@ -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 ));
 }
index da9ba978b8b8b8ab442a05d259d474a5f3f2ac06..41e8908593898ac88b58328ea38180a245940472 100644 (file)
@@ -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;
                                                }