2018-02-23 Paul Eggert <eggert@cs.ucla.edu>
+ nl_langinfo: pacify gcc -Wunused-function
+ * lib/nl_langinfo.c (ctype_codeset): Do not define if
+ REPLACE_NL_LANGINFO && !GNULIB_defined_CODESET, as it is unused in
+ this case. Without this change, I got a diagnostic when building
+ coreutils on Fedora 27 with gcc 7.3.1 20180130.
+
same: pacify gcc -Wunused-variable
* lib/same.c (same_nameat) [!CHECK_TRUNCATION]:
Omit unused variable.
# include <stdio.h>
#endif
+#if !REPLACE_NL_LANGINFO || GNULIB_defined_CODESET
/* Return the codeset of the current locale, if this is easily deducible.
Otherwise, return "". */
static char *
}
}
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* If setlocale is successful, it returns the number of the
codepage, as a string. Otherwise, fall back on Windows API
GetACP, which returns the locale's codepage as a number (although
else
sprintf (buf + 2, "%u", GetACP ());
codeset = memcpy (buf, "CP", 2);
-#endif
+# endif
return codeset;
}
+#endif
#if REPLACE_NL_LANGINFO