diff options
author | joerg <joerg@pkgsrc.org> | 2015-09-08 18:48:04 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2015-09-08 18:48:04 +0000 |
commit | 986837b03d7cd8c983ffa0654d7a56f32a3f90e7 (patch) | |
tree | 59b39b683d800af4f3be9b87d0b083b7ff707321 /geography | |
parent | 2031d766121761287f8ba900c6dc84f9107c9720 (diff) | |
download | pkgsrc-986837b03d7cd8c983ffa0654d7a56f32a3f90e7.tar.gz |
Passing non-POD types like std::string to variadic functions is UB.
In this case, it is just plainly wasteful as well, so don't do that.
Diffstat (limited to 'geography')
-rw-r--r-- | geography/geos/distinfo | 3 | ||||
-rw-r--r-- | geography/geos/patches/patch-capi_geos__ts__c.cpp | 40 |
2 files changed, 42 insertions, 1 deletions
diff --git a/geography/geos/distinfo b/geography/geos/distinfo index f0bae342606..b5e5d1d84b8 100644 --- a/geography/geos/distinfo +++ b/geography/geos/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.23 2015/09/06 19:45:44 gdt Exp $ +$NetBSD: distinfo,v 1.24 2015/09/08 18:48:04 joerg Exp $ SHA1 (geos-3.5.0.tar.bz2) = 142be1db41cb7c62afb9f6d3304769a39dd0b5ac RMD160 (geos-3.5.0.tar.bz2) = 273d665246b88beb051d4b5d83e9229eaf559bb3 Size (geos-3.5.0.tar.bz2) = 1949397 bytes SHA1 (patch-ae) = 01ffd15e3562ff8fb191608dc12a2ee6918154b0 +SHA1 (patch-capi_geos__ts__c.cpp) = 0c266de00722606bcb9637f21f5c3c458f12cb47 diff --git a/geography/geos/patches/patch-capi_geos__ts__c.cpp b/geography/geos/patches/patch-capi_geos__ts__c.cpp new file mode 100644 index 00000000000..e2a7fa66cdc --- /dev/null +++ b/geography/geos/patches/patch-capi_geos__ts__c.cpp @@ -0,0 +1,40 @@ +$NetBSD: patch-capi_geos__ts__c.cpp,v 1.1 2015/09/08 18:48:04 joerg Exp $ + +--- 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) { |