1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-25 21:46:37 +02:00
Files
unrealircd/include/ircsprintf.h
T
Bram Matthys 85b3b91b19 Windows build: Add format string verification during build.
(Will be used to hunt and fix those time_t integer type mismatches)
2019-08-24 17:10:44 +02:00

24 lines
549 B
C

/*
* sprintf_irc.h
*
* $Id$
*/
#ifndef IRCSPRINTF_H
#define IRCSPRINTF_H
#include <stdarg.h>
#include <stdio.h>
/* ugly hack GRR, for both attribute and FORMAT_STRING */
#if !defined(__GNUC__) && !defined(__common_include__)
#define __attribute__(x) /* nothing */
#endif
#ifndef FORMAT_STRING
# define FORMAT_STRING(p) p
#endif
extern char *ircvsnprintf(char *str, size_t size, const char *format, va_list);
extern char *ircsnprintf(char *str, size_t size, FORMAT_STRING(const char *format), ...) __attribute__((format(printf,3,4)));
#endif