Monday, January 29, 2001, 5:40:46 PM, you wrote:
TL> Alex Guryanow <gav@nlr.ru> writes:
>> By the way. To compile using g++ I have added two lines to
>> src/include/nodes/parsenodes.h:
TL> How big does g++ think type bool is? There are several bool fields
TL> in struct RelationData ...
It thinks bool is 4 bytes long:
--- a.cpp ---
#include <stdio.h>
int main(void)
{
printf("sizeof(bool) = %d\n", sizeof(bool));
return 0;
}
--- make command ---
g++ a.cpp
--- results ---
sizeof(bool) = 4
And /src/include/c.h from postgres distribution contains
#ifndef __cplusplus
#ifndef bool
typedef char bool;
#endif
#endif
What should I do to be able to compile my function using g++?
Should I make changes in c.h to define bool as int and then rebuild
backend? Or this is a bad idea?
Best regards,
Alex