Mercurial > hg > octave-avbm
changeset 10447:12d25a1d84bf
Use gnulib headers instead of C++ std headers where needed.
author | David Grundberg <davidg@cs.umu.se> |
---|---|
date | Wed, 24 Mar 2010 17:27:58 +0100 |
parents | ba932ad87a04 |
children | f123146f1820 |
files | liboctave/ChangeLog liboctave/cmd-edit.cc liboctave/cmd-hist.cc liboctave/dir-ops.cc liboctave/file-ops.cc liboctave/file-stat.cc liboctave/lo-math.h liboctave/lo-utils.cc liboctave/oct-env.cc liboctave/oct-time.cc liboctave/oct-time.h liboctave/oct-uname.cc src/ChangeLog src/c-file-ptr-stream.cc src/input.cc src/mex.cc src/oct-fstrm.cc src/oct-parse.yy |
diffstat | 18 files changed, 47 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,18 @@ +2010-03-24 David Grundberg <davidg@cs.umu.se> + + * 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 <highegg@gmail.com> * Sparse.cc (lblookup): New helper func.
--- a/liboctave/cmd-edit.cc +++ b/liboctave/cmd-edit.cc @@ -25,8 +25,8 @@ #include <config.h> #endif -#include <cstdlib> -#include <cstring> +#include "stdlib.h" +#include "string.h" #include <string>
--- a/liboctave/cmd-hist.cc +++ b/liboctave/cmd-hist.cc @@ -25,7 +25,7 @@ #include <config.h> #endif -#include <cstring> +#include "string.h" #include <iostream> #include <string>
--- a/liboctave/dir-ops.cc +++ b/liboctave/dir-ops.cc @@ -30,6 +30,7 @@ #include <list> #include <string> +#include "string.h" #include "sysdir.h"
--- a/liboctave/file-ops.cc +++ b/liboctave/file-ops.cc @@ -26,9 +26,9 @@ #endif #include <cerrno> -#include <cstdio> -#include <cstdlib> -#include <cstring> +#include "stdio.h" +#include "stdlib.h" +#include "string.h" #include <iostream> #include <vector>
--- a/liboctave/file-stat.cc +++ b/liboctave/file-stat.cc @@ -26,7 +26,7 @@ #endif #include <cerrno> -#include <cstring> +#include "string.h" #include <sys/types.h> #include <unistd.h>
--- a/liboctave/lo-math.h +++ b/liboctave/lo-math.h @@ -24,13 +24,13 @@ #define octave_liboctave_math_h 1 #if defined (__cplusplus) -#include <cmath> +#include "math.h" // if #undef log2 is missing in cmath, undef it here #if defined (log2) #undef log2 #endif #else -#include <math.h> +#include "math.h" #endif #if defined (HAVE_SUNMATH_H)
--- a/liboctave/lo-utils.cc +++ b/liboctave/lo-utils.cc @@ -27,7 +27,7 @@ #endif #include <cctype> -#include <cstdlib> +#include "stdlib.h" #include <cstdio> #include <cstring>
--- a/liboctave/oct-env.cc +++ b/liboctave/oct-env.cc @@ -43,7 +43,7 @@ #include <cctype> #include <cstdlib> -#include <cstring> +#include "string.h" #include <string>
--- a/liboctave/oct-time.cc +++ b/liboctave/oct-time.cc @@ -25,7 +25,7 @@ #endif #include <climits> -#include <ctime> +#include "time.h" #include <sys/time.h> #include <sys/types.h>
--- a/liboctave/oct-time.h +++ b/liboctave/oct-time.h @@ -68,7 +68,7 @@ : ot_unix_time (static_cast<time_t> (d)), ot_usec (0) { double ip; - ot_usec = static_cast<int> (std::modf (d, &ip) * 1e6); + ot_usec = static_cast<int> (::modf (d, &ip) * 1e6); } octave_time (const octave_base_tm& tm);
--- a/liboctave/oct-uname.cc +++ b/liboctave/oct-uname.cc @@ -25,7 +25,7 @@ #endif #include <cerrno> -#include <cstring> +#include "string.h" #ifdef HAVE_SYS_UTSNAME_H #include <sys/utsname.h>
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2010-03-24 David Grundberg <davidg@cs.umu.se> + + * 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 <jwe@octave.org> * load-path.cc (load_path::add_to_fcn_map): Style fixes.
--- a/src/c-file-ptr-stream.cc +++ b/src/c-file-ptr-stream.cc @@ -26,6 +26,7 @@ #endif #include <iostream> +#include "stdio.h" #include "c-file-ptr-stream.h"
--- a/src/input.cc +++ b/src/input.cc @@ -27,7 +27,7 @@ #include <config.h> #endif -#include <cstdio> +#include "stdio.h" #include <cstdlib> #include <cstring> #include <cassert>
--- a/src/mex.cc +++ b/src/mex.cc @@ -25,7 +25,7 @@ #include <cfloat> #include <csetjmp> #include <cstdarg> -#include <cstdlib> +#include "stdlib.h" #include <cstring> #include <cctype>