* sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
[fw/sdcc] / sim / ucsim / app.cc
index f357afefc29766e67761d318cd05b626f8251177..bc8e81a45939689bef59c3fb036d7f9c37799ac9 100644 (file)
@@ -30,12 +30,17 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 #ifdef HAVE_GETOPT_H
 # include <getopt.h>
 #endif
-#ifdef SOCKET_AVAIL
-#include <sys/socket.h>
+#ifdef _WIN32
+# include <winsock2.h>
+# define SOCKET_AVAIL
+#elif defined HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
 #endif
 #include <ctype.h>
 #include <errno.h>