GEOS 3.13 and GEOSMessageHandler

Sandro Santilli strk at kbt.io
Thu Aug 22 10:14:52 PDT 2024


On Thu, Aug 22, 2024 at 08:23:20AM -0700, Paul Ramsey wrote:

> /usr/local/include/geos_c.h:105:16: warning: redefinition of typedef 'GEOSMessageHandler' is a C11 feature [-Wtypedef-redefinition]
> typedef void (*GEOSMessageHandler)(const char *fmt, ...);
> 
> ../../liblwgeom/lwgeom_geos.h:28:16: note: previous definition is here
> typedef void (*GEOSMessageHandler)(const char *fmt, ...) __attribute__ (( format(printf, 1, 0) ));
> ```
> 
> A fairly reasonable warning, IMO, since redefining something we are pulling in from another library is quite a bit of a hack, and dangerous in its own right.

It'd dangerous only if the upstream definition can change, but we're
only redefining for GEOS versions below a given number os we know the
definition is NOT going to change, removing that danger.

All you need is to tell your compiler that you are using C11 features ?

--strk;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20240822/3f9db346/attachment-0001.sig>


More information about the postgis-devel mailing list