diff --git a/libs_win32/app.h b/libs_win32/app.h index 847655f..b70c659 100644 --- a/libs_win32/app.h +++ b/libs_win32/app.h @@ -906,45 +906,7 @@ void app_coordinates_bitmap_to_window( app_t* app, int width, int height, int* x #elif defined( APP_WINDOWS ) -#define _CRT_NONSTDC_NO_DEPRECATE -#ifndef _CRT_SECURE_NO_WARNINGS -#define _CRT_SECURE_NO_WARNINGS -#endif -#if !defined( _WIN32_WINNT ) || _WIN32_WINNT < 0x0601 -#undef _WIN32_WINNT - #define _WIN32_WINNT 0x0601// requires Windows 7 minimum -#endif -// 0x0400=Windows NT 4.0, 0x0500=Windows 2000, 0x0501=Windows XP, 0x0502=Windows Server 2003, 0x0600=Windows Vista, -// 0x0601=Windows 7, 0x0602=Windows 8, 0x0603=Windows 8.1, 0x0A00=Windows 10, -#define _WINSOCKAPI_ -#pragma warning( push ) -#pragma warning( disable: 4619 ) // #pragma warning: there is no warning number 'nnnn' -#pragma warning( disable: 4668 ) // 'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives' -#pragma warning( disable: 4768 ) // __declspec attributes before linkage specification are ignored -#pragma warning( disable: 4255 ) // 'function' : no function prototype given: converting '()' to '(void)' -#pragma warning( disable: 4917 ) // 'declarator' : a GUID can only be associated with a class, interface or namespace -#define _NTDDSCM_H_ /* Fixes the error of mismatched pragma warning push/pop in Windows SDK 10.0.17763.0 */ -#include -//#include -#pragma warning( pop ) -#ifndef __TINYC__ -#pragma comment( lib, "user32.lib" ) -#pragma comment( lib, "gdi32.lib" ) -#pragma comment( lib, "winmm.lib" ) -#pragma comment( lib, "shell32.lib" ) -#else -#pragma comment( lib, "user32") -#pragma comment( lib, "gdi32") -#endif - -#include -#include - -#pragma warning( push ) -#pragma warning( disable: 4668 ) // 'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives' -#include -#pragma warning( pop ) #ifndef APP_MALLOC #include diff --git a/libs_win32/app_types.h b/libs_win32/app_types.h index dd0d56f..80dfc8a 100644 --- a/libs_win32/app_types.h +++ b/libs_win32/app_types.h @@ -263,7 +263,45 @@ struct app_t { void *dummy; }; #elif defined(APP_WINDOWS) +#define _CRT_NONSTDC_NO_DEPRECATE +#ifndef _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS +#endif + +#if !defined( _WIN32_WINNT ) || _WIN32_WINNT < 0x0601 +#undef _WIN32_WINNT + #define _WIN32_WINNT 0x0601// requires Windows 7 minimum +#endif +// 0x0400=Windows NT 4.0, 0x0500=Windows 2000, 0x0501=Windows XP, 0x0502=Windows Server 2003, 0x0600=Windows Vista, +// 0x0601=Windows 7, 0x0602=Windows 8, 0x0603=Windows 8.1, 0x0A00=Windows 10, +#define _WINSOCKAPI_ +#pragma warning( push ) +#pragma warning( disable: 4619 ) // #pragma warning: there is no warning number 'nnnn' +#pragma warning( disable: 4668 ) // 'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives' +#pragma warning( disable: 4768 ) // __declspec attributes before linkage specification are ignored +#pragma warning( disable: 4255 ) // 'function' : no function prototype given: converting '()' to '(void)' +#pragma warning( disable: 4917 ) // 'declarator' : a GUID can only be associated with a class, interface or namespace +#define _NTDDSCM_H_ /* Fixes the error of mismatched pragma warning push/pop in Windows SDK 10.0.17763.0 */ #include +//#include +#pragma warning( pop ) +#ifndef __TINYC__ +#pragma comment( lib, "user32.lib" ) +#pragma comment( lib, "gdi32.lib" ) +#pragma comment( lib, "winmm.lib" ) +#pragma comment( lib, "shell32.lib" ) +#else +#pragma comment( lib, "user32") +#pragma comment( lib, "gdi32") +#endif + +#include +#include + +#pragma warning( push ) +#pragma warning( disable: 4668 ) // 'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives' +#include +#pragma warning( pop ) #ifdef __cplusplus extern "C" { #endif // __cplusplus