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
This commit is contained in:
Kevin Easton
2016-10-08 00:35:46 +11:00
parent 0fd11b3d75
commit 41d98dc5f5
2 changed files with 11 additions and 8 deletions

View File

@@ -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)

View File

@@ -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