From 41d98dc5f54f1ff463cea2cfeb1190d59e98413b Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Sat, 8 Oct 2016 00:35:46 +1100 Subject: [PATCH] Rename reserved identifiers in irc_std.h Identifiers beginning with two underscores or one underscore and a capital letter are reserved in all contexts, including macros. The __N macro in irc_std.h is in this space, and was conflicting with a macro definition in gcc 5.4.0's xmmintrin.h under cygwin, making the build fail. Reported-By: ice-man --- Changelog | 3 +++ include/irc_std.h | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Changelog b/Changelog index 47292f5..4d11b62 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,8 @@ [Changes 1.2.2] +* Rename reserved identifiers from irc_std.h to fix building on under + latest cygwin. (caf) + * Ensure /BAN /DBAN /MB /MK /MUB /UNBAN commands send command to the right server. (caf) diff --git a/include/irc_std.h b/include/irc_std.h index b189c5b..cba32f5 100644 --- a/include/irc_std.h +++ b/include/irc_std.h @@ -10,8 +10,8 @@ * @(#)$Id$ */ -#ifndef __irc_std_h -#define __irc_std_h +#ifndef IRC_STD_H_ +#define IRC_STD_H_ #include "defs.h" /* @@ -97,16 +97,16 @@ */ #ifndef __GNUC__ # define __inline /* delete gcc keyword */ -# define __A(x) -# define __N +# define _printf_(x) +# define _noreturn_ # define __inline__ #else # if (__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)) -# define __A(x) __attribute__ ((format (printf, x, x + 1))) -# define __N __attribute__ ((noreturn)) +# define _printf_(x) __attribute__ ((format (printf, x, x + 1))) +# define _noreturn_ __attribute__ ((noreturn)) # else -# define __A(x) -# define __N +# define _printf_(x) +# define _noreturn_ # define __inline # endif #endif