From 41de3bef9c4332a97fc14f6d7f66b529657e7c1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Fillod=2C=20F8CFE?= Date: Wed, 5 May 2010 19:55:13 +0000 Subject: [PATCH] mingw portability git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2908 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- lib/win32termios.h | 4 +++- macros/gr_pwin32.m4 | 2 +- racal/Makefile.am | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/win32termios.h b/lib/win32termios.h index ce18544bc..d7764e62b 100644 --- a/lib/win32termios.h +++ b/lib/win32termios.h @@ -61,11 +61,13 @@ typedef unsigned int tcflag_t; interfaces. */ +#ifndef _TIMESPEC_DEFINED struct timespec { time_t tv_sec; long tv_nsec; }; +#endif #define NCCS 32 struct termios @@ -137,7 +139,7 @@ int win32_serial_select(int, struct fd_set *, struct fd_set *, struct fd_set *, void termios_interrupt_event_loop( int , int ); void termios_setflags( int , int[] ); struct termios_list *find_port( int ); -int usleep(unsigned long usec); +int usleep(unsigned int usec); int fcntl(int fd, int command, ...); const char *get_dos_port(const char *); void set_errno(int); diff --git a/macros/gr_pwin32.m4 b/macros/gr_pwin32.m4 index c123e052e..dcf7fb884 100644 --- a/macros/gr_pwin32.m4 +++ b/macros/gr_pwin32.m4 @@ -31,7 +31,7 @@ AC_CHECK_HEADERS([winioctl.h winbase.h], [], [], [ #endif ]) -AC_CHECK_FUNCS([getopt getopt_long usleep gettimeofday]) +AC_CHECK_FUNCS([getopt getopt_long usleep sleep gettimeofday]) AC_CHECK_TYPES([struct timezone, ssize_t],[],[],[ #if HAVE_SYS_TYPES_H # include diff --git a/racal/Makefile.am b/racal/Makefile.am index 312167a03..cdc7a94eb 100644 --- a/racal/Makefile.am +++ b/racal/Makefile.am @@ -3,6 +3,7 @@ RACALSRCLIST = ra6790.c ra3702.c lib_LTLIBRARIES = hamlib-racal.la hamlib_racal_la_SOURCES = $(RACALSRCLIST) racal.c ra37xx.c hamlib_racal_la_LDFLAGS = -no-undefined -module -avoid-version -hamlib_racal_la_LIBADD = $(top_builddir)/src/libhamlib.la +hamlib_racal_la_LIBADD = $(top_builddir)/src/libhamlib.la \ + $(top_builddir)/lib/libmisc.la noinst_HEADERS = racal.h ra37xx.h