/*
* These platforms use bsd_vsnprintf().
- * This does not mean it has bsd_vsnwprintf().
+ *
+ * XXX: open-vm-tools does not use bsd_vsnprintf because bsd_vsnprintf uses
+ * convertutf.{h,c}, and the license for those files does not meet the
+ * redistribution requirements for Debian.
+ * <https://github.com/vmware/open-vm-tools/issues/148>
*/
#if !defined(OPEN_VM_TOOLS)
#if (defined _WIN32 && !defined STR_NO_WIN32_LIBS) || \
#endif
#endif
-/*
- * And these platforms/setups use bsd_vsnwprintf()
- */
-#if !defined(OPEN_VM_TOOLS)
-#if (defined _WIN32 && !defined STR_NO_WIN32_LIBS) || \
- (defined __GNUC__ && (__GNUC__ < 2 \
- || (__GNUC__ == 2 \
- && __GNUC_MINOR__ < 96)))
-#define HAS_BSD_WPRINTF 1
-#endif
-#endif
/*
* ASCII/UTF-8 versions
const char *format, // IN:
va_list arguments); // IN:
-#if defined(_WIN32) || defined(__linux__) // {
+#if defined(_WIN32) // {
/*
* wchar_t versions
* the _tcs functions, but with Str_Strcpy-style bounds checking.
*/
-#ifdef _WIN32
#ifdef UNICODE
#define Str_Tcscpy(s1, s2, n) Str_Wcscpy(s1, s2, n)
#define Str_Tcscat(s1, s2, n) Str_Wcscat(s1, s2, n)
#define Str_Tcscpy(s1, s2, n) Str_Strcpy(s1, s2, n)
#define Str_Tcscat(s1, s2, n) Str_Strcat(s1, s2, n)
#endif
-#endif
-#endif // } defined(_WIN32) || defined(__linux__)
+#endif // } defined(_WIN32)
/*
return StrVasprintfInternal(length, format, arguments, TRUE);
}
-#if defined(_WIN32) || defined(__linux__)
+#if defined(_WIN32) // {
/*
*----------------------------------------------------------------------
* Returns the number of wchar_ts stored in 'buf'.
*
* WARNING:
- * Behavior of this function is guaranteed only if HAS_BSD_WPRINTF is
+ * Behavior of this function is guaranteed only if HAS_BSD_PRINTF is
* enabled.
*
* Side effects:
* NB: on overflow the buffer WILL be NUL terminated
*
* WARNING:
- * Behavior of this function is guaranteed only if HAS_BSD_WPRINTF is
+ * Behavior of this function is guaranteed only if HAS_BSD_PRINTF is
* enabled.
*
* See the warning at the top of this file for proper va_list usage.
{
int retval;
-#if defined HAS_BSD_WPRINTF
+#if defined HAS_BSD_PRINTF
retval = bsd_vsnwprintf(&str, size, format, ap);
#elif defined(_WIN32)
/*
return StrVaswprintfInternal(length, format, arguments, TRUE);
}
-#endif // defined(_WIN32) || defined(__linux__)
+#endif // } defined(_WIN32)
#ifndef _WIN32
const wchar_t *fmt, // IN
...) // IN
{
-#if !defined HAS_BSD_WPRINTF
+#if !defined HAS_BSD_PRINTF
NOT_TESTED_ONCE();
#else
wchar_t buf[1024] = L"";