Compilation errors
Greetings!
I'm trying to compile the PostgreSQL extension. Right now, I'm having the following issues:
gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -pie -I/usr/include/mit-krb5 -DLINUX_OOM_SCORE_ADJ=0 -fno-omit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -fpic -I. -I./ -I/usr/include/postgresql/9.3/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o acoustid_compare.o acoustid_compare.c acoustid_compare.c:87:20: error: unknown type name ‘int4’ match_fingerprints(int4 a, int asize, int4 *b, int bsize) ^ acoustid_compare.c:87:40: error: unknown type name ‘int4’ match_fingerprints(int4 *a, int asize, int4 *b, int bsize) ^ acoustid_compare.c:119:21: error: unknown type name ‘int4’ match_fingerprints2(int4 *a, int asize, int4 *b, int bsize, int maxoffset) ^ acoustid_compare.c:119:41: error: unknown type name ‘int4’ match_fingerprints2(int4 *a, int asize, int4 *b, int bsize, int maxoffset) ^ acoustid_compare.c: In function ‘acoustid_compare’: acoustid_compare.c:239:2: warning: implicit declaration of function ‘match_fingerprints’ [-Wimplicit-function-declaration] result = match_fingerprints( ^ acoustid_compare.c:42:23: error: ‘int4’ undeclared (first use in this function) #define ARRPTR(x) ( (int4 *) ARR_DATA_PTR(x) ) ^ acoustid_compare.c:240:3: note: in expansion of macro ‘ARRPTR’ ARRPTR(a), ARRNELEMS(a), ^ acoustid_compare.c:42:23: note: each undeclared identifier is reported only once for each function it appears in #define ARRPTR(x) ( (int4 *) ARR_DATA_PTR(x) ) ^ acoustid_compare.c:240:3: note: in expansion of macro ‘ARRPTR’ ARRPTR(a), ARRNELEMS(a), ^ acoustid_compare.c:42:29: error: expected expression before ‘)’ token #define ARRPTR(x) ( (int4 *) ARR_DATA_PTR(x) ) ^ acoustid_compare.c:240:3: note: in expansion of macro ‘ARRPTR’ ARRPTR(a), ARRNELEMS(a), ^ acoustid_compare.c:42:29: error: expected expression before ‘)’ token #define ARRPTR(x) ( (int4 *) ARR_DATA_PTR(x) ) ^ acoustid_compare.c:241:3: note: in expansion of macro ‘ARRPTR’ ARRPTR(b), ARRNELEMS(b)); ^ acoustid_compare.c: In function ‘acoustid_compare2’: acoustid_compare.c:259:2: warning: implicit declaration of function ‘match_fingerprints2’ [-Wimplicit-function-declaration] result = match_fingerprints2( ^ acoustid_compare.c:42:23: error: ‘int4’ undeclared (first use in this function) #define ARRPTR(x) ( (int4 *) ARR_DATA_PTR(x) ) ^ acoustid_compare.c:260:3: note: in expansion of macro ‘ARRPTR’ ARRPTR(a), ARRNELEMS(a), ^ acoustid_compare.c:42:29: error: expected expression before ‘)’ token #define ARRPTR(x) ( (int4 *) ARR_DATA_PTR(x) ) ^ acoustid_compare.c:260:3: note: in expansion of macro ‘ARRPTR’ ARRPTR(a), ARRNELEMS(a), ^ acoustid_compare.c:42:29: error: expected expression before ‘)’ token #define ARRPTR(x) ( (int4 *) ARR_DATA_PTR(x) ) ^ acoustid_compare.c:261:3: note: in expansion of macro ‘ARRPTR’ ARRPTR(b), ARRNELEMS(b), ^ acoustid_compare.c: In function ‘acoustid_extract_query’: acoustid_compare.c:289:2: error: unknown type name ‘int4’ int4 *orig, *query; ^ acoustid_compare.c:42:23: error: ‘int4’ undeclared (first use in this function) #define ARRPTR(x) ( (int4 *) ARR_DATA_PTR(x) ) ^ acoustid_compare.c:294:9: note: in expansion of macro ‘ARRPTR’ orig = ARRPTR(a); ^ acoustid_compare.c:42:29: error: expected expression before ‘)’ token #define ARRPTR(x) ( (int4 *) ARR_DATA_PTR(x) ) ^ acoustid_compare.c:294:9: note: in expansion of macro ‘ARRPTR’ orig = ARRPTR(a); ^ acoustid_compare.c:42:29: error: expected expression before ‘)’ token #define ARRPTR(x) ( (int4 *) ARR_DATA_PTR(x) ) ^ acoustid_compare.c:308:10: note: in expansion of macro ‘ARRPTR’ query = ARRPTR(q); ^ acoustid_compare.c:311:8: error: expected ‘;’ before ‘x’ int4 x = ACOUSTID_QUERY_STRIP(orig[i]); ^ acoustid_compare.c:316:20: error: ‘x’ undeclared (first use in this function) if (query[j] == x) { ^ make: * [acoustid_compare.o] Erro 1