From b0c1546b1b7f0c33e16cdb19a116a76ee298ecec Mon Sep 17 00:00:00 2001 From: Bill Kendrick Date: Sat, 30 Dec 2017 10:53:08 -0800 Subject: [PATCH] A patch to enable compiling on latest mingw env. Contributed by TOYAMA Shin-ichi --- Makefile | 6 +++--- src/compiler.h | 32 +------------------------------- 2 files changed, 4 insertions(+), 34 deletions(-) diff --git a/Makefile b/Makefile index 463dfbcae..10ebbab8a 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Tux Paint - A simple drawing program for children. -# Copyright (c) 2002-2016 by Bill Kendrick and others +# Copyright (c) 2002-2017 by Bill Kendrick and others # bill@newbreedsoftware.com # http://www.tuxpaint.org/ -# June 14, 2002 - December 11, 2016 +# June 14, 2002 - December 30, 2017 # The version number, for release: @@ -894,7 +894,7 @@ install-dlls: @cp `which libgcc_s_dw2-1.dll` $(BIN_PREFIX) @cp `which libstdc++-6.dll` $(BIN_PREFIX) @cp `which libfribidi-0.dll` $(BIN_PREFIX) - @cp `which libpthread-2.dll` $(BIN_PREFIX) + @cp `which libwinpthread-1.dll` $(BIN_PREFIX) @if [ "x$(BDIST_WIN9X)" == "x" ]; then \ cp `which libxml2-2.dll` $(BIN_PREFIX); \ cp `which libcairo-2.dll` $(BIN_PREFIX); \ diff --git a/src/compiler.h b/src/compiler.h index bbbf50534..5afeec307 100644 --- a/src/compiler.h +++ b/src/compiler.h @@ -24,40 +24,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - June 14, 2002 - February 24, 2010 + June 14, 2002 - December 30, 2017 $Id$ */ -#ifdef WIN32 -/* Horrible, dangerous macros. */ -/* - The SDL stderr redirection trick doesn't seem to work for perror(). - This does pretty much the same thing. -*/ -#define perror(str) ({ \ - if ( (str) && *(str) ) \ - fprintf(stderr,"%s : ",(str)); \ - fprintf(stderr, \ - "%s [%d]\n", \ - (errno<_sys_nerr)?_sys_errlist[errno]:"unknown",errno ); \ -}) - -/* - MinGW implementation of isspace() crashes on some Win98 boxes - if c is 'out-of-range'. -*/ -#define isspace(c) (((c) == 0x20) || ((c) >= 0x09 && (c) <= 0x0D)) - -/* - WIN32 and MINGW don't have strcasestr(). -*/ -#define NOMINMAX -#include "shlwapi.h" -#define strcasestr StrStrI -#endif /* WIN32 */ - - - #ifndef __HAIKU__ #ifdef __GNUC__ // This version has strict type checking for safety.