Files
MINGW-packages/mingw-w64-binutils-git/0110-binutils-mingw-gnu-print.patch
2014-08-10 23:30:26 +04:00

133 lines
5.2 KiB
Diff

diff -Naur binutils-2.24/bfd/bfd-in.h binutils-2.24-mingw/bfd/bfd-in.h
--- binutils-2.24/bfd/bfd-in.h 2013-11-04 19:33:37.000000000 +0400
+++ binutils-2.24-mingw/bfd/bfd-in.h 2014-03-13 22:24:26.512400000 +0400
@@ -137,7 +137,7 @@
#if BFD_HOST_64BIT_LONG
#define BFD_VMA_FMT "l"
-#elif defined (__MSVCRT__)
+#elif defined(__MSVCRT__) && !defined( __USE_MINGW_ANSI_STDIO)
#define BFD_VMA_FMT "I64"
#else
#define BFD_VMA_FMT "ll"
diff -Naur binutils-2.24/bfd/bfd-in2.h binutils-2.24-mingw/bfd/bfd-in2.h
--- binutils-2.24/bfd/bfd-in2.h 2013-11-18 12:40:15.000000000 +0400
+++ binutils-2.24-mingw/bfd/bfd-in2.h 2014-03-13 22:24:03.580400000 +0400
@@ -144,7 +144,7 @@
#if BFD_HOST_64BIT_LONG
#define BFD_VMA_FMT "l"
-#elif defined (__MSVCRT__)
+#elif defined (__MSVCRT__) && !defined(__USE_MINGW_ANSI_STDIO)
#define BFD_VMA_FMT "I64"
#else
#define BFD_VMA_FMT "ll"
diff -Naur binutils-2.24/binutils/dwarf.c binutils-2.24-mingw/binutils/dwarf.c
--- binutils-2.24/binutils/dwarf.c 2013-11-08 14:13:48.000000000 +0400
+++ binutils-2.24-mingw/binutils/dwarf.c 2014-03-13 22:58:50.101400000 +0400
@@ -140,7 +140,7 @@
}
#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
-#ifndef __MINGW32__
+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO)
#define DWARF_VMA_FMT "ll"
#define DWARF_VMA_FMT_LONG "%16.16llx"
#else
diff -Naur binutils-2.24/binutils/nm.c binutils-2.24-mingw/binutils/nm.c
--- binutils-2.24/binutils/nm.c 2013-11-08 14:13:48.000000000 +0400
+++ binutils-2.24-mingw/binutils/nm.c 2014-03-13 22:18:43.452800000 +0400
@@ -164,7 +164,7 @@
#if BFD_HOST_64BIT_LONG
static char value_format_64bit[] = "%016lx";
#elif BFD_HOST_64BIT_LONG_LONG
-#ifndef __MSVCRT__
+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO)
static char value_format_64bit[] = "%016llx";
#else
static char value_format_64bit[] = "%016I64x";
@@ -290,7 +290,7 @@
#if BFD_HOST_64BIT_LONG
value_format_64bit[5] = *radix;
#elif BFD_HOST_64BIT_LONG_LONG
-#ifndef __MSVCRT__
+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO)
value_format_64bit[6] = *radix;
#else
value_format_64bit[7] = *radix;
diff -Naur binutils-2.24/binutils/prdbg.c binutils-2.24-mingw/binutils/prdbg.c
--- binutils-2.24/binutils/prdbg.c 2013-11-04 19:33:37.000000000 +0400
+++ binutils-2.24-mingw/binutils/prdbg.c 2014-03-13 22:19:45.603200000 +0400
@@ -502,7 +502,7 @@
#if BFD_HOST_64BIT_LONG_LONG
else if (sizeof (vma) <= sizeof (unsigned long long))
{
-#ifndef __MSVCRT__
+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO)
if (hexp)
sprintf (buf, "0x%llx", (unsigned long long) vma);
else if (unsignedp)
diff -Naur binutils-2.24/binutils/readelf.c binutils-2.24-mingw/binutils/readelf.c
--- binutils-2.24/binutils/readelf.c 2013-11-18 12:40:15.000000000 +0400
+++ binutils-2.24-mingw/binutils/readelf.c 2014-03-13 22:20:53.494400000 +0400
@@ -1006,7 +1006,7 @@
: "%12.12lx %12.12lx ",
offset, inf);
#elif BFD_HOST_64BIT_LONG_LONG
-#ifndef __MSVCRT__
+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO)
printf (do_wide
? "%16.16llx %16.16llx "
: "%12.12llx %12.12llx ",
@@ -10836,7 +10836,7 @@
if (data < end)
{
-#ifndef __MSVCRT__
+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO)
/* PR 11128: Use two separate invocations in order to work
around bugs in the Solaris 8 implementation of printf. */
printf (" [%6tx] ", data - start);
diff -Naur binutils-2.24/binutils/strings.c binutils-2.24-mingw/binutils/strings.c
--- binutils-2.24/binutils/strings.c 2013-11-04 19:33:37.000000000 +0400
+++ binutils-2.24-mingw/binutils/strings.c 2014-03-13 22:21:29.140400000 +0400
@@ -557,7 +557,7 @@
#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
if (sizeof (start) > sizeof (long))
{
-#ifndef __MSVCRT__
+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO)
printf ("%7llo ", (unsigned long long) start);
#else
printf ("%7I64o ", (unsigned long long) start);
@@ -576,7 +576,7 @@
#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
if (sizeof (start) > sizeof (long))
{
-#ifndef __MSVCRT__
+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO)
printf ("%7lld ", (unsigned long long) start);
#else
printf ("%7I64d ", (unsigned long long) start);
@@ -595,7 +595,7 @@
#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
if (sizeof (start) > sizeof (long))
{
-#ifndef __MSVCRT__
+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO)
printf ("%7llx ", (unsigned long long) start);
#else
printf ("%7I64x ", (unsigned long long) start);
diff -Naur binutils-2.24/gas/read.c binutils-2.24-mingw/gas/read.c
--- binutils-2.24/gas/read.c 2013-11-08 14:13:48.000000000 +0400
+++ binutils-2.24-mingw/gas/read.c 2014-03-13 22:22:11.806400000 +0400
@@ -4293,7 +4293,7 @@
|| (get & hibit) == 0))
{ /* Leading bits contain both 0s & 1s. */
#if defined (BFD64) && BFD_HOST_64BIT_LONG_LONG
-#ifndef __MSVCRT__
+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO)
as_warn (_("value 0x%llx truncated to 0x%llx"),
(unsigned long long) get, (unsigned long long) use);
#else