# HG changeset patch # User David Grundberg # Date 1269448078 -3600 # Node ID 12d25a1d84bfbebe64d8deb3f21a334250ee85b7 # Parent ba932ad87a04d93e4571d78515ae04d42ea4eca3 Use gnulib headers instead of C++ std headers where needed. diff -r ba932ad87a04 -r 12d25a1d84bf liboctave/ChangeLog --- a/liboctave/ChangeLog Wed Mar 24 09:53:14 2010 -0400 +++ b/liboctave/ChangeLog Wed Mar 24 17:27:58 2010 +0100 @@ -1,3 +1,18 @@ +2010-03-24 David Grundberg + + * cmd-edit.cc: Include gnulib stdlib.h/string.h instead of C++ + headers. + * file-ops.cc: Include gnulib stdlib.h/stdio.h/string.h instead of + C++ headers. + * lo-math.h: Include gnulib math.h instead of C++ headers. + * lo-utils.cc: Include gnulib stdlib.h instead of C++ headers. + * oct-env.cc, dir-ops.cc, file-stat.cc, cmd-hist.cc: Include + gnulib string.h instead of C++ headers. + * oct-time.cc: Include gnulib time.h instead of C++ headers. + * oct-time.h (octave_time): Use default namespace ::modf instead + of std::modf. + * oct-uname.cc: Include gnulib string.h instead of C++ headers. + 2010-03-24 Jaroslav Hajek * Sparse.cc (lblookup): New helper func. diff -r ba932ad87a04 -r 12d25a1d84bf liboctave/cmd-edit.cc --- a/liboctave/cmd-edit.cc Wed Mar 24 09:53:14 2010 -0400 +++ b/liboctave/cmd-edit.cc Wed Mar 24 17:27:58 2010 +0100 @@ -25,8 +25,8 @@ #include #endif -#include -#include +#include "stdlib.h" +#include "string.h" #include diff -r ba932ad87a04 -r 12d25a1d84bf liboctave/cmd-hist.cc --- a/liboctave/cmd-hist.cc Wed Mar 24 09:53:14 2010 -0400 +++ b/liboctave/cmd-hist.cc Wed Mar 24 17:27:58 2010 +0100 @@ -25,7 +25,7 @@ #include #endif -#include +#include "string.h" #include #include diff -r ba932ad87a04 -r 12d25a1d84bf liboctave/dir-ops.cc --- a/liboctave/dir-ops.cc Wed Mar 24 09:53:14 2010 -0400 +++ b/liboctave/dir-ops.cc Wed Mar 24 17:27:58 2010 +0100 @@ -30,6 +30,7 @@ #include #include +#include "string.h" #include "sysdir.h" diff -r ba932ad87a04 -r 12d25a1d84bf liboctave/file-ops.cc --- a/liboctave/file-ops.cc Wed Mar 24 09:53:14 2010 -0400 +++ b/liboctave/file-ops.cc Wed Mar 24 17:27:58 2010 +0100 @@ -26,9 +26,9 @@ #endif #include -#include -#include -#include +#include "stdio.h" +#include "stdlib.h" +#include "string.h" #include #include diff -r ba932ad87a04 -r 12d25a1d84bf liboctave/file-stat.cc --- a/liboctave/file-stat.cc Wed Mar 24 09:53:14 2010 -0400 +++ b/liboctave/file-stat.cc Wed Mar 24 17:27:58 2010 +0100 @@ -26,7 +26,7 @@ #endif #include -#include +#include "string.h" #include #include diff -r ba932ad87a04 -r 12d25a1d84bf liboctave/lo-math.h --- a/liboctave/lo-math.h Wed Mar 24 09:53:14 2010 -0400 +++ b/liboctave/lo-math.h Wed Mar 24 17:27:58 2010 +0100 @@ -24,13 +24,13 @@ #define octave_liboctave_math_h 1 #if defined (__cplusplus) -#include +#include "math.h" // if #undef log2 is missing in cmath, undef it here #if defined (log2) #undef log2 #endif #else -#include +#include "math.h" #endif #if defined (HAVE_SUNMATH_H) diff -r ba932ad87a04 -r 12d25a1d84bf liboctave/lo-utils.cc --- a/liboctave/lo-utils.cc Wed Mar 24 09:53:14 2010 -0400 +++ b/liboctave/lo-utils.cc Wed Mar 24 17:27:58 2010 +0100 @@ -27,7 +27,7 @@ #endif #include -#include +#include "stdlib.h" #include #include diff -r ba932ad87a04 -r 12d25a1d84bf liboctave/oct-env.cc --- a/liboctave/oct-env.cc Wed Mar 24 09:53:14 2010 -0400 +++ b/liboctave/oct-env.cc Wed Mar 24 17:27:58 2010 +0100 @@ -43,7 +43,7 @@ #include #include -#include +#include "string.h" #include diff -r ba932ad87a04 -r 12d25a1d84bf liboctave/oct-time.cc --- a/liboctave/oct-time.cc Wed Mar 24 09:53:14 2010 -0400 +++ b/liboctave/oct-time.cc Wed Mar 24 17:27:58 2010 +0100 @@ -25,7 +25,7 @@ #endif #include -#include +#include "time.h" #include #include diff -r ba932ad87a04 -r 12d25a1d84bf liboctave/oct-time.h --- a/liboctave/oct-time.h Wed Mar 24 09:53:14 2010 -0400 +++ b/liboctave/oct-time.h Wed Mar 24 17:27:58 2010 +0100 @@ -68,7 +68,7 @@ : ot_unix_time (static_cast (d)), ot_usec (0) { double ip; - ot_usec = static_cast (std::modf (d, &ip) * 1e6); + ot_usec = static_cast (::modf (d, &ip) * 1e6); } octave_time (const octave_base_tm& tm); diff -r ba932ad87a04 -r 12d25a1d84bf liboctave/oct-uname.cc --- a/liboctave/oct-uname.cc Wed Mar 24 09:53:14 2010 -0400 +++ b/liboctave/oct-uname.cc Wed Mar 24 17:27:58 2010 +0100 @@ -25,7 +25,7 @@ #endif #include -#include +#include "string.h" #ifdef HAVE_SYS_UTSNAME_H #include diff -r ba932ad87a04 -r 12d25a1d84bf src/ChangeLog --- a/src/ChangeLog Wed Mar 24 09:53:14 2010 -0400 +++ b/src/ChangeLog Wed Mar 24 17:27:58 2010 +0100 @@ -1,3 +1,13 @@ +2010-03-24 David Grundberg + + * oct-parse.yy: Include gnulib stdlib.h/stdio.h instead of C++ + headers. + * oct-fstrm.cc: Include gnulib stdlib.h/string.h instead of C++ + headers. + * mex.cc: Include gnulib stdlib.h instead of C++ headers. + * input.cc: Include gnulib stdio.h instead of C++ headers. + * c-file-ptr-stream.cc: Include gnulib stdio.h. + 2010-03-24 John W. Eaton * load-path.cc (load_path::add_to_fcn_map): Style fixes. diff -r ba932ad87a04 -r 12d25a1d84bf src/c-file-ptr-stream.cc --- a/src/c-file-ptr-stream.cc Wed Mar 24 09:53:14 2010 -0400 +++ b/src/c-file-ptr-stream.cc Wed Mar 24 17:27:58 2010 +0100 @@ -26,6 +26,7 @@ #endif #include +#include "stdio.h" #include "c-file-ptr-stream.h" diff -r ba932ad87a04 -r 12d25a1d84bf src/input.cc --- a/src/input.cc Wed Mar 24 09:53:14 2010 -0400 +++ b/src/input.cc Wed Mar 24 17:27:58 2010 +0100 @@ -27,7 +27,7 @@ #include #endif -#include +#include "stdio.h" #include #include #include diff -r ba932ad87a04 -r 12d25a1d84bf src/mex.cc --- a/src/mex.cc Wed Mar 24 09:53:14 2010 -0400 +++ b/src/mex.cc Wed Mar 24 17:27:58 2010 +0100 @@ -25,7 +25,7 @@ #include #include #include -#include +#include "stdlib.h" #include #include diff -r ba932ad87a04 -r 12d25a1d84bf src/oct-fstrm.cc --- a/src/oct-fstrm.cc Wed Mar 24 09:53:14 2010 -0400 +++ b/src/oct-fstrm.cc Wed Mar 24 17:27:58 2010 +0100 @@ -26,7 +26,8 @@ #endif #include -#include +#include "string.h" +#include "stdlib.h" #include "error.h" #include "oct-fstrm.h" diff -r ba932ad87a04 -r 12d25a1d84bf src/oct-parse.yy --- a/src/oct-parse.yy Wed Mar 24 09:53:14 2010 -0400 +++ b/src/oct-parse.yy Wed Mar 24 17:27:58 2010 +0100 @@ -34,8 +34,8 @@ #endif #include -#include -#include +#include "stdio.h" +#include "stdlib.h" #include #include