pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/math/amath



Module Name:    pkgsrc
Committed By:   joerg
Date:           Fri Feb 17 17:09:17 UTC 2017

Modified Files:
        pkgsrc/math/amath: Makefile distinfo
Added Files:
        pkgsrc/math/amath/patches: patch-app_main.cpp patch-lib_platform.h

Log Message:
Replacement operators must not be declared inline. Bump revision.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/math/amath/Makefile \
    pkgsrc/math/amath/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/math/amath/patches/patch-app_main.cpp \
    pkgsrc/math/amath/patches/patch-lib_platform.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/math/amath/Makefile
diff -u pkgsrc/math/amath/Makefile:1.1 pkgsrc/math/amath/Makefile:1.2
--- pkgsrc/math/amath/Makefile:1.1      Mon Jan 30 19:49:26 2017
+++ pkgsrc/math/amath/Makefile  Fri Feb 17 17:09:16 2017
@@ -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/
 
Index: pkgsrc/math/amath/distinfo
diff -u pkgsrc/math/amath/distinfo:1.1 pkgsrc/math/amath/distinfo:1.2
--- pkgsrc/math/amath/distinfo:1.1      Mon Jan 30 19:49:26 2017
+++ pkgsrc/math/amath/distinfo  Fri Feb 17 17:09:16 2017
@@ -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

Added files:

Index: pkgsrc/math/amath/patches/patch-app_main.cpp
diff -u /dev/null pkgsrc/math/amath/patches/patch-app_main.cpp:1.1
--- /dev/null   Fri Feb 17 17:09:17 2017
+++ pkgsrc/math/amath/patches/patch-app_main.cpp        Fri Feb 17 17:09:17 2017
@@ -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);
Index: pkgsrc/math/amath/patches/patch-lib_platform.h
diff -u /dev/null pkgsrc/math/amath/patches/patch-lib_platform.h:1.1
--- /dev/null   Fri Feb 17 17:09:17 2017
+++ pkgsrc/math/amath/patches/patch-lib_platform.h      Fri Feb 17 17:09:17 2017
@@ -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