From 3fff5985fc03d8737cb5332d76c99daf6a034dac Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Thu, 31 Jan 2013 15:58:20 +0100 Subject: [PATCH] Moves Windows conditional code to dedicated files --- contrib/win32/unistd.h | 8 +++++++- utils/nfc-read-forum-tag3.c | 4 ---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/contrib/win32/unistd.h b/contrib/win32/unistd.h index bc7965c..851dc60 100644 --- a/contrib/win32/unistd.h +++ b/contrib/win32/unistd.h @@ -1,7 +1,7 @@ /*- * Public platform independent Near Field Communication (NFC) library * - * Copyright (C) 2011, 2012 Romuald Conty + * Copyright (C) 2011, 2012, 2013 Romuald Conty * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by the @@ -31,5 +31,11 @@ # include # define sleep(X) Sleep( X * 1000) +// With MinGW, getopt(3) is provided as separate header +#if defined(WIN32) && defined(__GNUC__) /* mingw compiler */ + #include +#endif + + #endif /* _UNISTD_H_ */ diff --git a/utils/nfc-read-forum-tag3.c b/utils/nfc-read-forum-tag3.c index 643e5f4..f522727 100644 --- a/utils/nfc-read-forum-tag3.c +++ b/utils/nfc-read-forum-tag3.c @@ -55,10 +55,6 @@ #include "nfc-utils.h" -#if defined(WIN32) && defined(__GNUC__) /* mingw compiler */ - #include -#endif - static nfc_device *pnd; static void