tags 455186 + patch thanks Hi!
Please find attached a patch to fix this bug. I have test build it with: $ g++-snapshot -v Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 20080224-1' --with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs --enable-languages=c,c++,java,fortran,objc,obj-c++,ada,treelang --prefix=/usr/lib/gcc-snapshot --enable-shared --with-system-zlib --disable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk --enable-gtk-cairo --disable-plugin --with-java-home=/usr/lib/gcc-snapshot/jre --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-mpfr --enable-targets=all --disable-werror --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.3.0 20080224 (prerelease) (Debian 20080224-1) HTH. Kumar -- Kumar Appaiah, 458, Jamuna Hostel, Indian Institute of Technology Madras, Chennai - 600 036
diff -Nru --exclude changelog /tmp/BYAO3mIDFO/necpp-1.2.6+cvs20070816/Python/PyNEC/wrap/src/c_geometry.cpp /tmp/eJ2YPZ7PAB/necpp-1.2.6+cvs20070816/Python/PyNEC/wrap/src/c_geometry.cpp --- necpp-1.2.6+cvs20070816/Python/PyNEC/wrap/src/c_geometry.cpp 2005-10-19 12:52:42.000000000 +0530 +++ necpp-1.2.6+cvs20070816/Python/PyNEC/wrap/src/c_geometry.cpp 2008-03-19 08:42:07.000000000 +0530 @@ -16,6 +16,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <cstdlib> #include "c_geometry.h" #include "nec_context.h" diff -Nru --exclude changelog /tmp/BYAO3mIDFO/necpp-1.2.6+cvs20070816/Python/PyNEC/wrap/src/c_ggrid.cpp /tmp/eJ2YPZ7PAB/necpp-1.2.6+cvs20070816/Python/PyNEC/wrap/src/c_ggrid.cpp --- necpp-1.2.6+cvs20070816/Python/PyNEC/wrap/src/c_ggrid.cpp 2005-10-19 12:52:42.000000000 +0530 +++ necpp-1.2.6+cvs20070816/Python/PyNEC/wrap/src/c_ggrid.cpp 2008-03-19 08:42:07.000000000 +0530 @@ -49,8 +49,8 @@ /* as previous point, old values are reused. */ if( (ix < ixeg) || (iy < iyeg) || - (abs(ix- ixs) >= 2) || - (abs(iy- iys) >= 2) || + (abs(double(ix- ixs)) >= 2) || + (abs(double(iy- iys)) >= 2) || (skip_recalculation == false) ) { /* determine correct grid and grid region */ diff -Nru --exclude changelog /tmp/BYAO3mIDFO/necpp-1.2.6+cvs20070816/Python/PyNEC/wrap/src/safe_array.h /tmp/eJ2YPZ7PAB/necpp-1.2.6+cvs20070816/Python/PyNEC/wrap/src/safe_array.h --- necpp-1.2.6+cvs20070816/Python/PyNEC/wrap/src/safe_array.h 2005-10-19 12:52:42.000000000 +0530 +++ necpp-1.2.6+cvs20070816/Python/PyNEC/wrap/src/safe_array.h 2008-03-19 08:42:07.000000000 +0530 @@ -21,6 +21,7 @@ #include <iostream> #include <string> #include <sstream> +#include <cstring> #ifdef NEC_ERROR_CHECK diff -Nru --exclude changelog /tmp/BYAO3mIDFO/necpp-1.2.6+cvs20070816/src/safe_array.h /tmp/eJ2YPZ7PAB/necpp-1.2.6+cvs20070816/src/safe_array.h --- necpp-1.2.6+cvs20070816/src/safe_array.h 2005-10-03 16:36:45.000000000 +0530 +++ necpp-1.2.6+cvs20070816/src/safe_array.h 2008-03-19 08:42:07.000000000 +0530 @@ -21,6 +21,7 @@ #include <iostream> #include <string> #include <sstream> +#include <cstring> #ifdef NEC_ERROR_CHECK
signature.asc
Description: Digital signature