Skip to content

Commit

Permalink
mingw-w64: Fix compiler warnings caused by macro redefinition
Browse files Browse the repository at this point in the history
GNU compiler report (cross build for Windows on Debian):

In file included from ../ccutil/host.h:63:0,
                 from ../arch/dotproductsse.h:22,
                 from ../arch/dotproductsse.cpp:43:
../ccutil/platform.h:27:0: warning: "NOMINMAX" redefined
 #define NOMINMAX

In file included from /usr/lib/gcc/i686-w64-mingw32/6.1-win32/include/c++/i686-w64-mingw32/bits/c++config.h:495:0,
                 from /usr/lib/gcc/i686-w64-mingw32/6.1-win32/include/c++/cstdlib:41,
                 from /usr/lib/gcc/i686-w64-mingw32/6.1-win32/include/c++/stdlib.h:36,
                 from /usr/lib/gcc/i686-w64-mingw32/6.1-win32/include/mm_malloc.h:27,
                 from /usr/lib/gcc/i686-w64-mingw32/6.1-win32/include/xmmintrin.h:34,
                 from /usr/lib/gcc/i686-w64-mingw32/6.1-win32/include/emmintrin.h:31,
                 from ../arch/dotproductsse.cpp:40:
/usr/lib/gcc/i686-w64-mingw32/6.1-win32/include/c++/i686-w64-mingw32/bits/os_defines.h:45:0:
 note: this is the location of the previous definition
 #define NOMINMAX 1

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Nov 29, 2016
1 parent 120a5db commit faea44c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ccutil/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@

#define DLLSYM
#ifdef _WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif /* NOMINMAX */
#define WIN32_LEAN_AND_MEAN
#ifdef __GNUC__
#define ultoa _ultoa
Expand Down

0 comments on commit faea44c

Please sign in to comment.