Re: Remove useless casts to (void *) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Remove useless casts to (void *)
Date
Msg-id 1685317.1733177490@sss.pgh.pa.us
Whole thread Raw
In response to Re: Remove useless casts to (void *)  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Remove useless casts to (void *)
List pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> I wouldn't change that.  illumos is selecting the old pre-standard
> declaration here, but it knows the standard one:
>
https://github.com/illumos/illumos-gate/blob/27ecbff00d8c86a2647d6fe325cacb220d712115/usr/src/uts/common/sys/shm.h#L129
> https://illumos.org/man/2/shmdt

Oh!  Kind of looks like we should be defining _POSIX_C_SOURCE=200112L,
at least on that platform.

> I don't know why we have only one tiny issue if the system headers
> think we want pre-POSIX stuff.

Agreed, I'd have expected more trouble than this.  But persuading
the system headers that we want a POSIX version from this century
seems like it might be a good idea to forestall future issues.

I'm inclined to propose adding something like

CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L"

to src/template/solaris.  Not sure if we have a corresponding
mechanism for meson, though.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Incorrect result of bitmap heap scan.
Next
From: Andres Freund
Date:
Subject: Re: Remove useless casts to (void *)