Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: ‘FALSE’ undeclared (first use in this function) #8

Open
digoal opened this issue Sep 4, 2018 · 2 comments
Open

error: ‘FALSE’ undeclared (first use in this function) #8

digoal opened this issue Sep 4, 2018 · 2 comments

Comments

@digoal
Copy link

digoal commented Sep 4, 2018

pg 11 make error

root@pg11-test-> USE_PGXS=1 make
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O3 -fPIC -I. -I./ -I/usr/pgsql-11/include/server -I/usr/pgsql-11/include/internal  -D_GNU_SOURCE   -c -o imgsmlr_idx.o imgsmlr_idx.c
imgsmlr_idx.c:26:1: error: unknown type name ‘typedefenum’
 typedefenum __bool {false = 0,true =1, }bool;
 ^
imgsmlr_idx.c:26:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
 typedefenum __bool {false = 0,true =1, }bool;
                    ^
imgsmlr_idx.c:26:20: warning: useless type name in empty declaration [enabled by default]
In file included from imgsmlr_idx.c:18:0:
imgsmlr_idx.c: In function ‘signature_compress’:
imgsmlr_idx.c:69:23: error: ‘FALSE’ undeclared (first use in this function)
        entry->offset, FALSE);
                       ^
/usr/pgsql-11/include/server/access/gist.h:171:37: note: in definition of macro ‘gistentryinit’
    (e).offset = (o); (e).leafkey = (l); } while (0)
                                     ^
imgsmlr_idx.c:69:23: note: each undeclared identifier is reported only once for each function it appears in
        entry->offset, FALSE);
                       ^
/usr/pgsql-11/include/server/access/gist.h:171:37: note: in definition of macro ‘gistentryinit’
    (e).offset = (o); (e).leafkey = (l); } while (0)
                                     ^
imgsmlr_idx.c: In function ‘signature_decompress’:
imgsmlr_idx.c:91:23: error: ‘FALSE’ undeclared (first use in this function)
        entry->offset, FALSE);
                       ^
/usr/pgsql-11/include/server/access/gist.h:171:37: note: in definition of macro ‘gistentryinit’
    (e).offset = (o); (e).leafkey = (l); } while (0)
                                     ^
make: *** [imgsmlr_idx.o] Error 1

add it to .h

#ifndef FALSE
#define FALSE   (0)
#endif


#ifndef TRUE
#define TRUE    (!FALSE)
#endif
@ghost
Copy link

ghost commented Apr 2, 2021

This method is also usefull if you chose PostgreSQL 13.1.

@yohanespradono
Copy link

Works for PostgreSQL 14.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants