RISC-V: Add PT_RISCV_ATTRIBUTES and add it to PHDR.
[binutils-gdb.git] / binutils / windres.c
index df3e01fd941fae20d67586c914cb32681b919aef..2b626a29fb68ada1cc012a267a60d72c1335bea9 100644 (file)
@@ -1,5 +1,5 @@
 /* windres.c -- a program to manipulate Windows resources
-   Copyright (C) 1997-2020 Free Software Foundation, Inc.
+   Copyright (C) 1997-2021 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
    Rewritten by Kai Tietz, Onevision.
 
@@ -48,7 +48,7 @@
 
 int verbose = 0;
 
-int target_is_bigendian = 0;
+bool target_is_bigendian = 0;
 const char *def_target_arch;
 
 static void set_endianness (bfd *, const char *);
@@ -703,19 +703,20 @@ quot (const char *string)
   const char *src;
   char *dest;
 
-  if ((buflen < slen * 2 + 2) || ! buf)
+  if ((buflen < slen * 2 + 3) || ! buf)
     {
-      buflen = slen * 2 + 2;
+      buflen = slen * 2 + 3;
       free (buf);
       buf = (char *) xmalloc (buflen);
     }
 
-  for (src=string, dest=buf; *src; src++, dest++)
+  for (src = string, dest = buf; *src; src++, dest++)
     {
       if (*src == '(' || *src == ')' || *src == ' ')
        *dest++ = '\\';
       *dest = *src;
     }
+
   *dest = 0;
   return buf;
 }
@@ -798,12 +799,10 @@ main (int argc, char **argv)
   rc_res_directory *resources;
   int use_temp_file;
 
-#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+#ifdef HAVE_LC_MESSAGES
   setlocale (LC_MESSAGES, "");
 #endif
-#if defined (HAVE_SETLOCALE)
   setlocale (LC_CTYPE, "");
-#endif
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);