X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=sim%2Fucsim%2Fcmd.src%2Fnewcmd.cc;h=fb1053ab6c9128e7b91b065abfaafb1d6266735e;hb=95b161f67718bee54c4713e173167a43162a01d9;hp=8aedf819bb357b4d0f69d998f97a2d5492577397;hpb=2c22a2ef761868ef7e4b1b82d33261b49841b458;p=fw%2Fsdcc diff --git a/sim/ucsim/cmd.src/newcmd.cc b/sim/ucsim/cmd.src/newcmd.cc index 8aedf819..fb1053ab 100644 --- a/sim/ucsim/cmd.src/newcmd.cc +++ b/sim/ucsim/cmd.src/newcmd.cc @@ -32,7 +32,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include #include -#ifdef HAVE_SYS_SOCKET_H +#ifdef _WIN32 +# include +# define SOCKET_AVAIL +#elif defined HAVE_SYS_SOCKET_H # include # include # include @@ -42,7 +45,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #if FD_HEADER_OK # include HEADER_FD #endif -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "i_string.h" #include "cmdlexcl.h" @@ -792,7 +797,9 @@ cl_commander::init(void) exec_on(con, Config); need_config= DD_FALSE; } - if (need_config) + if (need_config && + Config && + *Config) { FILE *fc= fopen(Config, "r"); if (!fc)