pkgsrc/geography/geos/patches/patch-capi_geos__ts__c.cpp
gdt 96c97056c2 Update to 3.7.0:
pkgsrc changes: revise comments about geos C vs C++ library linking in
light of unexpected libtool behavior (which defeats geos's scheme)

Upstream NEWS:

3.7.0 changes
2018-09-10
- New things:
  - CAPI: GEOSDistanceIndexed (#795, Dan Baston)
  - CAPI: GEOSCoordSeq_isCCW (#870, Dan Baston)
  - CAPI: GEOSGeom_getXMin, GEOSGeom_getXMax,
          GEOSGeom_getYMin, GEOSGeom_getYMax (#871, Dan Baston)
  - CAPI: GEOSFrechetDistance (#797, Shinichi SUGIYAMA)
  - CAPI: GEOSReverse (#872, Dan Baston)
  - CAPI: GEOSGeomGetZ (#581, J Smith)

- Improvements
  - Interruptible snap operation (Paul Ramsey)
  - Numerous packaging, doc, and build changes
    (Debian group: Bas Couwenberg, Francesco Paolo Lovergine)
    (NetBSD: Greg Troxel)
  - Allow static library with C API for CMake builds (#878, Dakota Hawkins)

- C++ API changes:
  - Require defining USE_UNSTABLE_GEOS_CPP_API for use without
    warnings.
  - Make C++11 required (Mateusz Loskot)
  - Use C++11 unique_ptr, nullptr, and override constructs
    (Mateusz Loskot)
  - C++11 standard delete on noncopyable
    (#851, Vicky Vergara)
  - Fix CommonBits::getBit to correctly handle i >= 32
    (#834, Kurt Schwehr)
2018-09-11 16:13:29 +00:00

45 lines
1.4 KiB
C++

$NetBSD: patch-capi_geos__ts__c.cpp,v 1.2 2018/09/11 16:13:29 gdt Exp $
\todo Document this patch. It appears to be that passing non-POD types
to variadic functions is UB.
\todo File a bug upstream, if appropriate.
--- capi/geos_ts_c.cpp.orig 2015-09-08 16:31:02.000000000 +0000
+++ capi/geos_ts_c.cpp
@@ -214,7 +214,7 @@ typedef struct GEOSContextHandle_HS
}
void
- NOTICE_MESSAGE(string fmt, ...)
+ NOTICE_MESSAGE(const char *fmt, ...)
{
if (NULL == noticeMessageOld && NULL == noticeMessageNew) {
return;
@@ -222,7 +222,7 @@ typedef struct GEOSContextHandle_HS
va_list args;
va_start(args, fmt);
- int result = vsnprintf(msgBuffer, sizeof(msgBuffer) - 1, fmt.c_str(), args);
+ int result = vsnprintf(msgBuffer, sizeof(msgBuffer) - 1, fmt, args);
va_end(args);
if (result > 0) {
@@ -235,7 +235,7 @@ typedef struct GEOSContextHandle_HS
}
void
- ERROR_MESSAGE(string fmt, ...)
+ ERROR_MESSAGE(const char *fmt, ...)
{
if (NULL == errorMessageOld && NULL == errorMessageNew) {
return;
@@ -243,7 +243,7 @@ typedef struct GEOSContextHandle_HS
va_list args;
va_start(args, fmt);
- int result = vsnprintf(msgBuffer, sizeof(msgBuffer) - 1, fmt.c_str(), args);
+ int result = vsnprintf(msgBuffer, sizeof(msgBuffer) - 1, fmt, args);
va_end(args);
if (result > 0) {