Re: Missing include in float.h

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ian R(dot) Campbell" <ian(dot)campbell(at)thepathcentral(dot)com>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Missing include in float.h
Date: 2022-01-30 18:38:40
Message-ID: 324553.1643567920@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Ian R. Campbell" <ian(dot)campbell(at)thepathcentral(dot)com> writes:
> In PG 14, the source file "float.h" has one include:
> <math.h>

> It is missing "c.h", which contains the definitions for PGDLLIMPORT,
> float4, float8, etc.

This is standard practice in our header files: they assume that
the calling .c file has already included c.h, postgres.h, or
postgres_fe.h, as appropriate.

There are some portability hacks in c.h that don't work if any
other header is included first, so there would be little
value in trying to include it via other methods.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Kyotaro Horiguchi 2022-01-31 02:41:44 Re: Report a potential bug caused by a improper call to pfree()
Previous Message Ian R. Campbell 2022-01-30 16:32:58 Missing include in float.h