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	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  <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	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 <config.h>
 #endif
 
-#include <cstdlib>
-#include <cstring>
+#include "stdlib.h"
+#include "string.h"
 
 #include <string>
 
--- 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 <config.h>
 #endif
 
-#include <cstring>
+#include "string.h"
 
 #include <iostream>
 #include <string>
--- 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 <list>
 #include <string>
+#include "string.h"
 
 #include "sysdir.h"
 
--- 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 <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	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 <cerrno>
-#include <cstring>
+#include "string.h"
 
 #include <sys/types.h>
 #include <unistd.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 <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	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 <cctype>
-#include <cstdlib>
+#include "stdlib.h"
 #include <cstdio>
 #include <cstring>
 
--- 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 <cctype>
 #include <cstdlib>
-#include <cstring>
+#include "string.h"
 
 #include <string>
 
--- 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 <climits>
-#include <ctime>
+#include "time.h"
 
 #include <sys/time.h>
 #include <sys/types.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<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	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 <cerrno>
-#include <cstring>
+#include "string.h"
 
 #ifdef HAVE_SYS_UTSNAME_H
 #include <sys/utsname.h>
--- 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  <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	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 <iostream>
+#include "stdio.h"
 
 #include "c-file-ptr-stream.h"
 
--- 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 <config.h>
 #endif
 
-#include <cstdio>
+#include "stdio.h"
 #include <cstdlib>
 #include <cstring>
 #include <cassert>
--- 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 <cfloat>
 #include <csetjmp>
 #include <cstdarg>
-#include <cstdlib>
+#include "stdlib.h"
 #include <cstring>
 #include <cctype>
 
--- 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 <cerrno>
-#include <cstring>
+#include "string.h"
+#include "stdlib.h"
 
 #include "error.h"
 #include "oct-fstrm.h"
--- 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 <cassert>
-#include <cstdio>
-#include <cstdlib>
+#include "stdio.h"
+#include "stdlib.h"
 
 #include <iostream>
 #include <map>