Mercurial > hg > octave-lojdl
changeset 12046:efdc5df061b6 release-3-2-x
initialize floating point values properly for NetBSD systems
author | Aleksej Saushev <asau@inbox.ru> |
---|---|
date | Sat, 25 Jul 2009 16:21:51 +0200 |
parents | 42d51e66729b |
children | e929449b9b03 |
files | doc/ChangeLog doc/interpreter/contributors.in liboctave/ChangeLog liboctave/lo-ieee.cc src/ChangeLog src/sysdep.cc |
diffstat | 6 files changed, 23 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2009-07-20 John W. Eaton <jwe@octave.org> + + * interpreter/contributors.in: Add Aleksej Saushev. + 2009-07-21 Jaroslav Hajek <highegg@gmail.com> Version 3.2.2 released.
--- a/doc/interpreter/contributors.in +++ b/doc/interpreter/contributors.in @@ -183,6 +183,7 @@ Juhani Saastamoinen Radek Salac Ben Sapp +Aleksej Saushev Alois Schloegl Michel D. Schmid Julian Schnidder
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2009-07-20 John W. Eaton <jwe@octave.org> + + * lo-ieee.cc (octave_ieee_init) [__NetBSD__]: Call nan to + initialize Octave_NaN and nanf, to initialize Octave_Float_NaN. + 2009-07-08 John W. Eaton <jwe@octave.org> * dim-vector.h (dim_vector::dim_vector_rep::dim_vector_rep
--- a/liboctave/lo-ieee.cc +++ b/liboctave/lo-ieee.cc @@ -93,6 +93,8 @@ #if defined (__alpha__) && defined (__osf__) extern unsigned int DQNAN[2]; octave_NaN = (*(X_CAST(double *, DQNAN))); +#elif defined (__NetBSD__) + octave_NaN = nan (""); #else octave_NaN = tmp_inf / tmp_inf; // try to ensure that lo_ieee_sign gives false for a NaN. @@ -139,7 +141,11 @@ } #endif +#if defined (__NetBSD__) + octave_Float_NaN = nanf (""); +#else octave_Float_NaN = float_tmp_inf / float_tmp_inf; +#endif octave_Float_Inf = float_tmp_inf; lo_ieee_float tf;
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-07-20 Aleksej Saushev <asau@inbox.ru> + + * sysdep.cc: Also define BSD_init if __NetBSD__ is defined. + (sysdep_init): Also call BSD_init if __NetBSD__ is defined. + 2009-07-20 Jaroslav Hajek <highegg@gmail.com> * bitfcns.cc (DO_UBITSHIFT): Avoid overflow.
--- a/src/sysdep.cc +++ b/src/sysdep.cc @@ -95,7 +95,7 @@ #define STDIN_FILENO 1 #endif -#if defined (__386BSD__) || defined (__FreeBSD__) +#if defined (__386BSD__) || defined (__FreeBSD__) || defined (__NetBSD__) static void BSD_init (void) { @@ -300,7 +300,7 @@ void sysdep_init (void) { -#if defined (__386BSD__) || defined (__FreeBSD__) +#if defined (__386BSD__) || defined (__FreeBSD__) || defined(__NetBSD__) BSD_init (); #elif defined (__MINGW32__) MINGW_init ();