* lib/mountlist.h, lib/pagealign_alloc.h, lib/quotearg.h:
* lib/readutmp.h, lib/savedir.h, lib/sh-quote.h, lib/system-quote.h:
* lib/trim.h, lib/xgetcwd.h, lib/xgethostname.h, lib/xmalloca.h:
- * lib/xreadlink.h:
+ * lib/xreadlink.h, lib/xstriconv.h:
Add malloc-related attributes and include stdlib.h as needed.
* lib/dfa.c: Include verify.h.
(assume_nonnull): New macro.
#define _XSTRICONV_H
#include <stddef.h>
+#include <stdlib.h>
#if HAVE_ICONV
#include <iconv.h>
#endif
Upon memory allocation failure, report the error and exit.
Return value: the freshly allocated resulting NUL-terminated string if
successful, otherwise NULL and errno set. */
-extern char * xstr_cd_iconv (const char *src, iconv_t cd);
+extern char * xstr_cd_iconv (const char *src, iconv_t cd)
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE;
#endif
Return value: the freshly allocated resulting NUL-terminated string if
successful, otherwise NULL and errno set. */
extern char * xstr_iconv (const char *src,
- const char *from_codeset, const char *to_codeset);
-
+ const char *from_codeset, const char *to_codeset)
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE;
#ifdef __cplusplus
}