A patch to enable compiling on latest mingw env.

Contributed by TOYAMA Shin-ichi
This commit is contained in:
Bill Kendrick 2017-12-30 10:53:08 -08:00
parent fce3d93399
commit b0c1546b1b
2 changed files with 4 additions and 34 deletions

View file

@ -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); \

View file

@ -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.