fix compilation with msvc

__attribute__ macro is not defined in msvc and it is not essential to
the implementation. All it does  is tell the compiler that this function
is similar to printf, and  expects a printf-like format string
So for MSVC we define __attribute__ as a macro that do nothing
This commit is contained in:
Nicola Murino 2017-02-03 14:38:31 +01:00 committed by Daniele Varrazzo
parent 4d59be0a66
commit 05fac2dac3
2 changed files with 8 additions and 0 deletions

View File

@ -24,6 +24,10 @@
#define INFINITE_STR "INFINITE"
#ifdef _MSC_VER
#define __attribute__(x)
#endif
typedef enum YesNo
{
DEFAULT,

View File

@ -12,6 +12,10 @@
#include "executor/spi.h"
#ifdef _MSC_VER
#define __attribute__(x)
#endif
extern void execute(int expected, const char *sql);
extern void execute_plan(int expected, SPIPlanPtr plan, Datum *values, const char *nulls);
extern void execute_with_format(int expected, const char *format, ...)