From d46f1ad41d63b49a39c6616a9918a29cbc1755e4 Mon Sep 17 00:00:00 2001 From: borutr Date: Mon, 31 Jul 2006 16:27:32 +0000 Subject: [PATCH] * sim/ucsim/configure, sim/ucsim/cmd.src/newcmdcl.h, sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/z80.src/Makefile.in, sim/ucsim/configure.in, sim/ucsim/hc08.src/Makefile.in, sim/ucsim/hc08.src/hc08.cc, sim/ucsim/ddconfig_in.h, sim/ucsim/s51.src/Makefile.in, sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/serialcl.h, sim/ucsim/s51.src/uc51.cc, sim/ucsim/s51.src/serial.cc, sim/ucsim/app.cc, sim/ucsim/avr.src/Makefile.in: enable ucsim mingw compilation. Serial port is disabled, since it uses termios.h API, which is not available on native WIN32 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4314 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 182 ++++++----- sim/ucsim/app.cc | 7 +- sim/ucsim/avr.src/Makefile.in | 2 +- sim/ucsim/cmd.src/cmdutil.cc | 13 +- sim/ucsim/cmd.src/newcmd.cc | 23 +- sim/ucsim/cmd.src/newcmdcl.h | 2 +- sim/ucsim/configure | 573 +++++++++++++++++++++++++++++++-- sim/ucsim/configure.in | 121 +++++-- sim/ucsim/ddconfig_in.h | 9 +- sim/ucsim/hc08.src/Makefile.in | 2 +- sim/ucsim/hc08.src/hc08.cc | 169 +++++----- sim/ucsim/s51.src/Makefile.in | 10 +- sim/ucsim/s51.src/serial.cc | 4 + sim/ucsim/s51.src/serialcl.h | 2 + sim/ucsim/s51.src/uc51.cc | 8 +- sim/ucsim/s51.src/uc51cl.h | 2 + sim/ucsim/z80.src/Makefile.in | 2 +- 17 files changed, 861 insertions(+), 270 deletions(-) diff --git a/ChangeLog b/ChangeLog index 71ca2671..56ce439f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2006-07-31 Borut Razem + + * sim/ucsim/configure, sim/ucsim/cmd.src/newcmdcl.h, + sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/cmdutil.cc, + sim/ucsim/z80.src/Makefile.in, sim/ucsim/configure.in, + sim/ucsim/hc08.src/Makefile.in, sim/ucsim/hc08.src/hc08.cc, + sim/ucsim/ddconfig_in.h, sim/ucsim/s51.src/Makefile.in, + sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/serialcl.h, + sim/ucsim/s51.src/uc51.cc, sim/ucsim/s51.src/serial.cc, + sim/ucsim/app.cc, sim/ucsim/avr.src/Makefile.in: + enable ucsim mingw compilation. Serial port is disabled, + since it uses termios.h API, which is not available on native + WIN32 + 2006-07-31 Borut Razem * Small Device C Compiler 2.6.0 released @@ -6,7 +20,7 @@ 2006-07-28 Borut Razem - * support/scripts/sdcc.nsi: remove $INSTDIR\include\asm\pic16\*.h + * support/scripts/sdcc.nsi: remove $INSTDIR/include/asm/pic16/*.h * doc/INSTALL.txt: updated 2006-07-27 Borut Razem @@ -191,7 +205,7 @@ 2006-06-25 Borut Razem * device/lib/pic16/libc/stdio/sprintf.c: return the number of - characters printed (not including the trailing '\0' used to end + characters printed (not including the trailing '/0' used to end output to strings). Problem detected in regression test bug-927659.c. NOTE: printf() family functions should return int instead unsigned int! @@ -991,7 +1005,7 @@ * as/mcs51/lkhead.c (newhead): head is absolute but not overlay * as/hc08/lklibr.c (addfile, fndsym), * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent - index out of range and detect both '\' and '/' + index out of range and detect both '/' and '/' * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment * device/include/stdbool.h: removed SDCC_ds390 from check to pass regression tests (ds390 cannot return bool yet) @@ -1054,8 +1068,8 @@ 2006-04-18 Borut Razem - * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o, - ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc + * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}/lib/pic/*.o, + ${DEV_ROOT}/lib/src/pic/libdev/*.S, ${DEV_ROOT}/lib/src/pic/libdev/*.inc 2006-04-17 Borut Razem @@ -2992,7 +3006,7 @@ 2005-06-20 Slade Rich - * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n" + * src/pic/pcode.c : Fixed problem when a string constant contains a "/r/n" and the output asm file line is printed on two lines. 2005-06-19 Erik Petrich @@ -3037,20 +3051,20 @@ 2005-05-26 Raphael Neider * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string - initializers with \0, bug #1208187 + initializers with /0, bug #1208187 * src/pic/glue.c (printIvalChar): fixed (non- and constant) string - intializers with \0, bug #1208187 + intializers with /0, bug #1208187 2005-05-26 Raphael Neider * src/pic16/glue.c (pic16_printIvalChar): fixed string - initializers with \0, bug #1208187 + initializers with /0, bug #1208187 * src/pic16/main.c (_process_pragma): added sanity checks for stack position and size, emit warnings when appropriate 2005-05-26 Maarten Brock - * device/lib/_strncpy.c: fixed not filling with \0 + * device/lib/_strncpy.c: fixed not filling with /0 2005-05-26 Erik Petrich @@ -3253,7 +3267,7 @@ (findNextInstruction), (findPrevInstruction), (findInstructionUsingLabel), src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized - * src/pic/pcode.c (findLabel): added missing '\n' + * src/pic/pcode.c (findLabel): added missing '/n' * src/src.dsp: added SDCCdwarf2.c to the project 2005-04-09 Borut Razem @@ -3837,7 +3851,7 @@ to memccpy(void *, void *, char, size_t) * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to check whether to omit frame pointer or not, - * (genInline): convert all occurences of "\n" to LF in inline + * (genInline): convert all occurences of "/n" to LF in inline assembler blocks, this helps formatting the inline text, * (pic16_loadFSR0): modified prototype, * (genNearPointerGet, genNearPointerSet): reorganization of code, @@ -5601,8 +5615,8 @@ 2004-08-04 Jesus Calvino-Fraga - * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs - such as c:\mydir. + * src/mcs51/gen.c (genInline): Add /n for labels, not DOS/WIN dirs + such as c:/mydir. 2004-08-03 Maarten Brock @@ -5666,7 +5680,7 @@ _memcmp.c _memmove.c calloc.c realloc.c free.c * support/regression/tests/malloc.c: added tests for new functionality * support/regression/tests/zeropad.c: added tests for truncated initializers - and initialized char arrays starting with '\x0' + and initialized char arrays starting with '/x0' * src/mcs51/peeph.def: fixed regression, added peephole 177.f 2004-07-26 Bernhard Held @@ -5844,7 +5858,7 @@ a member of a specific memory bank, * (pic16_printIvalCharPtr): added code to add string literals either to code or the idata sections, - * src/pic16/main.c (_process_pragma): added \n to WHITE constant, + * src/pic16/main.c (_process_pragma): added /n to WHITE constant, also accept the 'udata' pragma, * src/pic16/main.h: new structure types sectName and sectSym * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL @@ -8473,7 +8487,7 @@ 2003-10-31 Borut Razem - * support\cpp2\cpplex.c: fixed for SDCPP: + * support/cpp2/cpplex.c: fixed for SDCPP: comments(when executed with -C option) and _asm blocks were included even if they where in skipped #if block. Applied solution from GCC cpp 3.3.2 @@ -9215,20 +9229,20 @@ Fixed some warnings when building with MSVC: - * as\mcs51\asdata.c - * as\z80\asdata.c - * as\mcs51\asm.h - * as\z80\asm.h - * link\z80\aslink.h - * link\z80\lkdata.c - * link\z80\lkeval.c - * link\z80\lkgb.c - * link\z80\lkihx.c - * link\z80\lks19.c - * link\z80\lksym.c - * support\cpp2\cpplib.c - * src\ds390\gen.c - * src\mcs51\gen.c + * as/mcs51/asdata.c + * as/z80/asdata.c + * as/mcs51/asm.h + * as/z80/asm.h + * link/z80/aslink.h + * link/z80/lkdata.c + * link/z80/lkeval.c + * link/z80/lkgb.c + * link/z80/lkihx.c + * link/z80/lks19.c + * link/z80/lksym.c + * support/cpp2/cpplib.c + * src/ds390/gen.c + * src/mcs51/gen.c 2003-08-03 Bernhard Held @@ -9236,21 +9250,21 @@ 2003-08-01 Jesus Calvino-Fraga - * support\librarian\clean.mk: Do not remove Makefile. - * support\librarian\Makefile: added. + * support/librarian/clean.mk: Do not remove Makefile. + * support/librarian/Makefile: added. 2003-08-01 Jesus Calvino-Fraga Added librarian to MSVC build: * all.dsp * sdcc.dsw - * support\librarian\librarian.dsp + * support/librarian/librarian.dsp 'configure' not needed for librarian, removed: - * support\librarian\configure - * support\librarian\configure.in - * support\librarian\config_in.h - * support\librarian\Makefile.in + * support/librarian/configure + * support/librarian/configure.in + * support/librarian/config_in.h + * support/librarian/Makefile.in Hopefully these ones built the librarian and the rest of sdcc properly: * Makefile @@ -9270,13 +9284,13 @@ Adding sdcclib to the build. MSVC project coming soon. Files added/changed: - * support\librarian\clean.mk - * support\librarian\configure - * support\librarian\configure.in - * support\librarian\config_in.h - * support\librarian\Makefile.bcc - * support\librarian\Makefile.in - * support\librarian\sdcclib.c + * support/librarian/clean.mk + * support/librarian/configure + * support/librarian/configure.in + * support/librarian/config_in.h + * support/librarian/Makefile.bcc + * support/librarian/Makefile.in + * support/librarian/sdcclib.c * Makefile.bcc * Makefile * Makefile.common.in @@ -9289,25 +9303,25 @@ example, one compiled using --model-large and another one compiled with --model-small. The following files were modified: - * as\mcs51\asdata.c - * as\mcs51\aslink.h - * as\mcs51\asm.h - * as\mcs51\asmain.c - * as\mcs51\asout.c - * as\mcs51\i51pst.c - * as\mcs51\lkdata.c - * as\mcs51\lklibr.c - * as\mcs51\lkmain.c - * as\z80\asdata.c - * as\z80\asm.h - * as\z80\asmain.c - * as\z80\asout.c - * as\z80\z80pst.c - * link\z80\aslink.h - * link\z80\lkdata.c - * link\z80\lklibr.c - * link\z80\lkmain.c - * src\SDCCglue.c + * as/mcs51/asdata.c + * as/mcs51/aslink.h + * as/mcs51/asm.h + * as/mcs51/asmain.c + * as/mcs51/asout.c + * as/mcs51/i51pst.c + * as/mcs51/lkdata.c + * as/mcs51/lklibr.c + * as/mcs51/lkmain.c + * as/z80/asdata.c + * as/z80/asm.h + * as/z80/asmain.c + * as/z80/asout.c + * as/z80/z80pst.c + * link/z80/aslink.h + * link/z80/lkdata.c + * link/z80/lklibr.c + * link/z80/lkmain.c + * src/SDCCglue.c 2003-07-28 Jesus Calvino-Fraga @@ -9493,7 +9507,7 @@ 2003-06-18 Bernhard Held - * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg + * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with /"cmd/" arg 2003-06-15 Borut Razem @@ -9549,7 +9563,7 @@ * doc/sdccman.lyx: updated to Lyx 1.3 * doc/cdbfileformat.lyx: updated to Lyx 1.3 * doc/test_suite_spec.lyx: updated to Lyx 1.3 - * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus + * doc/Makefile: added fix for the /tabularnewline problem, thanks to Jesus 2003-06-03 Bernhard Held @@ -10111,7 +10125,7 @@ * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C literal strings in stringLiteral() * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling - * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c + * src/Makefile.bcc, src/Makefile.in, src/src.dsp: added support/Util/dbuf.c to the project 2003-03-27 Paul Stoffregen @@ -10678,7 +10692,7 @@ 2003-01-12 Bernhard Held * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking - * src/SDCCutil.c (join): ugly bug: missing '\0' + * src/SDCCutil.c (join): ugly bug: missing '/0' * as/mcs51/lkmem.c (summary): sp on address 7 is safe 2003-01-11 Bernhard Held @@ -10763,23 +10777,23 @@ 2002-12-10 Jesus Calvino-Fraga - * in \sdcc\as\mcs51\ changed these files in order to create an + * in /sdcc/as/mcs51/ changed these files in order to create an aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c, lkmain.c. Also added: lkmem.c and lkaomf51.c. Changed the following files to include the previous two files: aslink.dsp, Makefile.aslink, Makefile.bcc, and Makefile.in. - * Changed \sdcc\src\SDCCmain.c so it creates files with extension + * Changed /sdcc/src/SDCCmain.c so it creates files with extension .adb instead of .cdb 2002-11-09 Jesus Calvino-Fraga - * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the + * /sdcc/as/mcs51/lklist.c: Now reports memory usage using the value from option --iram-size. 2002-09-20 Jesus Calvino-Fraga - * \sdcc\as\mcs51\lklist.c: added boundary check before using + * /sdcc/as/mcs51/lklist.c: added boundary check before using dram[] array. 2002-09-18 @@ -10794,50 +10808,50 @@ compact code for X = LITERAL - Y 2002-09-00 Jesus Calvino-Fraga - * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to + * /sdcc/as/mcs51/lklist.c: Fixed incorrect number of parameters to sprintf() in line 1267. 2002-09-08 Jesus Calvino-Fraga - * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051 + * /sdcc/src/SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051 like ports. 2002-09-04 Jesus Calvino-Fraga Changes to aslink (All the changes are marked with 'JCF'): - * \sdcc\as\mcs51\aslink.h: External definition of sflag and + * /sdcc/as/mcs51/aslink.h: External definition of sflag and summary(). - * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from + * /sdcc/as/mcs51/lkarea.c: Computes the size of area BSEG_BYTES from area BSEG. Also moves, if possible, the DATA area down into the internal ram so more space is available. - * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag + * /sdcc/as/mcs51/lkdata.c: Definition of memory summary output flag sflag. - * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits, + * /sdcc/as/mcs51/lklist.c: For the BSEG area report the size in bits, not bytes. Function summary() which creates a memory usage summary file with extension .mem. Reports of overlaping stack and small stack size. If the space for the stack is less than 16 bytes aslink trows a warning. - * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for + * /sdcc/as/mcs51/lkmain.c: Creation of some of the default areas for the 8051. Option 'y' for memory summary output file. Changes to sdcc (All the changes are marked with 'JCF'): - * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4]. + * /sdcc/src/SDCCglobl.h: External definition of RegBankUsed[4]. - * \sdcc\src\SDCCglue.c: If a register bank is used, creates an + * /sdcc/src/SDCCglue.c: If a register bank is used, creates an overlaying area for it (uses RegBankUsed[4]). - * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register + * /sdcc/src/SDCCmain.c: Definition RegBankUsed[4]; marks register bank zero as used by default. By default aslink locates the stack (equivalent to --stack-after-data). Pass option 'y' to aslink for the creation of the .mem file. Delegates the allocation of data area to aslink (it is not longer 0x30 by default). If --stack-loc passes the begining of the stack area to aslink. - * \sdcc\src\SDCCmem.c: If a register bank is used, marks it so + * /sdcc/src/SDCCmem.c: If a register bank is used, marks it so glue() in SDCCglue.c creates an area for it. 2002-09-03 Borut Razem @@ -10934,7 +10948,7 @@ so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC - solved MSC error in function aopDump() - * sdcc_vc.h: define PREFIX as "\\sdcc" + * sdcc_vc.h: define PREFIX as "//sdcc" 2002-07-18 Bernhard Held * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107 diff --git a/sim/ucsim/app.cc b/sim/ucsim/app.cc index bc8e81a4..6e7dcdac 100644 --- a/sim/ucsim/app.cc +++ b/sim/ucsim/app.cc @@ -36,11 +36,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #ifdef HAVE_GETOPT_H # include #endif -#ifdef _WIN32 -# include -# define SOCKET_AVAIL -#elif defined HAVE_SYS_SOCKET_H -# include +#ifdef SOCKET_AVAIL +# include HEADER_SOCKET #endif #include #include diff --git a/sim/ucsim/avr.src/Makefile.in b/sim/ucsim/avr.src/Makefile.in index 11307e79..c0f38716 100644 --- a/sim/ucsim/avr.src/Makefile.in +++ b/sim/ucsim/avr.src/Makefile.in @@ -28,7 +28,7 @@ PICOPT = @PICOPT@ SHAREDLIB = @SHAREDLIB@ EXEEXT = @EXEEXT@ -LIBS = @LIBS@ -L$(top_builddir) -lsim -lutil -lguiucsim -lcmd -lsim +LIBS = -L$(top_builddir) -lsim -lutil -lguiucsim -lcmd -lsim @LIBS@ DL = @DL@ dl_ok = @dl_ok@ diff --git a/sim/ucsim/cmd.src/cmdutil.cc b/sim/ucsim/cmd.src/cmdutil.cc index 24882f5d..793022d6 100644 --- a/sim/ucsim/cmd.src/cmdutil.cc +++ b/sim/ucsim/cmd.src/cmdutil.cc @@ -31,13 +31,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include #include -#ifdef _WIN32 -# include -# define SOCKET_AVAIL -#elif defined HAVE_SYS_SOCKET_H -# include -# include -# include +#ifdef SOCKET_AVAIL +# include HEADER_SOCKET +# if defined HAVE_SYS_SOCKET_H +# include +# include +# endif #endif #include "i_string.h" diff --git a/sim/ucsim/cmd.src/newcmd.cc b/sim/ucsim/cmd.src/newcmd.cc index 453540ef..b43f531b 100644 --- a/sim/ucsim/cmd.src/newcmd.cc +++ b/sim/ucsim/cmd.src/newcmd.cc @@ -32,16 +32,15 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include #include -#ifdef _WIN32 -# include -# define SOCKET_AVAIL -#elif defined HAVE_SYS_SOCKET_H -# include -# include -# include -# include -#endif #include +#ifdef SOCKET_AVAIL +# include HEADER_SOCKET +# if defined HAVE_SYS_SOCKET_H +# include +# include +# include +# endif +#endif #if FD_HEADER_OK # include HEADER_FD #endif @@ -478,7 +477,7 @@ int cl_console::input_avail(void) { struct timeval tv; - int i; + UCSOCKET_T i; if ((i= get_in_fd()) < 0) return(0); @@ -893,7 +892,7 @@ cl_commander::set_fd_set(void) fd_num= 0; for (i= 0; i < cons->count; i++) { - int fd; + UCSOCKET_T fd; class cl_console *c= (class cl_console*)(cons->at(i)); if ((fd= c->get_in_fd()) >= 0) { @@ -1148,7 +1147,7 @@ cl_commander::wait_input(void) int cl_commander::proc_input(void) { - int i; + UCSOCKET_T i; for (i= 0; i < fd_num; i++) if (FD_ISSET(i, &active_set)) diff --git a/sim/ucsim/cmd.src/newcmdcl.h b/sim/ucsim/cmd.src/newcmdcl.h index 1f13bf82..8204307d 100644 --- a/sim/ucsim/cmd.src/newcmdcl.h +++ b/sim/ucsim/cmd.src/newcmdcl.h @@ -189,7 +189,7 @@ public: class cl_app *app; class cl_list *cons; fd_set read_set, active_set; - int fd_num; + UCSOCKET_T fd_num; //class cl_sim *sim; class cl_console *actual_console, *frozen_console; class cl_cmdset *cmdset; diff --git a/sim/ucsim/configure b/sim/ucsim/configure index 4ebd0401..8c0ecfcf 100755 --- a/sim/ucsim/configure +++ b/sim/ucsim/configure @@ -468,7 +468,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS AWK VERSION VERSIONHI VERSIONLO VERSIONP docdir enable_ucsim enable_dlso enable_51 enable_avr enable_z80 enable_hc08 enable_xa enable_serio CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CXXCPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB STRIP build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS ac_ct_CC LN_S ECHO ac_ct_STRIP CPP EGREP LIBTOOL LIBTOOL_DEPS LEX LEXLIB LEX_OUTPUT_ROOT YACC BISON_PLUS_PLUS dl_ok DL panel_ok curses_ok CURSES_LIBS M_OR_MM SHAREDLIB PICOPT dlso_ok LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS AWK VERSION VERSIONHI VERSIONLO VERSIONP docdir enable_ucsim enable_dlso enable_51 enable_avr enable_z80 enable_hc08 enable_xa enable_serio CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CXXCPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB STRIP build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS ac_ct_CC LN_S ECHO ac_ct_STRIP CPP EGREP LIBTOOL LIBTOOL_DEPS LEX LEXLIB LEX_OUTPUT_ROOT YACC BISON_PLUS_PLUS SERIAL_AVAIL dl_ok DL panel_ok curses_ok CURSES_LIBS M_OR_MM SHAREDLIB PICOPT dlso_ok LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -9238,6 +9238,309 @@ fi done + +if test "${ac_cv_header_termios_h+set}" = set; then + echo "$as_me:$LINENO: checking for termios.h" >&5 +echo $ECHO_N "checking for termios.h... $ECHO_C" >&6 +if test "${ac_cv_header_termios_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_termios_h" >&5 +echo "${ECHO_T}$ac_cv_header_termios_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking termios.h usability" >&5 +echo $ECHO_N "checking termios.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking termios.h presence" >&5 +echo $ECHO_N "checking termios.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: termios.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: termios.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: termios.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: termios.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: termios.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: termios.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: termios.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: termios.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: termios.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: termios.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: termios.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: termios.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: termios.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: termios.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: termios.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: termios.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for termios.h" >&5 +echo $ECHO_N "checking for termios.h... $ECHO_C" >&6 +if test "${ac_cv_header_termios_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_termios_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_termios_h" >&5 +echo "${ECHO_T}$ac_cv_header_termios_h" >&6 + +fi +if test $ac_cv_header_termios_h = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_TERMIOS_H 1 +_ACEOF + + SERIAL_AVAIL=1 +else + SERIAL_AVAIL=0 + +fi + + + + +if test "${ac_cv_header_curses_h+set}" = set; then + echo "$as_me:$LINENO: checking for curses.h" >&5 +echo $ECHO_N "checking for curses.h... $ECHO_C" >&6 +if test "${ac_cv_header_curses_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_curses_h" >&5 +echo "${ECHO_T}$ac_cv_header_curses_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking curses.h usability" >&5 +echo $ECHO_N "checking curses.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking curses.h presence" >&5 +echo $ECHO_N "checking curses.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: curses.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: curses.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: curses.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: curses.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: curses.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: curses.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: curses.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: curses.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: curses.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: curses.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: curses.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: curses.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: curses.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: curses.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: curses.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: curses.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for curses.h" >&5 +echo $ECHO_N "checking for curses.h... $ECHO_C" >&6 +if test "${ac_cv_header_curses_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_curses_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_curses_h" >&5 +echo "${ECHO_T}$ac_cv_header_curses_h" >&6 + +fi +if test $ac_cv_header_curses_h = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_CURSES_H 1 +_ACEOF + + curses_h_ok=yes +else + curses_h_ok=no + +fi + + + +ucsim_cv_socket="unknown" if test "${ac_cv_header_sys_socket_h+set}" = set; then echo "$as_me:$LINENO: checking for sys/socket.h" >&5 echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6 @@ -9376,21 +9679,190 @@ echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6 fi if test $ac_cv_header_sys_socket_h = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_SOCKET_H 1 +_ACEOF + cat >>confdefs.h <<\_ACEOF #define SOCKET_AVAIL 1 +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define UCSOCKET_T int +_ACEOF + + ucsim_cv_socket="" + +fi + + + +if test $ucsim_cv_socket = unknown; then + if test "${ac_cv_header_winsock2_h+set}" = set; then + echo "$as_me:$LINENO: checking for winsock2.h" >&5 +echo $ECHO_N "checking for winsock2.h... $ECHO_C" >&6 +if test "${ac_cv_header_winsock2_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_winsock2_h" >&5 +echo "${ECHO_T}$ac_cv_header_winsock2_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking winsock2.h usability" >&5 +echo $ECHO_N "checking winsock2.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking winsock2.h presence" >&5 +echo $ECHO_N "checking winsock2.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: winsock2.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: winsock2.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: winsock2.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: winsock2.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: winsock2.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: winsock2.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: winsock2.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: winsock2.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: winsock2.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: winsock2.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: winsock2.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: winsock2.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: winsock2.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: winsock2.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: winsock2.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: winsock2.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for winsock2.h" >&5 +echo $ECHO_N "checking for winsock2.h... $ECHO_C" >&6 +if test "${ac_cv_header_winsock2_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_winsock2_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_winsock2_h" >&5 +echo "${ECHO_T}$ac_cv_header_winsock2_h" >&6 + +fi +if test $ac_cv_header_winsock2_h = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_WINSOCK2_H 1 _ACEOF cat >>confdefs.h <<\_ACEOF -#define HAVE_SYS_SOCKET_H 1 +#define SOCKET_AVAIL 1 _ACEOF - cat >conftest.$ac_ext <<_ACEOF + cat >>confdefs.h <<_ACEOF +#define UCSOCKET_T SOCKET +_ACEOF + + ucsim_cv_socket="" + +fi + + +fi + +if test $ucsim_cv_socket != unknown; then + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include <$ucsim_cv_socket> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | @@ -9407,8 +9879,10 @@ _ACEOF fi rm -f conftest* - fi +cat >>confdefs.h <<_ACEOF +#define HEADER_SOCKET ${ucsim_cv_socket} +_ACEOF if test "${ac_cv_header_dlfcn_h+set}" = set; then @@ -9896,6 +10370,24 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include +#ifdef FD_ZERO +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then + ucsim_cv_fd="" +fi +rm -f conftest* + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include #ifdef FD_ZERO yes @@ -9939,7 +10431,7 @@ yes _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then - ucsim_cv_fd="" + ucsim_cv_fd="" fi rm -f conftest* @@ -9947,19 +10439,13 @@ fi echo "$as_me:$LINENO: result: $ucsim_cv_fd" >&5 echo "${ECHO_T}$ucsim_cv_fd" >&6 -cat >>confdefs.h <<\_ACEOF -#define FD_HEADER_OK 0 -_ACEOF - +ucsim_cv_header_ok=0 if echo $ucsim_cv_fd|grep time >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define FD_NEED_TIME_H 1 _ACEOF -cat >>confdefs.h <<\_ACEOF -#define FD_HEADER_OK 1 -_ACEOF - +ucsim_cv_header_ok=1 else cat >>confdefs.h <<\_ACEOF #define FD_NEED_TIME_H 0 @@ -9971,10 +10457,7 @@ cat >>confdefs.h <<\_ACEOF #define FD_NEED_TYPES_H 1 _ACEOF -cat >>confdefs.h <<\_ACEOF -#define FD_HEADER_OK 1 -_ACEOF - +ucsim_cv_header_ok=1 else cat >>confdefs.h <<\_ACEOF #define FD_NEED_TYPES_H 0 @@ -9986,17 +10469,30 @@ cat >>confdefs.h <<\_ACEOF #define FD_NEED_SELECT_H 1 _ACEOF +ucsim_cv_header_ok=1 +else cat >>confdefs.h <<\_ACEOF -#define FD_HEADER_OK 1 +#define FD_NEED_SELECT_H 0 _ACEOF +fi +if echo $ucsim_cv_fd|grep winsock2 >/dev/null 2>&1; then +cat >>confdefs.h <<\_ACEOF +#define FD_NEED_WINSOCK2_H 1 +_ACEOF + +ucsim_cv_header_ok=1 else cat >>confdefs.h <<\_ACEOF -#define FD_NEED_SELECT_H 0 +#define FD_NEED_WINSOCK2_H 0 _ACEOF fi +cat >>confdefs.h <<_ACEOF +#define FD_HEADER_OK ${ucsim_cv_header_ok} +_ACEOF + cat >>confdefs.h <<_ACEOF #define HEADER_FD ${ucsim_cv_fd} _ACEOF @@ -10005,6 +10501,9 @@ _ACEOF # Checking for functions/libs # =========================================================================== +if echo $ucsim_cv_socket|grep winsock2 >/dev/null 2>&1; then + LIBS="-lwsock32 $LIBS" +else echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 @@ -10153,6 +10652,8 @@ _ACEOF fi +fi + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then @@ -10242,7 +10743,11 @@ fi #, #-lcurses) -echo "$as_me:$LINENO: checking for panel_above in -lpanel" >&5 +if test $curses_h_ok != yes; then + panel_ok="no" + curses_ok="no" +else + echo "$as_me:$LINENO: checking for panel_above in -lpanel" >&5 echo $ECHO_N "checking for panel_above in -lpanel... $ECHO_C" >&6 if test "${ac_cv_lib_panel_panel_above+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10308,17 +10813,17 @@ echo "$as_me:$LINENO: result: $ac_cv_lib_panel_panel_above" >&5 echo "${ECHO_T}$ac_cv_lib_panel_panel_above" >&6 if test $ac_cv_lib_panel_panel_above = yes; then panel_ok="yes" -curses_ok="yes" -CURSES_LIBS="-lpanel" + curses_ok="yes" + CURSES_LIBS="-lpanel" else panel_ok="no" -curses_ok="no" + curses_ok="no" fi -if test $curses_ok != yes; then - echo "$as_me:$LINENO: checking for nl in -lcurses" >&5 + if test $curses_ok != yes; then + echo "$as_me:$LINENO: checking for nl in -lcurses" >&5 echo $ECHO_N "checking for nl in -lcurses... $ECHO_C" >&6 if test "${ac_cv_lib_curses_nl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10384,15 +10889,15 @@ echo "$as_me:$LINENO: result: $ac_cv_lib_curses_nl" >&5 echo "${ECHO_T}$ac_cv_lib_curses_nl" >&6 if test $ac_cv_lib_curses_nl = yes; then curses_ok="yes" - CURSES_LIBS="-lcurses" + CURSES_LIBS="-lcurses" else curses_ok="no" fi -fi + fi -if test $curses_ok != yes; then - echo "$as_me:$LINENO: checking for nl in -lncurses" >&5 + if test $curses_ok != yes; then + echo "$as_me:$LINENO: checking for nl in -lncurses" >&5 echo $ECHO_N "checking for nl in -lncurses... $ECHO_C" >&6 if test "${ac_cv_lib_ncurses_nl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10458,11 +10963,12 @@ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_nl" >&5 echo "${ECHO_T}$ac_cv_lib_ncurses_nl" >&6 if test $ac_cv_lib_ncurses_nl = yes; then curses_ok="yes" - CURSES_LIBS="-lncurses" + CURSES_LIBS="-lncurses" else curses_ok="no" fi + fi fi @@ -11432,7 +11938,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include +#include ${ucsim_cv_socket} int main () { @@ -11911,7 +12417,7 @@ fi # nor build .so # Quick + dirty by Bernhard # FIXME -if $CXX -v 2>&1 | grep -i cygwin 1>&5 2>&5; then +if $CXX --version 2>&1 | grep -i cygming 1>&5 2>&5 || $CXX --version 2>&1 | grep -i cygwin 1>&5 2>&5; then PICOPT="" SHAREDLIB="no" fi @@ -14834,6 +15340,7 @@ s,@LEXLIB@,$LEXLIB,;t t s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t s,@YACC@,$YACC,;t t s,@BISON_PLUS_PLUS@,$BISON_PLUS_PLUS,;t t +s,@SERIAL_AVAIL@,$SERIAL_AVAIL,;t t s,@dl_ok@,$dl_ok,;t t s,@DL@,$DL,;t t s,@panel_ok@,$panel_ok,;t t diff --git a/sim/ucsim/configure.in b/sim/ucsim/configure.in index 172a9634..e2c137df 100644 --- a/sim/ucsim/configure.in +++ b/sim/ucsim/configure.in @@ -136,14 +136,45 @@ fi AC_HEADER_STDC AC_CHECK_HEADERS(getopt.h) AC_CHECK_HEADERS(unistd.h) + +AC_CHECK_HEADER(termios.h, + AC_DEFINE(HAVE_TERMIOS_H) + SERIAL_AVAIL=1, + SERIAL_AVAIL=0 +) +AC_SUBST(SERIAL_AVAIL) + +AC_CHECK_HEADER(curses.h, + AC_DEFINE(HAVE_CURSES_H) + curses_h_ok=yes, + curses_h_ok=no +) + +ucsim_cv_socket="unknown" AC_CHECK_HEADER(sys/socket.h, - AC_DEFINE(SOCKET_AVAIL) - AC_DEFINE(HAVE_SYS_SOCKET_H) - AC_EGREP_HEADER(socklen_t, - sys/socket.h, - AC_DEFINE_UNQUOTED(SOCKLEN_T, socklen_t), - AC_DEFINE_UNQUOTED(SOCKLEN_T, uint)) + AC_DEFINE(HAVE_SYS_SOCKET_H) + AC_DEFINE(SOCKET_AVAIL) + AC_DEFINE_UNQUOTED(UCSOCKET_T, int) + ucsim_cv_socket="" ) + +if test $ucsim_cv_socket = unknown; then + AC_CHECK_HEADER(winsock2.h, + AC_DEFINE(HAVE_WINSOCK2_H) + AC_DEFINE(SOCKET_AVAIL) + AC_DEFINE_UNQUOTED(UCSOCKET_T, SOCKET) + ucsim_cv_socket="" + ) +fi + +if test $ucsim_cv_socket != unknown; then + AC_EGREP_HEADER(socklen_t, + $ucsim_cv_socket, + AC_DEFINE_UNQUOTED(SOCKLEN_T, socklen_t), + AC_DEFINE_UNQUOTED(SOCKLEN_T, uint)) +fi +AC_DEFINE_UNQUOTED(HEADER_SOCKET, ${ucsim_cv_socket}) + AC_CHECK_HEADER(dlfcn.h) AC_HEADER_DIRENT @@ -152,6 +183,11 @@ AC_HEADER_DIRENT AC_CACHE_CHECK(which header file defines FD_ macros, ucsim_cv_fd, [ucsim_cv_fd="unknown" AC_EGREP_CPP(yes, [ +#include +#ifdef FD_ZERO +yes +#endif], ucsim_cv_fd="") +AC_EGREP_CPP(yes, [ #include #ifdef FD_ZERO yes @@ -165,35 +201,47 @@ AC_EGREP_CPP(yes, [ #include #ifdef FD_ZERO yes -#endif], ucsim_cv_fd="")]) +#endif], ucsim_cv_fd="")]) -AC_DEFINE(FD_HEADER_OK, 0) +ucsim_cv_header_ok=0 if echo $ucsim_cv_fd|grep time >/dev/null 2>&1; then AC_DEFINE(FD_NEED_TIME_H, 1) -AC_DEFINE(FD_HEADER_OK, 1) +ucsim_cv_header_ok=1 else AC_DEFINE(FD_NEED_TIME_H, 0) fi if echo $ucsim_cv_fd|grep types >/dev/null 2>&1; then AC_DEFINE(FD_NEED_TYPES_H, 1) -AC_DEFINE(FD_HEADER_OK, 1) +ucsim_cv_header_ok=1 else AC_DEFINE(FD_NEED_TYPES_H, 0) fi if echo $ucsim_cv_fd|grep select >/dev/null 2>&1; then AC_DEFINE(FD_NEED_SELECT_H, 1) -AC_DEFINE(FD_HEADER_OK, 1) +ucsim_cv_header_ok=1 else AC_DEFINE(FD_NEED_SELECT_H, 0) fi +if echo $ucsim_cv_fd|grep winsock2 >/dev/null 2>&1; then +AC_DEFINE(FD_NEED_WINSOCK2_H, 1) +ucsim_cv_header_ok=1 +else +AC_DEFINE(FD_NEED_WINSOCK2_H, 0) +fi +AC_DEFINE_UNQUOTED(FD_HEADER_OK, ${ucsim_cv_header_ok}) AC_DEFINE_UNQUOTED(HEADER_FD, ${ucsim_cv_fd}) # Checking for functions/libs # =========================================================================== -AC_CHECK_LIB(socket,socket) -AC_CHECK_LIB(nsl,xdr_short) +if echo $ucsim_cv_socket|grep winsock2 >/dev/null 2>&1; then + LIBS="-lwsock32 $LIBS" +else + AC_CHECK_LIB(socket,socket) + AC_CHECK_LIB(nsl,xdr_short) +fi + AC_CHECK_LIB(dl,dlopen, dl_ok="yes" DL="-ldl", @@ -216,26 +264,31 @@ AC_SUBST(DL) #, #-lcurses) -AC_CHECK_LIB(panel,panel_above, -panel_ok="yes" -curses_ok="yes" -CURSES_LIBS="-lpanel", -panel_ok="no" -curses_ok="no" -) - -if test $curses_ok != yes; then - AC_CHECK_LIB(curses,nl, - curses_ok="yes" - CURSES_LIBS="-lcurses", - curses_ok="no") -fi +if test $curses_h_ok != yes; then + panel_ok="no" + curses_ok="no" +else + AC_CHECK_LIB(panel,panel_above, + panel_ok="yes" + curses_ok="yes" + CURSES_LIBS="-lpanel", + panel_ok="no" + curses_ok="no" + ) + + if test $curses_ok != yes; then + AC_CHECK_LIB(curses,nl, + curses_ok="yes" + CURSES_LIBS="-lcurses", + curses_ok="no") + fi -if test $curses_ok != yes; then - AC_CHECK_LIB(ncurses,nl, - curses_ok="yes" - CURSES_LIBS="-lncurses", - curses_ok="no") + if test $curses_ok != yes; then + AC_CHECK_LIB(ncurses,nl, + curses_ok="yes" + CURSES_LIBS="-lncurses", + curses_ok="no") + fi fi AC_SUBST(panel_ok) @@ -304,7 +357,7 @@ AC_DEFUN(ucsim_ACCEPT_LENGTH_T, for ac_val in int size_t socklen_t; do CPPFLAGS="$ac_save_CPPFLAGS -DACCEPT_SOCKLEN_T=$ac_val" AC_TRY_COMPILE([#include -#include ], +#include ${ucsim_cv_socket}], [struct sockaddr a; $ac_val len; accept (0, &a, &len);], [ucsim_cv_accept_length_type=$ac_val; break]) done @@ -422,7 +475,7 @@ fi # nor build .so # Quick + dirty by Bernhard # FIXME -if $CXX -v 2>&1 | grep -i cygwin 1>&5 2>&5; then +if $CXX --version 2>&1 | grep -i cygming 1>&5 2>&5 || $CXX --version 2>&1 | grep -i cygwin 1>&5 2>&5; then PICOPT="" SHAREDLIB="no" fi diff --git a/sim/ucsim/ddconfig_in.h b/sim/ucsim/ddconfig_in.h index 442fde0b..cb2c9c29 100644 --- a/sim/ucsim/ddconfig_in.h +++ b/sim/ucsim/ddconfig_in.h @@ -30,7 +30,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #define DD_TRUE 1 #define DD_FALSE 0 - //#define bool int #define NIL 0 #undef STDC_HEADERS @@ -39,16 +38,22 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #undef HAVE_DIRENT_H #undef HAVE_SYS_NDIR_H #undef HAVE_SYS_DIR_H -#undef HAVE_SYS_SOCKET_H #undef HAVE_NDIR_H +#undef HAVE_SYS_SOCKET_H +#undef HAVE_WINSOCK2_H #undef HAVE_DLFCN_H +#undef HAVE_CURSES_H +#undef HAVE_TERMIOS_H #undef SOCKET_AVAIL #undef SOCKLEN_T +#undef UCSOCKET_T +#undef HEADER_SOCKET #undef FD_NEED_TIME_H #undef FD_NEED_TYPES_H #undef FD_NEED_SELECT_H +#undef FD_NEED_WINSOCK2_H #undef HEADER_FD #undef FD_HEADER_OK diff --git a/sim/ucsim/hc08.src/Makefile.in b/sim/ucsim/hc08.src/Makefile.in index e45b4477..51b243e6 100644 --- a/sim/ucsim/hc08.src/Makefile.in +++ b/sim/ucsim/hc08.src/Makefile.in @@ -29,7 +29,7 @@ SHAREDLIB = @SHAREDLIB@ EXEEXT = @EXEEXT@ -LIBS = @LIBS@ -L$(top_builddir) -lsim -lutil -lguiucsim -lcmd -lsim +LIBS = -L$(top_builddir) -lsim -lutil -lguiucsim -lcmd -lsim @LIBS@ DL = @DL@ dl_ok = @dl_ok@ diff --git a/sim/ucsim/hc08.src/hc08.cc b/sim/ucsim/hc08.src/hc08.cc index 3550cbb9..f333990d 100644 --- a/sim/ucsim/hc08.src/hc08.cc +++ b/sim/ucsim/hc08.src/hc08.cc @@ -51,9 +51,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #define uint8 unsigned char #define int8 char -const bool TRUE = 1; -const bool FALSE = 0; - /*******************************************************************/ @@ -418,71 +415,71 @@ cl_hc08::exec_inst(void) return(resBREAKPOINT); tick(1); switch ((code >> 4) & 0xf) { - case 0x0: return(inst_bittestsetclear(code, FALSE)); - case 0x1: return(inst_bitsetclear(code, FALSE)); - case 0x2: return(inst_condbranch(code, FALSE)); + case 0x0: return(inst_bittestsetclear(code, false)); + case 0x1: return(inst_bitsetclear(code, false)); + case 0x2: return(inst_condbranch(code, false)); case 0x3: case 0x4: case 0x5: case 0x6: case 0x7: switch (code & 0xf) { - case 0x0: return(inst_neg(code, FALSE)); - case 0x1: return(inst_cbeq(code, FALSE)); + case 0x0: return(inst_neg(code, false)); + case 0x1: return(inst_cbeq(code, false)); case 0x2: switch (code) { - case 0x42: return(inst_mul(code, FALSE)); - case 0x52: return(inst_div(code, FALSE)); - case 0x62: return(inst_nsa(code, FALSE)); - case 0x72: return(inst_daa(code, FALSE)); + case 0x42: return(inst_mul(code, false)); + case 0x52: return(inst_div(code, false)); + case 0x62: return(inst_nsa(code, false)); + case 0x72: return(inst_daa(code, false)); default: return(resHALT); } - case 0x3: return(inst_com(code, FALSE)); - case 0x4: return(inst_lsr(code, FALSE)); + case 0x3: return(inst_com(code, false)); + case 0x4: return(inst_lsr(code, false)); case 0x5: switch (code) { - case 0x35: return(inst_sthx(code, FALSE)); + case 0x35: return(inst_sthx(code, false)); case 0x45: - case 0x55: return(inst_ldhx(code, FALSE)); + case 0x55: return(inst_ldhx(code, false)); case 0x65: - case 0x75: return(inst_cphx(code, FALSE)); + case 0x75: return(inst_cphx(code, false)); default: return(resHALT); } - case 0x6: return(inst_ror(code, FALSE)); - case 0x7: return(inst_asr(code, FALSE)); - case 0x8: return(inst_lsl(code, FALSE)); - case 0x9: return(inst_rol(code, FALSE)); - case 0xa: return(inst_dec(code, FALSE)); - case 0xb: return(inst_dbnz(code, FALSE)); - case 0xc: return(inst_inc(code, FALSE)); - case 0xd: return(inst_tst(code, FALSE)); + case 0x6: return(inst_ror(code, false)); + case 0x7: return(inst_asr(code, false)); + case 0x8: return(inst_lsl(code, false)); + case 0x9: return(inst_rol(code, false)); + case 0xa: return(inst_dec(code, false)); + case 0xb: return(inst_dbnz(code, false)); + case 0xc: return(inst_inc(code, false)); + case 0xd: return(inst_tst(code, false)); case 0xe: switch (code) { case 0x4e: case 0x5e: case 0x6e: - case 0x7e: return(inst_mov(code, FALSE)); + case 0x7e: return(inst_mov(code, false)); default: return(resHALT); } - case 0xf: return(inst_clr(code, FALSE)); + case 0xf: return(inst_clr(code, false)); default: return(resHALT); } case 0x8: switch (code & 0xf) { - case 0x0: return(inst_rti(code, FALSE)); - case 0x1: return(inst_rts(code, FALSE)); - case 0x3: return(inst_swi(code, FALSE)); + case 0x0: return(inst_rti(code, false)); + case 0x1: return(inst_rts(code, false)); + case 0x3: return(inst_swi(code, false)); case 0x4: - case 0x5: return(inst_transfer(code, FALSE)); + case 0x5: return(inst_transfer(code, false)); case 0x6: case 0x7: case 0x8: case 0x9: case 0xa: - case 0xb: return(inst_pushpull(code, FALSE)); - case 0xc: return(inst_clrh(code, FALSE)); - case 0xe: return(inst_stop(code, FALSE)); - case 0xf: return(inst_wait(code, FALSE)); + case 0xb: return(inst_pushpull(code, false)); + case 0xc: return(inst_clrh(code, false)); + case 0xe: return(inst_stop(code, false)); + case 0xf: return(inst_wait(code, false)); default: return(resHALT); } case 0x9: @@ -490,56 +487,56 @@ cl_hc08::exec_inst(void) case 0x0: case 0x1: case 0x2: - case 0x3: return(inst_condbranch(code, FALSE)); + case 0x3: return(inst_condbranch(code, false)); case 0x4: case 0x5: case 0x7: - case 0xf: return(inst_transfer(code, FALSE)); + case 0xf: return(inst_transfer(code, false)); case 0x8: case 0x9: case 0xa: - case 0xb: return(inst_setclearflags(code, FALSE)); - case 0xc: return(inst_rsp(code, FALSE)); - case 0xd: return(inst_nop(code, FALSE)); + case 0xb: return(inst_setclearflags(code, false)); + case 0xc: return(inst_rsp(code, false)); + case 0xd: return(inst_nop(code, false)); case 0xe: code = fetch(); switch ((code >> 4) & 0xf) { case 0x6: switch (code & 0xf) { - case 0x0: return(inst_neg(code, TRUE)); - case 0x1: return(inst_cbeq(code, TRUE)); - case 0x3: return(inst_com(code, TRUE)); - case 0x4: return(inst_lsr(code, TRUE)); - case 0x6: return(inst_ror(code, TRUE)); - case 0x7: return(inst_asr(code, TRUE)); - case 0x8: return(inst_lsl(code, TRUE)); - case 0x9: return(inst_rol(code, TRUE)); - case 0xa: return(inst_dec(code, TRUE)); - case 0xb: return(inst_dbnz(code, TRUE)); - case 0xc: return(inst_inc(code, TRUE)); - case 0xd: return(inst_tst(code, TRUE)); - case 0xf: return(inst_clr(code, TRUE)); + case 0x0: return(inst_neg(code, true)); + case 0x1: return(inst_cbeq(code, true)); + case 0x3: return(inst_com(code, true)); + case 0x4: return(inst_lsr(code, true)); + case 0x6: return(inst_ror(code, true)); + case 0x7: return(inst_asr(code, true)); + case 0x8: return(inst_lsl(code, true)); + case 0x9: return(inst_rol(code, true)); + case 0xa: return(inst_dec(code, true)); + case 0xb: return(inst_dbnz(code, true)); + case 0xc: return(inst_inc(code, true)); + case 0xd: return(inst_tst(code, true)); + case 0xf: return(inst_clr(code, true)); default: return(resHALT); } case 0xd: case 0xe: switch (code & 0xf) { - case 0x0: return(inst_sub(code, TRUE)); - case 0x1: return(inst_cmp(code, TRUE)); - case 0x2: return(inst_sbc(code, TRUE)); - case 0x3: return(inst_cpx(code, TRUE)); - case 0x4: return(inst_and(code, TRUE)); - case 0x5: return(inst_bit(code, TRUE)); - case 0x6: return(inst_lda(code, TRUE)); - case 0x7: return(inst_sta(code, TRUE)); - case 0x8: return(inst_eor(code, TRUE)); - case 0x9: return(inst_adc(code, TRUE)); - case 0xa: return(inst_ora(code, TRUE)); - case 0xb: return(inst_add(code, TRUE)); + case 0x0: return(inst_sub(code, true)); + case 0x1: return(inst_cmp(code, true)); + case 0x2: return(inst_sbc(code, true)); + case 0x3: return(inst_cpx(code, true)); + case 0x4: return(inst_and(code, true)); + case 0x5: return(inst_bit(code, true)); + case 0x6: return(inst_lda(code, true)); + case 0x7: return(inst_sta(code, true)); + case 0x8: return(inst_eor(code, true)); + case 0x9: return(inst_adc(code, true)); + case 0xa: return(inst_ora(code, true)); + case 0xb: return(inst_add(code, true)); case 0xc: return(resHALT); case 0xd: putchar(regs.A); fflush(stdout); return(resGO); - case 0xe: return(inst_ldx(code, TRUE)); - case 0xf: return(inst_stx(code, TRUE)); + case 0xe: return(inst_ldx(code, true)); + case 0xf: return(inst_stx(code, true)); default: return(resHALT); } default: return(resHALT); @@ -553,38 +550,38 @@ cl_hc08::exec_inst(void) case 0xe: case 0xf: switch (code & 0xf) { - case 0x0: return(inst_sub(code, FALSE)); - case 0x1: return(inst_cmp(code, FALSE)); - case 0x2: return(inst_sbc(code, FALSE)); - case 0x3: return(inst_cpx(code, FALSE)); - case 0x4: return(inst_and(code, FALSE)); - case 0x5: return(inst_bit(code, FALSE)); - case 0x6: return(inst_lda(code, FALSE)); + case 0x0: return(inst_sub(code, false)); + case 0x1: return(inst_cmp(code, false)); + case 0x2: return(inst_sbc(code, false)); + case 0x3: return(inst_cpx(code, false)); + case 0x4: return(inst_and(code, false)); + case 0x5: return(inst_bit(code, false)); + case 0x6: return(inst_lda(code, false)); case 0x7: if (code==0xa7) - return(inst_ais(code, FALSE)); + return(inst_ais(code, false)); else - return(inst_sta(code, FALSE)); - case 0x8: return(inst_eor(code, FALSE)); - case 0x9: return(inst_adc(code, FALSE)); - case 0xa: return(inst_ora(code, FALSE)); - case 0xb: return(inst_add(code, FALSE)); + return(inst_sta(code, false)); + case 0x8: return(inst_eor(code, false)); + case 0x9: return(inst_adc(code, false)); + case 0xa: return(inst_ora(code, false)); + case 0xb: return(inst_add(code, false)); case 0xc: if (code==0xac) return(resHALT); else - return(inst_jmp(code, FALSE)); + return(inst_jmp(code, false)); case 0xd: if (code==0xad) - return(inst_bsr(code, FALSE)); + return(inst_bsr(code, false)); else - return(inst_jsr(code, FALSE)); - case 0xe: return(inst_ldx(code, FALSE)); + return(inst_jsr(code, false)); + case 0xe: return(inst_ldx(code, false)); case 0xf: if (code==0xaf) - return(inst_aix(code, FALSE)); + return(inst_aix(code, false)); else - return(inst_stx(code, FALSE)); + return(inst_stx(code, false)); default: return(resHALT); } default: return(resHALT); diff --git a/sim/ucsim/s51.src/Makefile.in b/sim/ucsim/s51.src/Makefile.in index 643e4e5b..cc95874e 100644 --- a/sim/ucsim/s51.src/Makefile.in +++ b/sim/ucsim/s51.src/Makefile.in @@ -26,12 +26,13 @@ CXXFLAGS = @CXXFLAGS@ -Wall M_OR_MM = @M_OR_MM@ PICOPT = @PICOPT@ SHAREDLIB = @SHAREDLIB@ +SERIAL_AVAIL = @SERIAL_AVAIL@ SDCC = sdcc SDCFLAGS = --debug --stack-after-data --model-small SDCPPFLAGS = -LIBS = @LIBS@ -L$(top_builddir) -lsim -lutil -lguiucsim -lcmd -lsim +LIBS = -L$(top_builddir) -lsim -lutil -lguiucsim -lcmd -lsim @LIBS@ DL = @DL@ dl_ok = @dl_ok@ @@ -52,10 +53,15 @@ EXEEXT = @EXEEXT@ OBJECTS_SHARED = glob.o sim51.o \ inc.o jmp.o mov.o logic.o arith.o bit.o \ - timer0.o timer1.o timer2.o serial.o port.o interrupt.o \ + timer0.o timer1.o timer2.o port.o interrupt.o \ wdt.o pca.o \ uc51.o uc52.o uc51r.o uc89c51r.o uc251.o \ uc390.o uc390hw.o + +ifeq ($(SERIAL_AVAIL), 1) +OBJECTS_SHARED += serial.o +endif + OBJECTS_EXE = s51.o OBJECTS = $(OBJECTS_SHARED) $(OBJECTS_EXE) diff --git a/sim/ucsim/s51.src/serial.cc b/sim/ucsim/s51.src/serial.cc index 1b32248b..2f7b0be1 100644 --- a/sim/ucsim/s51.src/serial.cc +++ b/sim/ucsim/s51.src/serial.cc @@ -30,8 +30,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include #include +#ifdef HAVE_TERMIOS_H #include +#endif +#ifdef HAVE_UNISTD_H #include +#endif #include #include #include diff --git a/sim/ucsim/s51.src/serialcl.h b/sim/ucsim/s51.src/serialcl.h index ae6dee64..b727f616 100644 --- a/sim/ucsim/s51.src/serialcl.h +++ b/sim/ucsim/s51.src/serialcl.h @@ -41,8 +41,10 @@ protected: class cl_address_space *sfr; bool there_is_t2, t2_baud; class cl_memory_cell *sbuf, *pcon, *scon; +#ifdef HAVE_TERMIOS_H struct termios saved_attributes_in; // Attributes of serial interface struct termios saved_attributes_out; +#endif class cl_optref *serial_in_file_option; class cl_optref *serial_out_file_option; FILE *serial_in; // Serial line input diff --git a/sim/ucsim/s51.src/uc51.cc b/sim/ucsim/s51.src/uc51.cc index 815b34c8..bd23d3d7 100644 --- a/sim/ucsim/s51.src/uc51.cc +++ b/sim/ucsim/s51.src/uc51.cc @@ -30,9 +30,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include #include +#ifdef HAVE_TERMIOS_H #include -#include +#endif +#ifdef HAVE_UNISTD_H #include +#endif +#include #include #include #include @@ -148,8 +152,10 @@ cl_51core::mk_hw_elements(void) h->init(); hws->add(h= new cl_timer1(this, 1, "timer1")); h->init(); +#ifdef HAVE_TERMIOS_H hws->add(h= new cl_serial(this)); h->init(); +#endif hws->add(h= new cl_port(this, 0)); h->init(); hws->add(h= new cl_port(this, 1)); diff --git a/sim/ucsim/s51.src/uc51cl.h b/sim/ucsim/s51.src/uc51cl.h index 30818e7c..b3db9e02 100644 --- a/sim/ucsim/s51.src/uc51cl.h +++ b/sim/ucsim/s51.src/uc51cl.h @@ -31,7 +31,9 @@ #define UC51CL_HEADER #include +#ifdef HAVE_TERMIOS_H #include +#endif #include "pobjcl.h" diff --git a/sim/ucsim/z80.src/Makefile.in b/sim/ucsim/z80.src/Makefile.in index f99d384f..901d9c06 100644 --- a/sim/ucsim/z80.src/Makefile.in +++ b/sim/ucsim/z80.src/Makefile.in @@ -28,7 +28,7 @@ PICOPT = @PICOPT@ SHAREDLIB = @SHAREDLIB@ EXEEXT = @EXEEXT@ -LIBS = @LIBS@ -L$(top_builddir) -lsim -lutil -lguiucsim -lcmd -lsim +LIBS = -L$(top_builddir) -lsim -lutil -lguiucsim -lcmd -lsim @LIBS@ DL = @DL@ dl_ok = @dl_ok@ -- 2.30.2