X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=include%2Fncurses_dll.h.in;h=aa2579c682dec6e409ff4ade406a85acf277ff35;hp=82c9b85ca542a8454d58be2c6bb405d1240fdfa8;hb=8890c8f28a1db5995ef17f52a7d8c0b9cf574210;hpb=3ce2c58251fe1353768cc630103cdb12ecc8be0a diff --git a/include/ncurses_dll.h.in b/include/ncurses_dll.h.in index 82c9b85c..aa2579c6 100644 --- a/include/ncurses_dll.h.in +++ b/include/ncurses_dll.h.in @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2014,2018 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -25,11 +25,41 @@ * sale, use or other dealings in this Software without prior written * * authorization. * ****************************************************************************/ -/* $Id: ncurses_dll.h.in,v 1.8 2009/04/04 22:26:27 tom Exp $ */ +/* $Id: ncurses_dll.h.in,v 1.11 2018/06/23 21:38:14 tom Exp $ */ #ifndef NCURSES_DLL_H_incl #define NCURSES_DLL_H_incl 1 +/* + * MinGW gcc (unlike MSYS2 and Cygwin) should define _WIN32 and possibly _WIN64. + */ +#if defined(__MINGW64__) + +#ifndef _WIN64 +#define _WIN64 1 +#endif + +#elif defined(__MINGW32__) + +#ifndef _WIN32 +#define _WIN32 1 +#endif + +/* 2014-08-02 workaround for broken MinGW compiler. + * Oddly, only TRACE is mapped to trace - the other -D's are okay. + * suggest TDM as an alternative. + */ +#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8) + +#ifdef trace +#undef trace +#define TRACE +#endif + +#endif /* broken compiler */ + +#endif /* MingW */ + /* * For reentrant code, we map the various global variables into SCREEN by * using functions to access them. @@ -44,7 +74,7 @@ #undef NCURSES_DLL #define NCURSES_STATIC -#if defined(__CYGWIN__) || defined(__MINGW32__) +#if defined(__CYGWIN__) || defined(_WIN32) # if defined(NCURSES_DLL) # if defined(NCURSES_STATIC) # undef NCURSES_STATIC