+2006-07-31 Borut Razem <borut.razem AT siol.net>
+
+ * 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 <borut.razem AT siol.net>
* Small Device C Compiler 2.6.0 released
2006-07-28 Borut Razem <borut.razem AT siol.net>
- * 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 <borut.razem AT siol.net>
2006-06-25 Borut Razem <borut.razem AT siol.net>
* 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!
* 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)
2006-04-18 Borut Razem <borut.razem AT siol.net>
- * 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 <borut.razem AT siol.net>
2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
- * 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 <epetrich AT ivorytower.norman.ok.us>
2005-05-26 Raphael Neider <rneider AT web.de>
* 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 <rneider AT web.de>
* 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 <sourceforge.brock AT dse.nl>
- * device/lib/_strncpy.c: fixed not filling with \0
+ * device/lib/_strncpy.c: fixed not filling with /0
2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
(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 <borut.razem AT siol.net>
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,
2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
- * 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 <sourceforge.brock AT dse.nl>
_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 <bernhard AT bernhardheld.de>
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
2003-10-31 Borut Razem <borut.razem AT siol.net>
- * 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
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 <bernhard AT bernhardheld.de>
2003-08-01 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
- * 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 <jesusc AT ece.ubc.ca>
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
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
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 <jesusc AT ece.ubc.ca>
2003-06-18 Bernhard Held <bernhard AT bernhardheld.de>
- * 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 <borut.razem AT siol.net>
* 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 <bernhard AT bernhardheld.de>
* 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 <paul AT pjrc.com>
2003-01-12 Bernhard Held <bernhard AT bernhardheld.de>
* 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 <bernhard AT bernhardheld.de>
2002-12-10 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
- * 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 <jesusc AT ece.ubc.ca>
- * \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 <jesusc AT ece.ubc.ca>
- * \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 <wiml AT hhhh.org>
compact code for X = LITERAL - Y
2002-09-00 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
- * \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 <jesusc AT ece.ubc.ca>
- * \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 <jesusc AT ece.ubc.ca>
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 <borut.razem AT siol.net>
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 <bernhard AT bernhardheld.de>
* src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
#ifdef HAVE_GETOPT_H
# include <getopt.h>
#endif
-#ifdef _WIN32
-# include <winsock2.h>
-# define SOCKET_AVAIL
-#elif defined HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
+#ifdef SOCKET_AVAIL
+# include HEADER_SOCKET
#endif
#include <ctype.h>
#include <errno.h>
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@
#include <stdlib.h>
#include <ctype.h>
#include <sys/types.h>
-#ifdef _WIN32
-# include <winsock2.h>
-# define SOCKET_AVAIL
-#elif defined HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-# include <netinet/in.h>
-# include <arpa/inet.h>
+#ifdef SOCKET_AVAIL
+# include HEADER_SOCKET
+# if defined HAVE_SYS_SOCKET_H
+# include <netinet/in.h>
+# include <arpa/inet.h>
+# endif
#endif
#include "i_string.h"
#include <stdarg.h>
#include <stdlib.h>
#include <sys/types.h>
-#ifdef _WIN32
-# include <winsock2.h>
-# define SOCKET_AVAIL
-#elif defined HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-# include <netinet/in.h>
-# include <arpa/inet.h>
-# include <netdb.h>
-#endif
#include <sys/time.h>
+#ifdef SOCKET_AVAIL
+# include HEADER_SOCKET
+# if defined HAVE_SYS_SOCKET_H
+# include <netinet/in.h>
+# include <arpa/inet.h>
+# include <netdb.h>
+# endif
+#endif
#if FD_HEADER_OK
# include HEADER_FD
#endif
cl_console::input_avail(void)
{
struct timeval tv;
- int i;
+ UCSOCKET_T i;
if ((i= get_in_fd()) < 0)
return(0);
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)
{
int
cl_commander::proc_input(void)
{
- int i;
+ UCSOCKET_T i;
for (i= 0; i < fd_num; i++)
if (FD_ISSET(i, &active_set))
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;
# include <unistd.h>
#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.
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 <termios.h>
+_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 <termios.h>
+_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 <curses.h>
+_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 <curses.h>
+_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
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="<sys/socket.h>"
+
+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 <winsock2.h>
+_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 <winsock2.h>
+_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="<winsock2.h>"
+
+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 <sys/socket.h>
+#include <$ucsim_cv_socket>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
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
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+#include <winsock2.h>
+#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="<winsock2.h>"
+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 <sys/time.h>
#ifdef FD_ZERO
yes
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "yes" >/dev/null 2>&1; then
- ucsim_cv_fd="<sys/types.h>"
+ ucsim_cv_fd="<sys/select.h>"
fi
rm -f conftest*
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
#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
#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
# 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
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
#,
#-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
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
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
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
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
-#include <sys/socket.h>
+#include ${ucsim_cv_socket}
int
main ()
{
# 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
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
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="<sys/socket.h>"
)
+
+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="<winsock2.h>"
+ )
+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
AC_CACHE_CHECK(which header file defines FD_ macros, ucsim_cv_fd,
[ucsim_cv_fd="unknown"
AC_EGREP_CPP(yes, [
+#include <winsock2.h>
+#ifdef FD_ZERO
+yes
+#endif], ucsim_cv_fd="<winsock2.h>")
+AC_EGREP_CPP(yes, [
#include <sys/time.h>
#ifdef FD_ZERO
yes
#include <sys/select.h>
#ifdef FD_ZERO
yes
-#endif], ucsim_cv_fd="<sys/types.h>")])
+#endif], ucsim_cv_fd="<sys/select.h>")])
-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",
#,
#-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)
for ac_val in int size_t socklen_t; do
CPPFLAGS="$ac_save_CPPFLAGS -DACCEPT_SOCKLEN_T=$ac_val"
AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/socket.h>],
+#include ${ucsim_cv_socket}],
[struct sockaddr a; $ac_val len; accept (0, &a, &len);],
[ucsim_cv_accept_length_type=$ac_val; break])
done
# 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
#define DD_TRUE 1
#define DD_FALSE 0
- //#define bool int
#define NIL 0
#undef STDC_HEADERS
#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
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@
#define uint8 unsigned char
#define int8 char
-const bool TRUE = 1;
-const bool FALSE = 0;
-
/*******************************************************************/
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:
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);
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);
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@
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)
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
+#ifdef HAVE_TERMIOS_H
#include <termios.h>
+#endif
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <errno.h>
#include <fcntl.h>
#include <sys/time.h>
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
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
+#ifdef HAVE_TERMIOS_H
#include <termios.h>
-#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
+#include <fcntl.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/time.h>
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));
#define UC51CL_HEADER
#include <stdio.h>
+#ifdef HAVE_TERMIOS_H
#include <termios.h>
+#endif
#include "pobjcl.h"
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@