gettimeofday: port recent C++ fix to Emacs
[gnulib.git] / lib / propername.c
index 966e0f6..8cc8308 100644 (file)
@@ -1,5 +1,5 @@
 /* Localization of proper names.
-   Copyright (C) 2006-2009 Free Software Foundation, Inc.
+   Copyright (C) 2006-2013 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2006.
 
    This program is free software: you can redistribute it and/or modify
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* Without this pragma, gcc 4.7.0 20111124 mistakenly suggests that
+   the proper_name function might be candidate for attribute 'const'  */
+#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
+#endif
+
 #include <config.h>
 
 /* Specification.  */
@@ -198,7 +204,8 @@ proper_name_utf8 (const char *name_ascii, const char *name_utf8)
       name_converted = alloc_name_converted =
         xstr_iconv (name_utf8, "UTF-8", locale_code);
 
-# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
+# if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) \
+      && !defined __UCLIBC__) \
      || _LIBICONV_VERSION >= 0x0105
       {
         char *converted_translit;