Treat G-line-related times as network times, rather than local times.
[ircu2.10.12-pk.git] / ircd / ircd_snprintf.c
index 3c7cfb02f58792883a18b9d41c566428b2308442..eaec2cddb403acce5a4e8670ae8cf0c346610a28 100644 (file)
 
 #include "client.h"
 #include "channel.h"
+#include "ircd_log.h"
 #include "ircd_snprintf.h"
 #include "struct.h"
 
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
 #include <errno.h>
 #include <stddef.h>
 #include <stdlib.h>
@@ -35,7 +36,7 @@
 #include <time.h>
 
 /* 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 */