From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Amit Kapila <akapila(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: Make the order of the header file includes consistent in non-bac |
Date: | 2019-10-25 04:47:52 |
Message-ID: | CAA4eK1+3gJ7diezko14mokpcEvZcQjpmQWVKfVC0ffGGEmJ2zw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Fri, Oct 25, 2019 at 9:32 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Fri, Oct 25, 2019 at 8:54 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)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
Attachment | Content-Type | Size |
---|---|---|
0001-Revert-part-of-commit-dddf4cdc3.patch | application/octet-stream | 1.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2019-10-25 05:39:56 | pgsql: Revert part of commit dddf4cdc3. |
Previous Message | Amit Kapila | 2019-10-25 04:02:29 | Re: pgsql: Make the order of the header file includes consistent in non-bac |