From: Bruno Haible Date: Sat, 7 Aug 2021 19:46:24 +0000 (+0200) Subject: javaversion: Improve GCC 11 allocation-deallocation checking. X-Git-Tag: v1.0~2697 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=5ce620f7287c9aeb8b4b0b75c2631c0b16c1c2d5;p=gnulib.git javaversion: Improve GCC 11 allocation-deallocation checking. * lib/javaversion.h: Include . (javaexec_version): Declare that deallocation must happen through 'free'. --- diff --git a/ChangeLog b/ChangeLog index 319f2dd72a..912c8cc3e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2021-08-07 Bruno Haible + + javaversion: Improve GCC 11 allocation-deallocation checking. + * lib/javaversion.h: Include . + (javaexec_version): Declare that deallocation must happen through + 'free'. + 2021-08-07 Bruno Haible ino-map: Improve GCC 11 allocation-deallocation checking. diff --git a/lib/javaversion.h b/lib/javaversion.h index ff5537794e..6983b289fa 100644 --- a/lib/javaversion.h +++ b/lib/javaversion.h @@ -18,6 +18,8 @@ #ifndef _JAVAVERSION_H #define _JAVAVERSION_H +#include + #ifdef __cplusplus extern "C" { @@ -28,7 +30,8 @@ extern "C" { This is the value of System.getProperty("java.specification.version"). Some possible values are: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 9, 10, 11. Return NULL if the Java version cannot be determined. */ -extern char * javaexec_version (void); +extern char * javaexec_version (void) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; #ifdef __cplusplus