diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/PlatWin.cxx | 4 | ||||
-rw-r--r-- | win32/Scintilla.vcxproj | 2 | ||||
-rw-r--r-- | win32/makefile | 1 | ||||
-rw-r--r-- | win32/scintilla.mak | 2 |
4 files changed, 4 insertions, 5 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 0b36c42da..c3157416a 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -3860,7 +3860,7 @@ void Platform::DebugPrintf(const char *format, ...) noexcept { char buffer[2000]; va_list pArguments; va_start(pArguments, format); - vsprintf(buffer,format,pArguments); + vsnprintf(buffer, std::size(buffer), format, pArguments); va_end(pArguments); Platform::DebugDisplay(buffer); } @@ -3879,7 +3879,7 @@ bool Platform::ShowAssertionPopUps(bool assertionPopUps_) noexcept { void Platform::Assert(const char *c, const char *file, int line) noexcept { char buffer[2000] {}; - sprintf(buffer, "Assertion [%s] failed at %s %d%s", c, file, line, assertionPopUps ? "" : "\r\n"); + snprintf(buffer, std::size(buffer), "Assertion [%s] failed at %s %d%s", c, file, line, assertionPopUps ? "" : "\r\n"); if (assertionPopUps) { const int idButton = ::MessageBoxA(0, buffer, "Assertion failure", MB_ABORTRETRYIGNORE|MB_ICONHAND|MB_SETFOREGROUND|MB_TASKMODAL); diff --git a/win32/Scintilla.vcxproj b/win32/Scintilla.vcxproj index b8c6c4152..130a76ea6 100644 --- a/win32/Scintilla.vcxproj +++ b/win32/Scintilla.vcxproj @@ -84,7 +84,7 @@ <ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level4</WarningLevel>
- <PreprocessorDefinitions>SCI_EMPTYCATALOGUE;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\include;..\src;</AdditionalIncludeDirectories>
<BrowseInformation>true</BrowseInformation>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
diff --git a/win32/makefile b/win32/makefile index c1829a45e..4899c7ab0 100644 --- a/win32/makefile +++ b/win32/makefile @@ -19,7 +19,6 @@ WARNINGS = -Wpedantic -Wall -Wextra ifdef CLANG CXX = clang++ -DEFINES += -D_CRT_SECURE_NO_DEPRECATE else # MinGW GCC LIBSMINGW = -lstdc++ diff --git a/win32/scintilla.mak b/win32/scintilla.mak index f4eb67dcc..19c50ac94 100644 --- a/win32/scintilla.mak +++ b/win32/scintilla.mak @@ -35,7 +35,7 @@ SUBSYSTEM=-SUBSYSTEM:WINDOWS,10.00 !ENDIF !ENDIF -CRTFLAGS=-D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1 -D_CRT_SECURE_NO_DEPRECATE=1 -D_SCL_SECURE_NO_WARNINGS=1 $(ADD_DEFINE) +CRTFLAGS=$(ADD_DEFINE) CXXFLAGS=-Zi -TP -MP -W4 -EHsc -std:c++17 $(CRTFLAGS) CXXDEBUG=-Od -MTd -DDEBUG CXXNDEBUG=-O2 -MT -DNDEBUG -GL |