Skip to content

Commit

Permalink
Replace macro MINGW by __MINGW32__
Browse files Browse the repository at this point in the history
MINGW is no longer used and now removed from configure.ac.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Sep 4, 2018
1 parent 4fa2a34 commit be1393b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ AC_CONFIG_HEADERS([config_auto.h:config/config.h.in])

# default conditional
AM_CONDITIONAL([T_WIN], false)
AM_CONDITIONAL([MINGW], false)
AM_CONDITIONAL([OSX], false)
AM_CONDITIONAL([GRAPHICS_DISABLED], false)
AC_SUBST([AM_CPPFLAGS])
Expand All @@ -83,9 +82,7 @@ OPENCL_LIBS="-lOpenCL"
AC_CANONICAL_HOST
case "${host_os}" in
mingw*)
AC_DEFINE_UNQUOTED([MINGW], 1, [This is a MinGW system])
AM_CONDITIONAL([T_WIN], true)
AM_CONDITIONAL([MINGW], true)
AM_CONDITIONAL([ADD_RT], false)
AC_SUBST([AM_LDFLAGS], ['-Wl,-no-undefined -Wl,--as-needed'])
;;
Expand Down
4 changes: 2 additions & 2 deletions src/api/baseapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
#endif

#if defined(_WIN32)
#if defined(MINGW)
#if defined(__MINGW32__)
// workaround for stdlib.h with -std=c++11 for _splitpath and _MAX_FNAME
#undef __STRICT_ANSI__
#endif // MINGW
#endif // __MINGW32__
#include <fcntl.h>
#include <io.h>
#else
Expand Down
2 changes: 1 addition & 1 deletion src/ccstruct/pdblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ void PDBLK::plot( //draw outline
// tprintf("Block %d bottom left is (%d,%d)\n",
// serial,startpt.x(),startpt.y());
char temp_buff[34];
#if !defined(_WIN32) || defined(MINGW)
#if !defined(_WIN32) || defined(__MINGW32__)
snprintf(temp_buff, sizeof(temp_buff), "%" PRId32, serial);
#else
ultoa (serial, temp_buff, 10);
Expand Down
2 changes: 1 addition & 1 deletion src/ccstruct/polyblk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ void POLY_BLOCK::plot(ScrollView* window, int32_t num) {
if (num > 0) {
window->TextAttributes("Times", 80, false, false, false);
char temp_buff[34];
#if !defined(_WIN32) || defined(MINGW)
#if !defined(_WIN32) || defined(__MINGW32__)
snprintf(temp_buff, sizeof(temp_buff), "%" PRId32, num);
#else
ltoa (num, temp_buff, 10);
Expand Down

0 comments on commit be1393b

Please sign in to comment.