pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/math/amath Replacement operators must not be declared ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/f29204b1d7d0
branches: trunk
changeset: 358659:f29204b1d7d0
user: joerg <joerg%pkgsrc.org@localhost>
date: Fri Feb 17 17:09:16 2017 +0000
description:
Replacement operators must not be declared inline. Bump revision.
diffstat:
math/amath/Makefile | 3 +-
math/amath/distinfo | 4 +-
math/amath/patches/patch-app_main.cpp | 50 ++++++++++++++++++++++++++++
math/amath/patches/patch-lib_platform.h | 58 +++++++++++++++++++++++++++++++++
4 files changed, 113 insertions(+), 2 deletions(-)
diffs (141 lines):
diff -r fc669e8d2f0e -r f29204b1d7d0 math/amath/Makefile
--- a/math/amath/Makefile Fri Feb 17 17:08:32 2017 +0000
+++ b/math/amath/Makefile Fri Feb 17 17:09:16 2017 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2017/01/30 19:49:26 leot Exp $
+# $NetBSD: Makefile,v 1.2 2017/02/17 17:09:16 joerg Exp $
DISTNAME= amath-1.6.2
+PKGREVISION= 1
CATEGORIES= math
MASTER_SITES= http://suyai.innolan.net/
diff -r fc669e8d2f0e -r f29204b1d7d0 math/amath/distinfo
--- a/math/amath/distinfo Fri Feb 17 17:08:32 2017 +0000
+++ b/math/amath/distinfo Fri Feb 17 17:09:16 2017 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.1 2017/01/30 19:49:26 leot Exp $
+$NetBSD: distinfo,v 1.2 2017/02/17 17:09:16 joerg Exp $
SHA1 (amath-1.6.2.tar.gz) = 9efdf46ddb70128d920abd92c20c65c3ef700f00
RMD160 (amath-1.6.2.tar.gz) = 101b5692ac6f77d0e05edff52736f4587b0313e2
SHA512 (amath-1.6.2.tar.gz) = f05691da9930a209224846a014a5cb19b5c7ea1ac0a5b73db5f74905f741d800b3b4ddf5df0a8caceed15b291bd327a6bb1ff72b68764c269fa08c1ed427390b
Size (amath-1.6.2.tar.gz) = 494838 bytes
+SHA1 (patch-app_main.cpp) = 52427c8a29cbe8f1c0157acbff48dc786baa88d8
+SHA1 (patch-lib_platform.h) = 0b97085d673cd2b077a0bcc5db8a4c253d7f0bea
diff -r fc669e8d2f0e -r f29204b1d7d0 math/amath/patches/patch-app_main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/math/amath/patches/patch-app_main.cpp Fri Feb 17 17:09:16 2017 +0000
@@ -0,0 +1,50 @@
+$NetBSD: patch-app_main.cpp,v 1.1 2017/02/17 17:09:17 joerg Exp $
+
+Replace operators must be global.
+
+--- app/main.cpp.orig 2017-02-17 12:12:18.536908981 +0000
++++ app/main.cpp
+@@ -27,6 +27,43 @@
+ #include "system/program.h"
+ #include "system/base/io.h"
+
++#if (__GNUC__ == 2 && __GNUC_MINOR__ == 95)
++void* operator new (size_t size) {
++ return AllocMemSafe(size);
++}
++
++void* operator new[] (size_t size) {
++ return AllocMemSafe(size);
++}
++
++void operator delete (void* ptr) {
++ FreeMemSafe(ptr);
++}
++
++void operator delete[] (void* ptr) {
++ FreeMemSafe(ptr);
++}
++#endif
++
++#if (__GNUC__ > 2) || defined (_WIN32)
++#include <new>
++void* operator new (size_t size) throw(std::bad_alloc) {
++ return AllocMemSafe(size);
++}
++
++void* operator new[] (size_t size) throw(std::bad_alloc) {
++ return AllocMemSafe(size);
++}
++
++void operator delete (void* ptr) throw() {
++ FreeMemSafe(ptr);
++}
++
++void operator delete[] (void* ptr) throw() {
++ FreeMemSafe(ptr);
++}
++#endif
++
+ int main(int argc, char **argv)
+ {
+ Program = CreateProgram(argc, argv);
diff -r fc669e8d2f0e -r f29204b1d7d0 math/amath/patches/patch-lib_platform.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/math/amath/patches/patch-lib_platform.h Fri Feb 17 17:09:16 2017 +0000
@@ -0,0 +1,58 @@
+$NetBSD: patch-lib_platform.h,v 1.1 2017/02/17 17:09:17 joerg Exp $
+
+Replace operators must be global.
+
+--- lib/platform.h.orig 2017-02-17 12:09:25.174210005 +0000
++++ lib/platform.h
+@@ -138,21 +138,10 @@ typedef u_int32_t uint32_t;
+ typedef u_int64_t uint64_t;
+ # define IPTR LONG*
+ #ifdef __cplusplus
+-inline void* operator new (size_t size) {
+- return AllocMemSafe(size);
+-}
+-
+-inline void* operator new[] (size_t size) {
+- return AllocMemSafe(size);
+-}
+-
+-inline void operator delete (void* ptr) {
+- FreeMemSafe(ptr);
+-}
+-
+-inline void operator delete[] (void* ptr) {
+- FreeMemSafe(ptr);
+-}
++void* operator new (size_t size);
++void* operator new[] (size_t size);
++void operator delete (void* ptr);
++void operator delete[] (void* ptr);
+ #endif
+ #endif
+
+@@ -164,21 +153,10 @@ inline void operator delete[] (void* pt
+ #ifdef __cplusplus
+ #if (__GNUC__ > 2) || defined (_WIN32)
+ #include <new>
+-inline void* operator new (size_t size) throw(std::bad_alloc) {
+- return AllocMemSafe(size);
+-}
+-
+-inline void* operator new[] (size_t size) throw(std::bad_alloc) {
+- return AllocMemSafe(size);
+-}
+-
+-inline void operator delete (void* ptr) throw() {
+- FreeMemSafe(ptr);
+-}
+-
+-inline void operator delete[] (void* ptr) throw() {
+- FreeMemSafe(ptr);
+-}
++void* operator new (size_t size) throw(std::bad_alloc);
++void* operator new[] (size_t size) throw(std::bad_alloc);
++void operator delete (void* ptr) throw();
++void operator delete[] (void* ptr) throw();
+ #endif
+ #endif
+
Home |
Main Index |
Thread Index |
Old Index