* lib/get_progname_of.h: Include <stdlib.h>.
(get_progname_of): Declare that deallocation must happen through 'free'.
+2021-08-07 Bruno Haible <bruno@clisp.org>
+
+ get_progname_of: Improve GCC 11 allocation-deallocation checking.
+ * lib/get_progname_of.h: Include <stdlib.h>.
+ (get_progname_of): Declare that deallocation must happen through 'free'.
+
2021-08-07 Bruno Haible <bruno@clisp.org>
fts: Improve GCC 11 allocation-deallocation checking.
#ifndef _GET_PROGNAME_OF_H
#define _GET_PROGNAME_OF_H
+#include <stdlib.h>
#include <sys/types.h>
#ifdef __cplusplus
/* Returns the base name of the program that executes the given process,
possibly truncated, as a freshly allocated string, or NULL if it cannot
be determined. */
-extern char *get_progname_of (pid_t pid);
+extern char *get_progname_of (pid_t pid)
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE;
#ifdef __cplusplus
}