From b37f099b18bbe07ac3b26a489ce028165f48e719 Mon Sep 17 00:00:00 2001 From: Patrick McIlroy Date: Thu, 20 Mar 2008 01:01:58 +0000 Subject: [PATCH] git-svn-id: https://openitg.svn.sourceforge.net/svnroot/openitg@158 83fadc84-e282-4d84-a09a-c4228d6ae7e5 --- src/ibutton/getkey.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ibutton/getkey.cpp b/src/ibutton/getkey.cpp index dbf623c6..bc3c8d3e 100644 --- a/src/ibutton/getkey.cpp +++ b/src/ibutton/getkey.cpp @@ -13,8 +13,11 @@ int getKey(const uchar *subkey, uchar *output) { memcpy(firstDataPage, subkey, 32); - // XXX: this looks suspiciously non-portable. +#ifdef WIN32 + if ((copr.portnum = owAcquireEx("COM1")) == -1) { +#else if ((copr.portnum = owAcquireEx("/dev/ttyS0")) == -1) { +#endif LOG->Warn("getKey(): failed to acquire port.\n"); return -1; } -- 2.11.0