]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - include/ircd_defs.h
Copied libratbox and related stuff from shadowircd upstream.
[irc/rqf/shadowircd.git] / include / ircd_defs.h
index fc1d3bd41ac740646b0567fddfee9c322427b40f..686cea487c4d1b311698d601d4bcfdcce6722eee 100644 (file)
@@ -22,7 +22,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: ircd_defs.h 3225 2007-03-04 23:42:55Z jilles $
+ *  $Id: ircd_defs.h 3512 2007-06-06 16:20:40Z nenolod $
  */
 
 /*
  * Otherwise there are no user servicable part here. 
  *
  */
- /* ircd_defs.h - Global size definitions for record entries used
-  * througout ircd. Please think 3 times before adding anything to this
-  * file.
-  */
+
+/* ircd_defs.h - Global size definitions for record entries used
+ * througout ircd. Please think 3 times before adding anything to this
+ * file.
+ */
 #ifndef INCLUDED_ircd_defs_h
 #define INCLUDED_ircd_defs_h
 
 #define AFP(a,b)
 #endif
 
+/*
+ * This ensures that __attribute__((deprecated)) is not used in for example
+ * sun CC, since it's a GNU-specific extension. -nenolod
+ */
+#ifdef __GNUC__
+#define IRC_DEPRECATED __attribute__((deprecated))
+#else
+#define IRC_DEPRECATED
+#endif
 
-#include "s_log.h"
+#include "logger.h"
 #include "send.h"
 
 #ifdef SOFT_ASSERT
 #  error Incorrect config.h for this revision of ircd.
 #endif
 
-/*
- * This defines the version of the data structures used in the ircd.
- * In the event of a mismatch (i.e. this is incremented due to a major
- * change that cannot be accomidated for in the ircd), then a hard
- * restart occurs.
- */
-#define CHARYBDIS_DV   0x00010200      /* 1.2.0 */
-
 #define HOSTLEN         63     /* Length of hostname.  Updated to         */
                                /* comply with RFC1123                     */
 
  * takes at most 246 bytes (including CRLF and '\0') and together with the
  * quit reason should fit in 512 */
 #define REASONLEN      260     /* kick/part/quit */
-#define BANREASONLEN   390     /* kline/dline/gline */
+#define BANREASONLEN   390     /* kline/dline */
 #define AWAYLEN                TOPICLEN
 #define KILLLEN         200    /* with Killed (nick ()) added this should fit in quit */
 
 #define CLIENT_PARSE_ERROR -1
 #define CLIENT_OK      1
 
-#ifdef IPV6
+#ifdef RB_IPV6
 #ifndef AF_INET6
 #error "AF_INET6 not defined"
 #endif
 
 
-#else /* #ifdef IPV6 */
+#else /* #ifdef RB_IPV6 */
 
 #ifndef AF_INET6
 #define AF_INET6 AF_MAX                /* Dummy AF_INET6 declaration */
 #endif
-#endif /* #ifdef IPV6 */
-
+#endif /* #ifdef RB_IPV6 */
 
-#ifdef IPV6
-#define irc_sockaddr_storage sockaddr_storage
-#else
-#define irc_sockaddr_storage sockaddr
-#define ss_family sa_family
-#ifdef SOCKADDR_IN_HAS_LEN
-#define ss_len sa_len
-#endif
-#endif
-
-#ifdef IPV6
+#ifdef RB_IPV6
 #define PATRICIA_BITS  128
 #else
 #define PATRICIA_BITS  32
 #endif
 
-#ifdef SOCKADDR_IN_HAS_LEN
-#define SET_SS_LEN(x, y) (x).ss_len = (y)
-#define GET_SS_LEN(x) x.ss_len
-#else
-#define SET_SS_LEN(x, y)
-#ifdef IPV6
-#define GET_SS_LEN(x) x.ss_family == AF_INET ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6)
-#else
-#define GET_SS_LEN(x) sizeof(struct sockaddr_in)
-#endif
-#endif
-
-
 #endif /* INCLUDED_ircd_defs_h */