diff --git a/CHANGES b/CHANGES index 0884d2279..2310d895b 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,10 @@ CHANGES IN FLTK 1.3.5 RELEASED: ??? ?? 2017 Bug fixes and other improvements + - Windows/CMake: Add missing definition of WIN32 for Windows builds. + This seems to be necessary for VS2017 and other compilers that + don't #define WIN32, but FLTK relies on this preprocessor macro. + Autoconf/configure and bundled IDE files #define WIN32 as well. - Fix illegal memory access after free when closing fluid (valgrind reports "Invalid read of size 4"), see also STR #3427. - Fix crash when closing fluid with Fl_Table (STR #3427). diff --git a/CMake/setup.cmake b/CMake/setup.cmake index 33952fc5e..4d7c677c0 100644 --- a/CMake/setup.cmake +++ b/CMake/setup.cmake @@ -4,7 +4,7 @@ # CMakeLists.txt to build the FLTK project using CMake (www.cmake.org) # Written by Michael Surette # -# Copyright 1998-2015 by Bill Spitzak and others. +# Copyright 1998-2017 by Bill Spitzak and others. # # This library is free software. Distribution and use rights are outlined in # the file "COPYING" which should have been included with this file. If this @@ -68,6 +68,8 @@ set(FLTK_DOCDIR ${CMAKE_INSTALL_DATADIR}/doc CACHE PATH # platform dependent information ####################################################################### +# The following part is probably wrong but does no harm. +# This will be removed in FLTK 1.4.0. AlbrechtS, Dec 28, 2017. # fix no WIN32 defined issue if(NOT WIN32) if(_WIN32) @@ -107,6 +109,7 @@ if(APPLE) endif(APPLE) if(WIN32) + add_definitions(-DWIN32) if(MSVC) add_definitions(-DWIN32_LEAN_AND_MEAN) add_definitions(-D_CRT_SECURE_NO_WARNINGS)