diff --git a/.gitignore b/.gitignore index 318dcfc..170b8ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *~ +*.exe Doxyfile INSTALL Makefile @@ -11,6 +12,7 @@ cmake/Makefile cmake/Makefile.in cmake/modules/Makefile cmake/modules/Makefile.in +compile config.guess config.h config.h.in @@ -102,6 +104,7 @@ test/.deps/ test/.libs/ test/Makefile test/Makefile.in +test-driver utils/*.la utils/*.lo utils/*.o diff --git a/libnfc/buses/uart.c b/libnfc/buses/uart.c index c098036..7f14532 100644 --- a/libnfc/buses/uart.c +++ b/libnfc/buses/uart.c @@ -77,12 +77,19 @@ const char *serial_ports_device_radix[] = { "tty.SLAB_USBtoUART", "tty.usbserial", "tty.usbmodem", NULL }; # elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__FreeBSD_kernel__) const char *serial_ports_device_radix[] = { "cuaU", "cuau", NULL }; -# elif defined (__linux__) +# elif defined (__linux__) || defined (__CYGWIN__) const char *serial_ports_device_radix[] = { "ttyUSB", "ttyS", "ttyACM", "ttyAMA", "ttyO", NULL }; # else # error "Can't determine serial string for your system" # endif +// As of 2015/Feb/22, Cygwin does not handle FIONREAD on physical serial devices. +// We'll use TIOCINQ instead which is pretty much the same. +#ifdef __CYGWIN__ +# include +# define FIONREAD TIOCINQ +#endif + // Work-around to claim uart interface using the c_iflag (software input processing) from the termios struct # define CCLAIMED 0x80000000 diff --git a/libnfc/nfc.c b/libnfc/nfc.c index 4294367..2820a14 100644 --- a/libnfc/nfc.c +++ b/libnfc/nfc.c @@ -1307,6 +1307,8 @@ str_nfc_baud_rate(const nfc_baud_rate nbr) case NBR_847: return "847 kbps"; } + + return "???"; } /** @ingroup string-converter @@ -1335,6 +1337,8 @@ str_nfc_modulation_type(const nfc_modulation_type nmt) case NMT_DEP: return "D.E.P."; } + + return "???"; } /** @ingroup string-converter diff --git a/utils/Makefile.am b/utils/Makefile.am index 9637d25..2555bcd 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -14,6 +14,7 @@ AM_CPPFLAGS = $(all_includes) $(LIBNFC_CFLAGS) noinst_LTLIBRARIES = libnfcutils.la libnfcutils_la_SOURCES = nfc-utils.c +libnfcutils_la_LIBADD = -lnfc nfc_emulate_forum_tag4_SOURCES = nfc-emulate-forum-tag4.c nfc-utils.h nfc_emulate_forum_tag4_LDADD = $(top_builddir)/libnfc/libnfc.la \