This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw.org-wsl".
The branch, 4.0-dev has been updated
via b3ab412d563a983e4d6e8d28e2e8d15ba6f316e6 (commit)
from f9e41928dd03382f262678acb3781ac68c671f83 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://mingw.git.sourceforge.net/git/gitweb.cgi?p=mingw/mingw.org-wsl;a=commitdiff;h=
commit 21762bb4a1bd0c88c38eead03f59e8d994349e83
Author: Earnie Boyd <earnie@...>
Date: Tue Oct 16 10:13:14 2012 -0400
Correct value of _WIN32_WINNT.
* include/sdkddkver.h (WINNTVER): New macro.
(_WIN32_WINNT): Correct default value based on NTDDI_VERSION.
* include/stdio.h (_get_output_format): Base declaration or define on
VISTA.
(_set_output_format): Ditto.
(_get_printf_count_output): Ditto.
(_set_printf_count_output): Ditto.
* misc/src/libcrt/stdio/pformat.c: Remove needless code since we only
care about Windows.
diff --git a/ChangeLog b/ChangeLog
index 0a33c38..6185af9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2012-10-16 Earnie Boyd <earnie@...>
+
+ * include/sdkddkver.h (WINNTVER): New macro.
+ (_WIN32_WINNT): Correct default value based on NTDDI_VERSION.
+ * include/stdio.h (_get_output_format): Base declaration or define on
+ VISTA.
+ (_set_output_format): Ditto.
+ (_get_printf_count_output): Ditto.
+ (_set_printf_count_output): Ditto.
+ * misc/src/libcrt/stdio/pformat.c: Remove needless code since we only
+ care about Windows.
+
2012-10-08 Earnie Boyd <earnie@...>
* Makefile.in (dist-mingwrt-src, dist-mingw32-src, dist-wsl-src):
diff --git a/include/sdkddkver.h b/include/sdkddkver.h
index 8323eeb..a9d2fd1 100644
--- a/include/sdkddkver.h
+++ b/include/sdkddkver.h
@@ -44,6 +44,7 @@
#define OSVER(ver) ((ver) & OSVERSION_MASK)
#define SPVER(ver) (((ver) & SPVERSION_MASK) >> 8)
#define SUBVER(ver) ((ver) & SUBVERSION_MASK)
+#define WINNTVER(ver) ((ver) / 0x00010000)
/**
* Macros to create the minimal NTDDI version from _WIN32_WINNT value.
@@ -135,7 +136,7 @@
# error The _WIN32_WINNT value does not match NTDDI_VERSION
# endif
# else
-# define _WIN32_WINNT OSVER(NTDDI_VERSION)
+# define _WIN32_WINNT WINNTVER(NTDDI_VERSION)
# ifndef WINVER
# define WINVER _WIN32_WINNT
# endif
diff --git a/include/stdio.h b/include/stdio.h
index fd830fa..bb186d7 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -489,14 +489,21 @@ _CRTIMP FILE* __cdecl __MINGW_NOTHROW _fsopen (const char*, const char*, int);
_CRTIMP int __cdecl __MINGW_NOTHROW _getmaxstdio (void);
_CRTIMP int __cdecl __MINGW_NOTHROW _setmaxstdio (int);
+#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA) || defined(HAVE_GET_OUTPUT_FORMAT)
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _get_output_format (void);
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _set_output_format (unsigned int);
-
-#define _TWO_DIGIT_EXPONENT 1
-
_CRTIMP int __cdecl __MINGW_NOTHROW _get_printf_count_output (void);
_CRTIMP int __cdecl __MINGW_NOTHROW _set_printf_count_output (int);
+#else
+#define _get_output_format() 0
+#define _set_output_format(x) 0
+#define _get_printf_count_output() 0
+#define _set_printf_count_output(x) 0
+#endif /* (_WIN32_WINNT >= _WIN32_WINNT_VISTA) || defined(HAVE_GET_OUTPUT_FORMAT) */
+
+#define _TWO_DIGIT_EXPONENT 1
+
#ifndef _NO_OLDNAMES
_CRTIMP int __cdecl __MINGW_NOTHROW fgetchar (void);
_CRTIMP int __cdecl __MINGW_NOTHROW fputchar (int);
diff --git a/misc/src/libcrt/stdio/pformat.c b/misc/src/libcrt/stdio/pformat.c
index cc63800..f351807 100644
--- a/misc/src/libcrt/stdio/pformat.c
+++ b/misc/src/libcrt/stdio/pformat.c
@@ -2,7 +2,6 @@
* prepared to support the POSIX-XSI additions to the C99 standard.
*/
#undef WITH_XSI_FEATURES
-#define __MSVCRT_VERSION__ 0x0800
/* pformat.c
*
@@ -141,7 +140,6 @@
*/
#define PFORMAT_INFNAN -32768
-#ifdef _WIN32
/*
* The Microsoft standard for printing `%e' format exponents is
* with a minimum of three digits, unless explicitly set otherwise,
@@ -150,22 +148,6 @@
* The following macro allows us to replicate this behaviour.
*/
# define PFORMAT_MINEXP __pformat_exponent_digits()
- /*
- * However, this feature is unsupported for versions of the
- * MSVC runtime library prior to msvcr80.dll, and by default,
- * MinGW uses an earlier version, (equivalent to msvcr60.dll),
- * for which `_TWO_DIGIT_EXPONENT' will be undefined.
- */
-# ifndef _TWO_DIGIT_EXPONENT
- /*
- * This hack works around the lack of the `_set_output_format()'
- * feature, when supporting versions of the MSVC runtime library
- * prior to msvcr80.dll; it simply enforces Microsoft's original
- * convention, for all cases where the feature is unsupported.
- */
-# define _get_output_format() 0
-# define _TWO_DIGIT_EXPONENT 1
-# endif
/*
* Irrespective of the MSVCRT version supported, *we* will add
* an additional capability, through the following inline function,
@@ -183,13 +165,6 @@ int __pformat_exponent_digits( void )
: 3
;
}
-#else
-/*
- * When we don't care to mimic Microsoft's standard behaviour,
- * we adopt the C99/POSIX standard of two digit exponents.
- */
-# define PFORMAT_MINEXP 2
-#endif
typedef union
{
@@ -722,10 +697,6 @@ typedef union
unsigned long __pformat_fpreg_bits;
} __pformat_fpreg_t;
-#ifdef _WIN32
-/* TODO: make this unconditional in final release...
- * (see note at head of associated `#else' block.
- */
#include "gdtoa.h"
static
@@ -807,61 +778,6 @@ char *__pformat_fcvt( long double x, int precision, int *dp, int *sign )
#define __pformat_ecvt_release( value ) __freedtoa( value )
#define __pformat_fcvt_release( value ) __freedtoa( value )
-#else
-/*
- * TODO: remove this before final release; it is included here as a
- * convenience for testing, without requiring a working `__gdtoa()'.
- */
-static __inline__
-char *__pformat_ecvt( long double x, int precision, int *dp, int *sign )
-{
- /* Define in terms of `ecvt()'...
- */
- char *retval = ecvt( (double)(x), precision, dp, sign );
- if( isinf( x ) || isnan( x ) )
- {
- /* emulating `__gdtoa()' reporting for infinities and NaN.
- */
- *dp = PFORMAT_INFNAN;
- if( *retval == '-' )
- {
- /* Need to force the `sign' flag, (particularly for NaN).
- */
- ++retval; *sign = 1;
- }
- }
- return retval;
-}
-
-static __inline__
-char *__pformat_fcvt( long double x, int precision, int *dp, int *sign )
-{
- /* Define in terms of `fcvt()'...
- */
- char *retval = fcvt( (double)(x), precision, dp, sign );
- if( isinf( x ) || isnan( x ) )
- {
- /* emulating `__gdtoa()' reporting for infinities and NaN.
- */
- *dp = PFORMAT_INFNAN;
- if( *retval == '-' )
- {
- /* Need to force the `sign' flag, (particularly for NaN).
- */
- ++retval; *sign = 1;
- }
- }
- return retval;
-}
-
-/* No memory pool clean up needed, for these emulated cases...
- */
-#define __pformat_ecvt_release( value ) /* nothing to be done */
-#define __pformat_fcvt_release( value ) /* nothing to be done */
-
-/* TODO: end of conditional to be removed. */
-#endif
-
static __inline__
void __pformat_emit_radix_point( __pformat_t *stream )
{
@@ -2175,8 +2091,6 @@ int __pformat( int flags, void *dest, int max, const char *fmt, va_list argv )
state = PFORMAT_END;
break;
-# ifdef _WIN32
-
case 'I':
/*
* The MSVCRT implementation of the printf() family of
@@ -2210,8 +2124,6 @@ int __pformat( int flags, void *dest, int max, const char *fmt, va_list argv )
state = PFORMAT_END;
break;
-# endif
-
case 'l':
/*
* Interpret the argument as explicitly of a
@@ -2231,7 +2143,6 @@ int __pformat( int flags, void *dest, int max, const char *fmt, va_list argv )
*/
length = PFORMAT_LENGTH_LONG;
-# ifndef _WIN32
/*
* Microsoft's MSVCRT implementation also uses `l'
* as a modifier for `long double'; if we don't want
@@ -2240,10 +2151,6 @@ int __pformat( int flags, void *dest, int max, const char *fmt, va_list argv )
state = PFORMAT_END;
break;
- /* otherwise, we simply fall through...
- */
-# endif
-
case 'L':
/*
* Identify the appropriate argument as a `long double',
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 12 ++++++++++++
include/_mingw.h | 6 +++---
include/wincrypt.h | 6 ++++++
lib/lib32/crypt32.def | 1 +
4 files changed, 22 insertions(+), 3 deletions(-)
hooks/post-receive
--
Repository: mingw.org-wsl
|