pg_repack.git / summary / log / commit / refs

commit    05fac2dac33e9cd3938618ec8bbb442bc4d8bd29
Author:   Nicola Murino <nicola.murino@gmail.com>
Commit:   Daniele Varrazzo <daniele.varrazzo@gmail.com>
Date:     Fri Feb 03 13:38:31 2017 +0000

    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


bin/pgut/pgut.h | 4 ++++ lib/pgut/pgut-spi.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/bin/pgut/pgut.h b/bin/pgut/pgut.h index c33f389..e8816d3 100644 --- a/bin/pgut/pgut.h +++ b/bin/pgut/pgut.h @@ -24,6 +24,10 @@ #define INFINITE_STR "INFINITE" +#ifdef _MSC_VER +#define __attribute__(x) +#endif + typedef enum YesNo { DEFAULT, diff --git a/lib/pgut/pgut-spi.h b/lib/pgut/pgut-spi.h index 5406b36..c5ce52f 100644 --- a/lib/pgut/pgut-spi.h +++ b/lib/pgut/pgut-spi.h @@ -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, ...) [parent: 4d59be0a6680]