}
return "wen";
case LANG_SOTHO:
- /* <https://msdn.microsoft.com/en-us/library/dd318693.aspx> calls
- it "Sesotho sa Leboa"; according to
+ /* <https://docs.microsoft.com/en-us/windows/desktop/Intl/language-identifier-constants-and-strings>
+ calls it "Sesotho sa Leboa"; according to
<https://www.ethnologue.com/show_language.asp?code=nso>
<https://www.ethnologue.com/show_language.asp?code=sot>
it's the same as Northern Sotho. */
/* Provide relocatable packages.
- Copyright (C) 2003-2006, 2008-2018 Free Software Foundation, Inc.
+ Copyright (C) 2003-2006, 2008-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
}
if (!same)
break;
- /* The last pathname component was the same. opi and cpi now point
+ /* The last pathname component was the same. rpi and cpi now point
to the slash before it. */
rp = rpi;
cp = cpi;
}
{
- size_t curr_prefix_len = cp - curr_installdir;
- char *curr_prefix;
+ size_t computed_curr_prefix_len = cp - curr_installdir;
+ char *computed_curr_prefix;
- curr_prefix = (char *) xmalloc (curr_prefix_len + 1);
+ computed_curr_prefix = (char *) xmalloc (computed_curr_prefix_len + 1);
#ifdef NO_XMALLOC
- if (curr_prefix == NULL)
+ if (computed_curr_prefix == NULL)
{
free (curr_installdir);
return NULL;
}
#endif
- memcpy (curr_prefix, curr_installdir, curr_prefix_len);
- curr_prefix[curr_prefix_len] = '\0';
+ memcpy (computed_curr_prefix, curr_installdir, computed_curr_prefix_len);
+ computed_curr_prefix[computed_curr_prefix_len] = '\0';
free (curr_installdir);
- return curr_prefix;
+ return computed_curr_prefix;
}
}
}
/* vsprintf with automatic memory allocation.
- Copyright (C) 1999, 2002-2018 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
# if ! (((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \
&& !defined __UCLIBC__) \
|| (defined __APPLE__ && defined __MACH__) \
+ || defined __ANDROID__ \
|| (defined _WIN32 && ! defined __CYGWIN__))
fbp[1] = '%';
fbp[2] = 'n';
On Mac OS X 10.13 or newer, the use of %n in format strings
in writable memory by default crashes the program, so we
should avoid it in this situation. */
+ /* On Android, we know that snprintf's return value conforms to
+ ISO C 99: the tests gl_SNPRINTF_RETVAL_C99 and
+ gl_SNPRINTF_TRUNCATION_C99 pass.
+ Therefore we can avoid using %n in this situation.
+ Starting on 2018-03-07, the use of %n in format strings
+ produces a fatal error (see
+ <https://android.googlesource.com/platform/bionic/+/41398d03b7e8e0dfb951660ae713e682e9fc0336>),
+ so we should avoid it. */
/* On native Windows systems (such as mingw), we can avoid using
%n because:
- Although the gl_SNPRINTF_TRUNCATION_C99 test fails,
Windows Vista, the use of %n in format strings by default
crashes the program. See
<https://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and
- <https://msdn.microsoft.com/en-us/library/ms175782.aspx>
+ <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/set-printf-count-output>
So we should avoid %n in this situation. */
fbp[1] = '\0';
# endif
here generates easier-to-read diagnostics when verify (R) fails.
Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11.
- This will likely be supported by future GCC versions, in C++ mode.
+ This is supported by GCC 6.1.0 and later, in C++ mode.
Use this only with GCC. If we were willing to slow 'configure'
down we could also use it with other compilers, but since this
&& !defined __cplusplus)
# define _GL_HAVE__STATIC_ASSERT 1
#endif
-/* The condition (99 < __GNUC__) is temporary, until we know about the
- first G++ release that supports static_assert. */
-#if (99 < __GNUC__) && defined __cplusplus
+#if (6 <= __GNUC__) && defined __cplusplus
# define _GL_HAVE_STATIC_ASSERT 1
#endif
/* vsprintf with automatic memory allocation.
- Copyright (C) 1999, 2002-2018 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
# if ! (((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \
&& !defined __UCLIBC__) \
|| (defined __APPLE__ && defined __MACH__) \
+ || defined __ANDROID__ \
|| (defined _WIN32 && ! defined __CYGWIN__))
fbp[1] = '%';
fbp[2] = 'n';
On Mac OS X 10.13 or newer, the use of %n in format strings
in writable memory by default crashes the program, so we
should avoid it in this situation. */
+ /* On Android, we know that snprintf's return value conforms to
+ ISO C 99: the tests gl_SNPRINTF_RETVAL_C99 and
+ gl_SNPRINTF_TRUNCATION_C99 pass.
+ Therefore we can avoid using %n in this situation.
+ Starting on 2018-03-07, the use of %n in format strings
+ produces a fatal error (see
+ <https://android.googlesource.com/platform/bionic/+/41398d03b7e8e0dfb951660ae713e682e9fc0336>),
+ so we should avoid it. */
/* On native Windows systems (such as mingw), we can avoid using
%n because:
- Although the gl_SNPRINTF_TRUNCATION_C99 test fails,
Windows Vista, the use of %n in format strings by default
crashes the program. See
<https://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and
- <https://msdn.microsoft.com/en-us/library/ms175782.aspx>
+ <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/set-printf-count-output>
So we should avoid %n in this situation. */
fbp[1] = '\0';
# endif