GEOS 3.13 and GEOSMessageHandler

Paul Ramsey pramsey at cleverelephant.ca
Thu Aug 22 10:58:20 PDT 2024



> On Aug 22, 2024, at 10:14 AM, Sandro Santilli <strk at kbt.io> wrote:
> 
> 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 ?

Is our C standard c11? I thought we were c99. 

P

> 
> --strk;



More information about the postgis-devel mailing list