From ab8bb164853576b68365ffa03467ebc56edd3206 Mon Sep 17 00:00:00 2001 From: Joby Taffey Date: Sun, 11 Mar 2012 00:21:22 +0000 Subject: [PATCH] Futile attempts to build Windows version in Cygwin. --- README.markdown | 9 +++++++++ cctl-prog/cctl-prog.c | 6 ++++-- cctl-prog/hex.c | 4 ++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 912ef08..3902c83 100644 --- a/README.markdown +++ b/README.markdown @@ -152,3 +152,12 @@ Open source implementations of protcol * Teensy (C) https://github.com/jkerdels/open_imme/tree/master/tools/teensy-prog * Linux GPIO sysfs (C) https://github.com/ffainelli/cc2530prog +Building for Windows +-------------------- + +`cctl-prog` is currently built for Windows using the mingw32 cross compiler from Linux. + + make -f Makefile.mingw32 + +Compiling cctl-prog with cygwin's GCC may not work. + diff --git a/cctl-prog/cctl-prog.c b/cctl-prog/cctl-prog.c index f717c2a..98620bb 100644 --- a/cctl-prog/cctl-prog.c +++ b/cctl-prog/cctl-prog.c @@ -9,6 +9,10 @@ #include #include +#ifdef __CYGWIN__ +#define WIN32 1 +#endif + #define SERIAL_TIMEOUT 2 #ifndef WIN32 @@ -18,8 +22,6 @@ #include #include #include -#define O_NOCTTY 0 -#define O_NDELAY 0 #define B115200 115200 #endif diff --git a/cctl-prog/hex.c b/cctl-prog/hex.c index d1eaaa4..00ebcce 100644 --- a/cctl-prog/hex.c +++ b/cctl-prog/hex.c @@ -7,6 +7,10 @@ #include #include +#ifdef __CYGWIN__ +#define WIN32 1 +#endif + #ifndef WIN32 #include #else