104 lines
4.2 KiB
Diff
104 lines
4.2 KiB
Diff
diff --git a/binutils/strings.c b/binutils/strings.c
|
|
index 44a8e1da644..4010829dc49 100644
|
|
--- a/binutils/strings.c
|
|
+++ b/binutils/strings.c
|
|
@@ -617,7 +617,7 @@ print_filename_and_address (const char * filename, file_ptr address)
|
|
case 8:
|
|
if (sizeof (address) > sizeof (long))
|
|
{
|
|
-#ifndef __MSVCRT__
|
|
+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO)
|
|
printf ("%7llo ", (unsigned long long) address);
|
|
#else
|
|
printf ("%7I64o ", (unsigned long long) address);
|
|
@@ -630,7 +630,7 @@ print_filename_and_address (const char * filename, file_ptr address)
|
|
case 10:
|
|
if (sizeof (address) > sizeof (long))
|
|
{
|
|
-#ifndef __MSVCRT__
|
|
+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO)
|
|
printf ("%7llu ", (unsigned long long) address);
|
|
#else
|
|
printf ("%7I64d ", (unsigned long long) address);
|
|
@@ -643,7 +643,7 @@ print_filename_and_address (const char * filename, file_ptr address)
|
|
case 16:
|
|
if (sizeof (address) > sizeof (long))
|
|
{
|
|
-#ifndef __MSVCRT__
|
|
+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO)
|
|
printf ("%7llx ", (unsigned long long) address);
|
|
#else
|
|
printf ("%7I64x ", (unsigned long long) address);
|
|
diff --git a/gas/as.h b/gas/as.h
|
|
index 14a768f8889..b1f056f115a 100644
|
|
--- a/gas/as.h
|
|
+++ b/gas/as.h
|
|
@@ -433,14 +433,14 @@ typedef struct _pseudo_type pseudo_typeS;
|
|
|
|
#define PRINTF_LIKE(FCN) \
|
|
void FCN (const char *format, ...) \
|
|
- __attribute__ ((__format__ (__printf__, 1, 2)))
|
|
+ __attribute__ ((__format__ (gnu_printf, 1, 2)))
|
|
#define PRINTF_WHERE_LIKE(FCN) \
|
|
void FCN (const char *file, unsigned int line, const char *format, ...) \
|
|
- __attribute__ ((__format__ (__printf__, 3, 4)))
|
|
+ __attribute__ ((__format__ (gnu_printf, 3, 4)))
|
|
#define PRINTF_INDENT_LIKE(FCN) \
|
|
void FCN (const char *file, unsigned int line, unsigned int indent, \
|
|
const char *format, ...) \
|
|
- __attribute__ ((__format__ (__printf__, 4, 5)))
|
|
+ __attribute__ ((__format__ (gnu_printf, 4, 5)))
|
|
|
|
#else /* __GNUC__ < 2 || defined(VMS) */
|
|
|
|
diff --git a/gold/configure b/gold/configure
|
|
index b9f062b68eb..fde982191c5 100755
|
|
--- a/gold/configure
|
|
+++ b/gold/configure
|
|
@@ -10204,7 +10204,7 @@ else
|
|
/* end confdefs.h. */
|
|
|
|
template<typename T> extern void foo(const char*, ...)
|
|
- __attribute__ ((__format__ (__printf__, 1, 2)));
|
|
+ __attribute__ ((__format__ (gnu_printf, 1, 2)));
|
|
template<typename T> void foo(const char* format, ...) {}
|
|
void bar() { foo<int>("%s\n", "foo"); }
|
|
|
|
diff --git a/gold/configure.ac b/gold/configure.ac
|
|
index 1716a779416..cae29866f38 100644
|
|
--- a/gold/configure.ac
|
|
+++ b/gold/configure.ac
|
|
@@ -679,7 +679,7 @@ AC_CACHE_CHECK([whether we can use attributes with template functions],
|
|
[gold_cv_template_attribute],
|
|
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
|
template<typename T> extern void foo(const char*, ...)
|
|
- __attribute__ ((__format__ (__printf__, 1, 2)));
|
|
+ __attribute__ ((__format__ (gnu_printf, 1, 2)));
|
|
template<typename T> void foo(const char* format, ...) {}
|
|
void bar() { foo<int>("%s\n", "foo"); }
|
|
])], [gold_cv_template_attribute=yes], [gold_cv_template_attribute=no])])
|
|
diff --git a/include/ansidecl.h b/include/ansidecl.h
|
|
index 0515228f325..7c2b9f18306 100644
|
|
--- a/include/ansidecl.h
|
|
+++ b/include/ansidecl.h
|
|
@@ -195,7 +195,7 @@ So instead we use the macro below and test it against specific values. */
|
|
before GCC 3.3, but as of 3.3 we need to add the `nonnull'
|
|
attribute to retain this behavior. */
|
|
#ifndef ATTRIBUTE_PRINTF
|
|
-#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ATTRIBUTE_NONNULL(m)
|
|
+#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (gnu_printf, m, n))) ATTRIBUTE_NONNULL(m)
|
|
#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
|
|
#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
|
|
#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
|
|
@@ -223,7 +223,7 @@ So instead we use the macro below and test it against specific values. */
|
|
NULL format specifier was allowed as of gcc 3.3. */
|
|
#ifndef ATTRIBUTE_NULL_PRINTF
|
|
# if (GCC_VERSION >= 3003)
|
|
-# define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
|
|
+# define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (gnu_printf, m, n)))
|
|
# else
|
|
# define ATTRIBUTE_NULL_PRINTF(m, n)
|
|
# endif /* GNUC >= 3.3 */
|
|
--
|
|
2.32.0
|