From b372a1f86c7cf11a9b0023c06a51b90037781c70 Mon Sep 17 00:00:00 2001 From: Sergio Gonzalez Date: Mon, 21 Sep 2015 12:18:18 -0500 Subject: [PATCH] Avoid macro redefinition in Win32 --- stb_image_write.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stb_image_write.h b/stb_image_write.h index 38d3835..b963604 100644 --- a/stb_image_write.h +++ b/stb_image_write.h @@ -98,12 +98,12 @@ CREDITS: github:Chribba Guillaume Chereau github:jry2 - + LICENSE This software is in the public domain. Where that dedication is not recognized, you are granted a perpetual, irrevocable license to copy, -distribute, and modify this file as you see fit. +distribute, and modify this file as you see fit. */ @@ -144,8 +144,12 @@ STBIWDEF int stbi_write_hdr_to_func(stbi_write_func *func, void *context, int w, #ifdef STB_IMAGE_WRITE_IMPLEMENTATION #ifdef _WIN32 + #ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS + #endif + #ifndef _CRT_NONSTDC_NO_DEPRECATE #define _CRT_NONSTDC_NO_DEPRECATE + #endif #endif #ifndef STBI_WRITE_NO_STDIO