On Fri, Oct 25, 2019 at 9:32 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Fri, Oct 25, 2019 at 8:54 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
> >
> > > And the cause is visibly this portion of the commit:
> > > --- a/src/interfaces/ecpg/pgtypeslib/dt_common.c
> > > +++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c
> > > @@ -7,9 +7,9 @@
> > > #include <math.h>
> > >
> > > #include "common/string.h"
> > > -#include "pgtypeslib_extern.h"
> > > #include "dt.h"
> > > #include "pgtypes_timestamp.h"
> > > +#include "pgtypeslib_extern.h"
> >
> > Right, but trying to see why it hasn't failed on other machines and in
> > my local build.
> >
>
> One possible reason could be that pgtypeslib_extern.h has define like below:
> #ifndef bool
> #define bool char
> #endif /* ndef bool */
>
> It is possible that all the functions that have bool has a parameter
> in dt_common.c treat it as 'char' where as the declaration of same
> functions in dt.h doesn't consider bool as char because now
> pgtypeslib_extern.h is included after dt.h. It seems that the
> platforms where it failed doesn't have bool defined. What do you
> think? I think we can revert the change in that file.
>
I am planning to revert that part of the change as attached. We can
think of even moving the above definition of bool but I am not sure
what is the right place for the same and I am not sure if it is a
better idea. I think that can be explored later. It is better to
revert that change for now. Do you think we should add some comment
like:
"We need to include pgtypeslib_extern.h before dt.h as it defines bool
which is used in dt.h."? I have not added as I couldn't experiment
any thing related to that.
I will apply the attached in one hour or so unless you or someone has
a better idea. In the meantime, we can see if there is any other
problem with buildfarm.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com