+2003-08-11 Bruno Haible <bruno@clisp.org>
+
+ * vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
+ (VASNPRINTF): Use it instead of wcslen.
+
2003-08-01 Bruno Haible <bruno@clisp.org>
* relocatable.c (find_shared_library_fullname): Disable the code on
# define freea(p) free (p)
#endif
+#ifdef HAVE_WCHAR_T
+# ifdef HAVE_WCSLEN
+# define local_wcslen wcslen
+# else
+ /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid
+ a dependency towards this library, here is a local substitute. */
+static size_t
+local_wcslen (const wchar_t *s)
+{
+ const wchar_t *ptr;
+
+ for (ptr = s; *ptr != (wchar_t) 0; ptr++)
+ ;
+ return ptr - s;
+}
+# endif
+#endif
+
#if WIDE_CHAR_VERSION
# define VASNPRINTF vasnwprintf
# define CHAR_T wchar_t
if (type == TYPE_WIDE_STRING)
# if WIDE_CHAR_VERSION
tmp_length =
- wcslen (a.arg[dp->arg_index].a.a_wide_string);
+ local_wcslen (a.arg[dp->arg_index].a.a_wide_string);
# else
tmp_length =
- wcslen (a.arg[dp->arg_index].a.a_wide_string)
+ local_wcslen (a.arg[dp->arg_index].a.a_wide_string)
* MB_CUR_MAX;
# endif
else
+2003-08-11 Bruno Haible <bruno@clisp.org>
+
+ * vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
+ (VASNPRINTF): Use it instead of wcslen.
+
2003-06-20 Bruno Haible <bruno@clisp.org>
* configure.ac: Invoke gt_PRINTF_POSIX.
# define freea(p) free (p)
#endif
+#ifdef HAVE_WCHAR_T
+# ifdef HAVE_WCSLEN
+# define local_wcslen wcslen
+# else
+ /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid
+ a dependency towards this library, here is a local substitute. */
+static size_t
+local_wcslen (const wchar_t *s)
+{
+ const wchar_t *ptr;
+
+ for (ptr = s; *ptr != (wchar_t) 0; ptr++)
+ ;
+ return ptr - s;
+}
+# endif
+#endif
+
#if WIDE_CHAR_VERSION
# define VASNPRINTF vasnwprintf
# define CHAR_T wchar_t
if (type == TYPE_WIDE_STRING)
# if WIDE_CHAR_VERSION
tmp_length =
- wcslen (a.arg[dp->arg_index].a.a_wide_string);
+ local_wcslen (a.arg[dp->arg_index].a.a_wide_string);
# else
tmp_length =
- wcslen (a.arg[dp->arg_index].a.a_wide_string)
+ local_wcslen (a.arg[dp->arg_index].a.a_wide_string)
* MB_CUR_MAX;
# endif
else