Windows support contribution:

- Move CMake modules from cmake_modules/ to cmake/modules/
 - CMake now use cmake/config_windows.h.cmake to create config.h on Windows platform
 - contrib/windows.h header is automagically included by config.h
 - Put missing NFC_EXPORT macro on front of emulation API
 - nfc-mfclassic and nfc-mfcultralight examples are now compiled under Windows
Many thanks to Glenn Ergeerts which provide the initial patch.
This commit is contained in:
Romuald Conty 2011-03-31 13:38:49 +00:00
parent b471f56c52
commit 5db8be908b
20 changed files with 37 additions and 31 deletions

View file

@ -27,11 +27,15 @@
#define __WINDOWS_H__
# include <windows.h>
# include <winerror.h>
# include "win32/err.h"
# if defined (__MINGW32__)
# define snprintf(S, n, F, ...) sprintf(S, F, __VA_ARGS__)
# define MAX(a,b) max(a,b)
# define MIN(a,b) min(a,b)
# define pipe(fds) _pipe(fds, 5000, _O_BINARY)
# define ETIMEDOUT WSAETIMEDOUT
# define ENOTSUP 134
# else
# define snprintf sprintf_s
# define strdup _strdup