* lib/wcsdup.c: Include <errno.h>.
* lib/wcsdup-impl.h (wcsdup): Set errno before returning NULL.
+2025-11-19 Bruno Haible <bruno@clisp.org>
+
+ wcsdup: Make POSIX compliant.
+ * lib/wcsdup.c: Include <errno.h>.
+ * lib/wcsdup-impl.h (wcsdup): Set errno before returning NULL.
+
2025-11-18 Paul Eggert <eggert@cs.ucla.edu>
intprops: port better to Clang < 21
if (copy != NULL)
return wmemcpy (copy, s, n);
else
- /* The glibc documentation does not say that errno should be set to ENOMEM
- here. */
- return NULL;
+ {
+ errno = ENOMEM;
+ return NULL;
+ }
}
/* Specification. */
#include <wchar.h>
+#include <errno.h>
#include <stdlib.h>
#include "wcsdup-impl.h"