Skip to content

Commit

Permalink
Fix compilation under cygwin and for octave 3.4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed Nov 11, 2011
1 parent 64569cd commit 2f2a895
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/configure
Expand Up @@ -323,7 +323,7 @@ EOF
do
if cc_check
then
cc_name_tmp=$($COMP_C -v 2>&1 | tail -n 1 | cut -d ' ' -f 1)
cc_name_tmp=$($COMP_C -v 2>&1 | tail -n 1 | tr 'A-Z-' 'a-z ' | cut -d ' ' -f 1)
if test "$cc_name_tmp" = "gcc"; then
cc_vendor=gnu
cc_name=$cc_name_tmp
Expand Down Expand Up @@ -401,7 +401,7 @@ EOF
do
if cxx_check
then
cxx_name_tmp=$($COMP_CPP -v 2>&1 | tail -n 1 | cut -d ' ' -f 1)
cxx_name_tmp=$($COMP_CPP -v 2>&1 | tail -n 1 | tr 'A-Z-' 'a-z ' | cut -d ' ' -f 1)
if test "$cxx_name_tmp" = "gcc"; then
cxx_vendor=gnu
cxx_name=$cxx_name_tmp
Expand Down Expand Up @@ -2952,6 +2952,9 @@ check_hdf5()
then
_cflags="`get_cflags '' libhdf5 hdf5`"
_lflags="`get_lflags '-lhdf5' libhdf5 hdf5`"


test -z "$_lflags" || _lflags="-lhdf5"
cat > $TMPC << EOF
#include <hdf5.h>
int main(void)
Expand Down Expand Up @@ -3775,7 +3778,7 @@ test_modular()

if cygwin
then
POSTLINKFLAGS=$LINKFLAGS
POSTLINKFLAGS="$POSTLINKFLAGS $LINKFLAGS"
fi
else
echores "`echo $_swig_version` ... too old version 1.3.29 or later required"
Expand Down Expand Up @@ -4233,7 +4236,7 @@ EOF

if test "$_octave" = yes
then
OCTAVE_APIVERSION=`octave-config -p API_VERSION | tr -d 'a-z-'`
OCTAVE_APIVERSION=`octave-config -p API_VERSION | tr -d 'a-z-+'`
DEFINES_OCTAVE="$DEFINES_OCTAVE -DHAVE_OCTAVE -DOCTAVE_APIVERSION=${OCTAVE_APIVERSION}"

if test "$_octave_static" != no
Expand Down
6 changes: 5 additions & 1 deletion src/interfaces/octave_static/OctaveInterface.cpp
Expand Up @@ -601,7 +601,9 @@ bool COctaveInterface::cmd_run_r()

void COctaveInterface::recover_from_exception(void)
{
#if OCTAVE_APIVERSION < 37
unwind_protect::run_all ();
#endif
can_interrupt = true;
octave_interrupt_immediately = 0;
octave_interrupt_state = 0;
Expand Down Expand Up @@ -654,7 +656,9 @@ bool COctaveInterface::run_octave_helper(CSGInterface* from_if)
#if defined (USE_EXCEPTIONS_FOR_INTERRUPTS)
panic_impossible ();
#else
#if OCTAVE_APIVERSION < 37
unwind_protect::run_all ();
#endif
raw_mode (0);
octave_restore_signal_mask ();
#endif
Expand Down Expand Up @@ -728,7 +732,7 @@ bool COctaveInterface::run_octave_helper(CSGInterface* from_if)

if (sz>0)
{
if (results(0).is_list())
if (results(0).is_cs_list())
{
from_if->SG_DEBUG("Found return list of length %d\n", results(0).length());
results=results(0).list_value();
Expand Down

0 comments on commit 2f2a895

Please sign in to comment.