#ifndef WIN32
/* headers for non-win32 */
-#ifndef __WATCOMC__
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_TYPES_H
***************************************************************************/
#include <stdio.h>
-#if defined(WIN32) || defined(__WATCOMC__)
+#if defined(WIN32)
#include <time.h>
#else
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
+#endif
#include <curl/curl.h>
#include <sys/socket.h>
#endif
#include <netinet/in.h>
-#ifndef __WATCOMC__
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_UNISTD_H
#include <sys/socket.h>
#endif
#include <netinet/in.h>
-#ifndef __WATCOMC__
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_UNISTD_H
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
-#ifndef __WATCOMC__
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_UNISTD_H
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
-#ifndef __WATCOMC__
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <sys/socket.h>
#endif
#include <netinet/in.h>
-#ifndef __WATCOMC__
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_UNISTD_H
#include <sys/socket.h>
#endif
#include <netinet/in.h>
-#ifndef __WATCOMC__
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_UNISTD_H
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
#include <time.h>
#else
-#ifndef __WATCOMC__ /* todo: Add HAVE_SYS_TIME_H */
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
-#ifndef __WATCOMC__
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_UNISTD_H
#include <sys/socket.h>
#endif
#include <netinet/in.h>
-#ifndef __WATCOMC__
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_UNISTD_H