Browse Source

Fix FTBFS with gpsim >= 0.27

tags/r14.0.0
Slávek Banko 7 years ago
parent
commit
109b2aa3a9
4 changed files with 42 additions and 1 deletions
  1. +3
    -0
      config.h.in
  2. +16
    -0
      configure.in
  3. +16
    -0
      configure.in.in
  4. +7
    -1
      src/electronics/gpsimprocessor.cpp

+ 3
- 0
config.h.in View File

@@ -9,6 +9,9 @@
/* Gpsim 0.21.4 was found */
#undef GPSIM_0_21_4

/* Gpsim 0.27.0 was found */
#undef GPSIM_0_27_0

/* Define to 1 if you have the <Carbon/Carbon.h> header file. */
#undef HAVE_CARBON_CARBON_H



+ 16
- 0
configure.in View File

@@ -131,6 +131,18 @@ AC_TRY_COMPILE(
AC_MSG_RESULT( no )
)

AC_MSG_CHECKING([for gpsim 0.27.0 availability])
AC_TRY_COMPILE(
[
#include <gpsim/pic-processor.h>
void func() { pic_processor *Processor; sizeof(Processor->Wreg); }
],
[],
AC_MSG_RESULT( yes )
have_gpsim_0_27_0=yes,
AC_MSG_RESULT( no )
)

CXXFLAGS="$ktechlab_save_CXXFLAGS"
AC_LANG_RESTORE

@@ -199,6 +211,10 @@ if test x$have_gpsim_0_21_4 == xyes || test x$have_gpsim_0_21_11 == xyes || test
LIBS="$ac_save_LIBS"
fi

if test x$have_gpsim_0_27_0 == xyes; then
AC_DEFINE([GPSIM_0_27_0],[],[Gpsim 0.27.0 was found])
fi

AC_SUBST(LIB_GPSIM)

##############################


+ 16
- 0
configure.in.in View File

@@ -68,6 +68,18 @@ AC_TRY_COMPILE(
AC_MSG_RESULT( no )
)

AC_MSG_CHECKING([for gpsim 0.27.0 availability])
AC_TRY_COMPILE(
[
#include <gpsim/pic-processor.h>
void func() { pic_processor *Processor; sizeof(Processor->Wreg); }
],
[],
AC_MSG_RESULT( yes )
have_gpsim_0_27_0=yes,
AC_MSG_RESULT( no )
)

CXXFLAGS="$ktechlab_save_CXXFLAGS"
AC_LANG_RESTORE

@@ -136,6 +148,10 @@ if test x$have_gpsim_0_21_4 == xyes || test x$have_gpsim_0_21_11 == xyes || test
LIBS="$ac_save_LIBS"
fi

if test x$have_gpsim_0_27_0 == xyes; then
AC_DEFINE([GPSIM_0_27_0],[],[Gpsim 0.27.0 was found])
fi

AC_SUBST(LIB_GPSIM)

##############################


+ 7
- 1
src/electronics/gpsimprocessor.cpp View File

@@ -736,7 +736,13 @@ RegisterSet::RegisterSet( pic_processor * picProcessor )
m_nameToRegisterMap[ info->name() ] = info;
}
RegisterInfo * info = new RegisterInfo( picProcessor->W );
RegisterInfo * info = new RegisterInfo(
#ifdef GPSIM_0_27_0
picProcessor->Wreg
#else
picProcessor->W
#endif
);
m_registers.append( info );
m_nameToRegisterMap[ info->name() ] = info;
}


Loading…
Cancel
Save