/*
* krypt-core API - C version
*
* Copyright (C) 2011
* Hiroshi Nakamura <nahi@ruby-lang.org>
* Martin Bosslet <martin.bosslet@googlemail.com>
* All rights reserved.
*
* This software is distributed under the same license as Ruby.
* See the file 'LICENSE' for further details.
*/

#if !defined(_KRYPT_OS_H_)
#define _KRYPT_OS_H_

#ifdef WIN32
#define krypt_last_sys_error()	GetLastError()
#define krypt_clear_sys_error()	SetLastError(0)
#else
#define krypt_last_sys_error()	errno
#define krypt_clear_sys_error()	errno=0
#endif

#endif /* _KRYPT_OS_H_ */

/*
* krypt-core API - C version
*
* Copyright (C) 2011
* Hiroshi Nakamura <nahi@ruby-lang.org>
* Martin Bosslet <martin.bosslet@googlemail.com>
* All rights reserved.
*
* This software is distributed under the same license as Ruby.
* See the file 'LICENSE' for further details.
*/

#if !defined(_KRYPT_OS_H_)
#define _KRYPT_OS_H_

#ifdef _WIN32
#define krypt_last_sys_error()	GetLastError()
#define krypt_clear_sys_error()	SetLastError(0)
#else
#define krypt_last_sys_error()	errno
#define krypt_clear_sys_error()	errno=0
#endif

#endif /* _KRYPT_OS_H_ */

Use _WIN32 macro instead of WIN32
Use _WIN32 macro instead of WIN32

_WIN32 is the official macro described in MSDN:

http://msdn.microsoft.com/en-us/library/b0084kay.aspx

(under Microsoft-Specific Predefined Macros)
