File octave-forge-parallel-build-with-octave5.patch of Package octave-forge-parallel
diff --git a/src/configure.ac b/src/configure.ac
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -272,7 +272,7 @@
[dnl
[oct_mach_info],
[octave::mach_info],
- [[std::cout << octave::mach_info::flt_fmt_unknown;]],
+ [[int f = octave::mach_info::flt_fmt_unknown;]],
[OCTAVE__MACH_INFO],
[],
[]
@@ -378,15 +378,6 @@
],
[dnl
- [eval_string],
- [octave::eval_string],
- [[int p_err; octave::eval_string ("date", false, p_err, 0);]],
- [OCTAVE__EVAL_STRING],
- [[#include <octave/parse.h>]],
- [[#include <octave/parse.h>]]
-],
-
-[dnl
[file_stat],
[octave::sys::file_stat],
[[octave::sys::file_stat ();]],
@@ -402,6 +393,35 @@
[ADD_OCTAVE__INTERPRETER__CALL_STACK__POP],
[],
[]
+],
+
+[dnl
+ [octave_vformat],
+ [octave::vformat],
+ [[std::ostringstream obuf;]
+ [va_list args;]
+ [octave::vformat (obuf, "dummy", args);]],
+ [OCTAVE__VFORMAT],
+ [],
+ []
+],
+
+[dnl
+ [command_editor],
+ [octave::command_editor],
+ [[octave::command_editor::increment_current_command_number ();]],
+ [OCTAVE__COMMAND_EDITOR],
+ [[#include <octave/cmd-edit.h>]],
+ [[#include <octave/cmd-edit.h>]]
+],
+
+[dnl
+ [octave_env],
+ [octave::sys::env],
+ [[octave::sys::env::get_current_directory ();]],
+ [OCTAVE__SYS__ENV],
+ [[#include <octave/oct-env.h>]],
+ [[#include <octave/oct-env.h>]]
]
],
@@ -419,6 +439,27 @@
[AC_MSG_RESULT([no])]
)
+AC_MSG_CHECKING([for eval_string])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <octave/oct.h>]],
+ [std::string cmd ("date"); int p_err; octave::interpreter::the_interpreter () -> eval_string (cmd, false, p_err, 0);])],
+ [AC_DEFINE([OCTAVE__EVAL_STRING], [octave::interpreter::the_interpreter () -> eval_string],
+ [macro for alternatives to octave::eval_string])
+ AC_MSG_RESULT([octave::interpreter::eval_string])],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <octave/oct.h>]
+ [#include <octave/parse.h>]],
+ [int p_err; octave::eval_string ("date", false, p_err, 0);])],
+ [AC_DEFINE([OCTAVE__EVAL_STRING], [octave::eval_string],
+ [macro for alternatives to octave::eval_string])
+ AC_MSG_RESULT([octave::eval_string])
+ echo '#include <octave/parse.h>' >> oct-alt-includes.h],
+ [AC_DEFINE([OCTAVE__EVAL_STRING], [eval_string],
+ [macro for alternatives to octave::eval_string])
+ AC_MSG_RESULT([eval_string])
+ echo '#include <octave/parse.h>' >> oct-alt-includes.h])]
+)
+
LIBS=$TLIBS
LDFLAGS=$TLDFLAGS
CXXFLAGS=$TCXXFLAGS
diff --git a/src/error-helpers.cc b/src/error-helpers.cc
--- a/src/error-helpers.cc
+++ b/src/error-helpers.cc
@@ -50,7 +50,7 @@
std::ostringstream output_buf;
- octave_vformat (output_buf, fmt, args);
+ OCTAVE__VFORMAT (output_buf, fmt, args);
std::string msg = output_buf.str ();
diff --git a/src/error-helpers.h b/src/error-helpers.h
--- a/src/error-helpers.h
+++ b/src/error-helpers.h
@@ -19,6 +19,8 @@
#include "config.h"
+#include <iostream>
+
// Octaves non-static verror functions: The elder all set error_state,
// the newer, present from the time on at which error started to throw
// an exception, all throw, too.
diff --git a/src/pconnect.cc b/src/pconnect.cc
--- a/src/pconnect.cc
+++ b/src/pconnect.cc
@@ -25,8 +25,6 @@
#include "config.h"
-#include <octave/oct-env.h>
-
#include <sys/socket.h>
#include <errno.h>
#include <netdb.h>
@@ -533,7 +531,7 @@
dcprintf ("hostname %i written (%s)\n", j, hosts(j).c_str ());
}
- std::string directory = octave_env::get_current_directory ();
+ std::string directory = OCTAVE__SYS__ENV::get_current_directory ();
conn->get_cmd_stream ()->network_send_string (directory.c_str ());
dcprintf ("directory written (%s)\n", directory.c_str ());
diff --git a/src/pserver.cc b/src/pserver.cc
--- a/src/pserver.cc
+++ b/src/pserver.cc
@@ -25,11 +25,9 @@
#include "config.h"
-#include <octave/oct-env.h>
#include <octave/file-io.h>
#include <octave/sighandlers.h>
#include <octave/parse.h>
-#include <octave/cmd-edit.h>
#include <sys/socket.h>
#include <sys/types.h>
@@ -169,7 +167,7 @@
if (octave_completion_matches_called)
octave_completion_matches_called = false;
else
- command_editor::increment_current_command_number ();
+ OCTAVE__COMMAND_EDITOR::increment_current_command_number ();
dsprintf ("reval loop, no error, after caring for Octave command number\n");
}
}
@@ -1116,10 +1114,10 @@
OCTAVE__INTERPRETER__SYMBOL_TABLE__ASSIGN ("sockets", sockets);
dsprintf ("'sockets' installed\n");
- int cd_ok = octave_env::chdir (directory.c_str ());
+ int cd_ok = OCTAVE__SYS__ENV::chdir (directory.c_str ());
if (! cd_ok)
{
- octave_env::chdir ("/tmp");
+ OCTAVE__SYS__ENV::chdir ("/tmp");
dsprintf ("performed chdir to /tmp\n");
}
else