X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fircd_snprintf.c;h=eaec2cddb403acce5a4e8670ae8cf0c346610a28;hb=refs%2Fheads%2Fupstream;hp=3c7cfb02f58792883a18b9d41c566428b2308442;hpb=55978d1d1f9c468a0c0cce92fbe3ab958384761d;p=ircu2.10.12-pk.git diff --git a/ircd/ircd_snprintf.c b/ircd/ircd_snprintf.c index 3c7cfb0..eaec2cd 100644 --- a/ircd/ircd_snprintf.c +++ b/ircd/ircd_snprintf.c @@ -24,10 +24,11 @@ #include "client.h" #include "channel.h" +#include "ircd_log.h" #include "ircd_snprintf.h" #include "struct.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include @@ -35,7 +36,7 @@ #include /* Inhibit complaints when we use GCC extensions */ -#if defined(__GNUC__) && defined(HAVE_LONG_LONG) +#if defined(__GNUC__) && SIZEOF_LONG_LONG # define EXTENSION __extension__ #else /** Fallback (empty) definition of EXTENSION. */ @@ -43,7 +44,7 @@ #endif /* Find the largest type */ -#ifdef HAVE_LONG_LONG +#if SIZEOF_LONG_LONG EXTENSION typedef long long _large_t; EXTENSION typedef unsigned long long _ularge_t; # define SIZEOF__LARGE_T SIZEOF_LONG_LONG @@ -1804,7 +1805,7 @@ doprintf(struct Client *dest, struct BufData *buf_p, const char *fmt, if (fld_s.flags & TYPE_CHAR) /* eg, %hhu */ fld_s.value.v_int = (unsigned char)va_arg(vp, unsigned int); else if (fld_s.flags & TYPE_SHORT) /* eg, %hu */ - fld_s.value.v_int = (short)va_arg(vp, unsigned int); + fld_s.value.v_int = (unsigned short)va_arg(vp, unsigned int); else if (fld_s.flags & TYPE_QUAD) /* eg, %qu */ fld_s.value.v_int = va_arg(vp, uint64_t); else if (fld_s.flags & TYPE_LONG) /* eg, %lu */