From 67b37a26aadaefd1d73a1e0760254d08b479c083 Mon Sep 17 00:00:00 2001 From: Earnie Boyd Date: Mon, 30 Jul 2012 14:49:16 +0000 Subject: [PATCH] * include/_mingw.h: Add __MINGW_VERSION, __MINGW_MAJOR_VERSION, __MINGW_MINOR_VERSION and __MINGW_PATCHLEVEL deprecating the __MINGW32_* versions of the macros. * configure.in: Use __MINGW_VERSION instead of __MINGW32_VERSION. * configure: Ditto. --- winsup/mingw/ChangeLog | 5 +++++ winsup/mingw/configure | 2 +- winsup/mingw/configure.in | 2 +- winsup/mingw/include/_mingw.h | 15 +++++++++++---- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog index 4f4aa481a..edf023911 100644 --- a/winsup/mingw/ChangeLog +++ b/winsup/mingw/ChangeLog @@ -4,6 +4,11 @@ _WIN64 is defined. * include/inttypes.h: A few items like PRNdPTR and SCNdPTR need 64 bitness specified when _WIN64 is defined. + * include/_mingw.h: Add __MINGW_VERSION, __MINGW_MAJOR_VERSION, + __MINGW_MINOR_VERSION and __MINGW_PATCHLEVEL deprecating the __MINGW32_* + versions of the macros. + * configure.in: Use __MINGW_VERSION instead of __MINGW32_VERSION. + * configure: Ditto. 2012-05-08 Keith Marshall diff --git a/winsup/mingw/configure b/winsup/mingw/configure index 1ca8b5336..598ed6d9d 100755 --- a/winsup/mingw/configure +++ b/winsup/mingw/configure @@ -1788,7 +1788,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking package version" >&5 $as_echo_n "checking package version... " >&6; } - PACKAGE_VERSION=`awk '$2 == "'"__MINGW32_VERSION"'" { print $3 }' ${srcdir}/include/_mingw.h` + PACKAGE_VERSION=`awk '$2 == "'"__MINGW_VERSION"'" { print $3 }' ${srcdir}/include/_mingw.h` { $as_echo "$as_me:$LINENO: result: $PACKAGE_VERSION" >&5 $as_echo "$PACKAGE_VERSION" >&6; } diff --git a/winsup/mingw/configure.in b/winsup/mingw/configure.in index 92dbd3d1d..eccf84074 100644 --- a/winsup/mingw/configure.in +++ b/winsup/mingw/configure.in @@ -18,7 +18,7 @@ dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. AC_PREREQ([2.59]) AC_INIT([MinGW Runtime], [v3.x], [http://mingw.org/reporting_bugs], [mingwrt]) -MINGW_AC_CONFIG_SRCDIR([__MINGW32_VERSION], [include/_mingw.h]) +MINGW_AC_CONFIG_SRCDIR([__MINGW_VERSION], [include/_mingw.h]) AC_CANONICAL_SYSTEM GCC_NO_EXECUTABLES diff --git a/winsup/mingw/include/_mingw.h b/winsup/mingw/include/_mingw.h index cb0ff53a7..a59b2e1df 100644 --- a/winsup/mingw/include/_mingw.h +++ b/winsup/mingw/include/_mingw.h @@ -22,6 +22,13 @@ */ #define __MINGW_H +#define __MINGW_VERSION 4 +#define __MINGW_MAJOR_VERSION 0 +#define __MINGW_MINOR_VERSION 0 +#define __MINGW_PATCHLEVEL 0 + +// These four macros are deprecated and will be removed in the next major +// version release. #define __MINGW32_VERSION 3.20 #define __MINGW32_MAJOR_VERSION 3 #define __MINGW32_MINOR_VERSION 20 @@ -40,10 +47,10 @@ __MINGW_IMPORT The attribute definition to specify imported variables/functions. _CRTIMP As above. For MS compatibility. - __MINGW32_VERSION Runtime version. - __MINGW32_MAJOR_VERSION Runtime major version. - __MINGW32_MINOR_VERSION Runtime minor version. - __MINGW32_BUILD_DATE Runtime build date. + __MINGW_VERSION Runtime version. + __MINGW_MAJOR_VERSION Runtime major version. + __MINGW_MINOR_VERSION Runtime minor version. + __MINGW_BUILD_DATE Runtime build date. Macros to enable MinGW features which deviate from standard MSVC compatible behaviour; these may be specified directly in user code,